cancel
Showing results for 
Search instead for 
Did you mean: 

How to override PathSegmentServiceDefault ?

Hari_
Confirmed Champ
Confirmed Champ

Reading the question Document name : what is the max characters number for path ? I understood that in order to change the 24 char limit of the document name, I have to derive the class PathSegmentServiceDefault and providing it as a new contribution to the PathSegmentService. Deriving the PathSegmentServiceDefault is easy, but adding the contribution is what I'm not getting right. I am sure I am missing something in the extension part, but not sure what. It would be great if someone that has succeeded in this task can show me the right way ... Thank You in advance.

3 REPLIES 3

Florent_Guillau
World-Class Innovator
World-Class Innovator

Show us what you've tried.

Hari_
Confirmed Champ
Confirmed Champ

Ok, it happened that I was doing a mistake with my *-contrib.xml file, I solved that and it works quite fine now. Thankyou anyway.

Hari_
Confirmed Champ
Confirmed Champ

Besides implementing the PathSegmentService interface and customizing my PathSegmentServiceCustom class to my needs, to contribute to PathSegmentService, all that is needed is to provede an xml file with the following name pattern :

name-of-your-choice-contrib.xml

and with the following content:

<?xml version="1.0"?>
<component name="org.nuxeo.edrms.custom.pathsegment.PathSegmentServiceCustom">
   <extension target="org.nuxeo.ecm.core.api.pathsegment.PathSegmentService"
	           point="pathSegmentService ">
	     <service class="org.nuxeo.edrms.custom.pathsegment.PathSegmentServiceCustom" />
   </extension>
</component>

with org.nuxeo.edrms.custom.pathsegment.PathSegmentServiceCustom being the customized PathSegmentServiceDefault alternative.