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
Modifier and TypeFieldDescriptionprotected LinkedList<Class<? extends PathSegmentService>>
protected boolean
protected PathSegmentService
static final String
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
Fields inherited from interface org.nuxeo.ecm.core.api.pathsegment.PathSegmentService
NUXEO_MAX_SEGMENT_SIZE_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.void
deactivate
(ComponentContext context) Deactivates the component.Generate the path segment to use from a string.Generate the path segment to use for aDocumentModel
that's about to be created.int
Return the path segment max sizeprotected void
void
registerContribution
(Object contrib, String xp, ComponentInstance contributor) void
unregisterContribution
(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, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
deactivate
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
registerContribution
- Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
- Overrides:
unregisterContribution
in classDefaultComponent
-
generatePathSegment
Description copied from interface:PathSegmentService
Generate the path segment to use for aDocumentModel
that's about to be created.- Specified by:
generatePathSegment
in interfacePathSegmentService
- Parameters:
doc
- the document- Returns:
- the path segment, which must not contain any
/
character
-
recompute
protected void recompute() -
generatePathSegment
Description copied from interface:PathSegmentService
Generate the path segment to use from a string.- Specified by:
generatePathSegment
in interfacePathSegmentService
- Parameters:
s
- the string- Returns:
- the path segment, which must not contain any
/
character
-
getMaxSize
public int getMaxSize()Description copied from interface:PathSegmentService
Return the path segment max size- Specified by:
getMaxSize
in interfacePathSegmentService
-