Class PathSegmentServiceDefault
- java.lang.Object
-
- org.nuxeo.ecm.core.api.pathsegment.PathSegmentServiceDefault
-
- All Implemented Interfaces:
PathSegmentService
public class PathSegmentServiceDefault extends Object implements PathSegmentService
Service generating a path segment from the title by just removing slashes and limiting size.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NUXEO_MAX_SEGMENT_SIZE_PROPERTY
Deprecated.since 7.4, usePathSegmentService.NUXEO_MAX_SEGMENT_SIZE_PROPERTY
insteadstatic Pattern
stupidRegexp
-
Constructor Summary
Constructors Constructor Description PathSegmentServiceDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generatePathSegment(String s)
Generate the path segment to use from a string.String
generatePathSegment(DocumentModel doc)
Generate the path segment to use for aDocumentModel
that's about to be created.int
getMaxSize()
Return the path segment max size
-
-
-
Field Detail
-
stupidRegexp
public static final Pattern stupidRegexp
-
NUXEO_MAX_SEGMENT_SIZE_PROPERTY
@Deprecated public static final String NUXEO_MAX_SEGMENT_SIZE_PROPERTY
Deprecated.since 7.4, usePathSegmentService.NUXEO_MAX_SEGMENT_SIZE_PROPERTY
instead- See Also:
- Constant Field Values
-
-
Method Detail
-
generatePathSegment
public String generatePathSegment(DocumentModel doc)
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
-
generatePathSegment
public String generatePathSegment(String s)
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
-
-