Class PathSegmentComponent
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.core.api.pathsegment.PathSegmentComponent
- All Implemented Interfaces:
PathSegmentService,Adaptable,Component,Extensible,TimestampedService
Central service for the generation of a path segment for a document.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LinkedList<Class<? extends PathSegmentService>> protected booleanprotected PathSegmentServicestatic final StringFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, nameFields inherited from interface org.nuxeo.ecm.core.api.pathsegment.PathSegmentService
NUXEO_MAX_SEGMENT_SIZE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.voiddeactivate(ComponentContext context) Deactivates the component.Generate the path segment to use from a string.Generate the path segment to use for aDocumentModelthat's about to be created.intReturn the path segment max sizeprotected voidvoidregisterContribution(Object contrib, String xp, ComponentInstance contributor) voidunregisterContribution(Object contrib, String xp, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
XP
- See Also:
-
contribs
-
service
-
recompute
protected boolean recompute
-
-
Constructor Details
-
PathSegmentComponent
public PathSegmentComponent()
-
-
Method Details
-
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
deactivate
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
registerContribution
- Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
- Overrides:
unregisterContributionin classDefaultComponent
-
generatePathSegment
Description copied from interface:PathSegmentServiceGenerate the path segment to use for aDocumentModelthat's about to be created.- Specified by:
generatePathSegmentin interfacePathSegmentService- Parameters:
doc- the document- Returns:
- the path segment, which must not contain any
/character
-
recompute
protected void recompute() -
generatePathSegment
Description copied from interface:PathSegmentServiceGenerate the path segment to use from a string.- Specified by:
generatePathSegmentin interfacePathSegmentService- Parameters:
s- the string- Returns:
- the path segment, which must not contain any
/character
-
getMaxSize
public int getMaxSize()Description copied from interface:PathSegmentServiceReturn the path segment max size- Specified by:
getMaxSizein interfacePathSegmentService
-