Package io.ocfl.core.path
Class ContentPathMapper
- java.lang.Object
-
- io.ocfl.core.path.ContentPathMapper
-
public class ContentPathMapper extends Object
This maps logical paths to content paths and applies content path constraints.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContentPathMapper.Builder
-
Constructor Summary
Constructors Constructor Description ContentPathMapper(LogicalPathMapper logicalPathMapper, ContentPathConstraintProcessor contentPathConstraintProcessor, String objectRootPath, String contentDirectory, VersionNum versionNum, RevisionNum revisionNum)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentPathMapper.Builder
builder()
String
fromLogicalPath(String logicalPath)
Returns a content path for the given logical path after sanitizing it and ensuring that it meets the configured content path constraints.
-
-
-
Constructor Detail
-
ContentPathMapper
public ContentPathMapper(LogicalPathMapper logicalPathMapper, ContentPathConstraintProcessor contentPathConstraintProcessor, String objectRootPath, String contentDirectory, VersionNum versionNum, RevisionNum revisionNum)
-
-
Method Detail
-
builder
public static ContentPathMapper.Builder builder()
-
fromLogicalPath
public String fromLogicalPath(String logicalPath)
Returns a content path for the given logical path after sanitizing it and ensuring that it meets the configured content path constraints.- Parameters:
logicalPath
- the logical path of the file in the object- Returns:
- the content path to store the file at
-
-