Class LocalNameMapper
java.lang.Object
org.apache.jackrabbit.oak.namepath.impl.GlobalNameMapper
org.apache.jackrabbit.oak.namepath.impl.LocalNameMapper
- All Implemented Interfaces:
NameMapper
Name mapper with local namespace mappings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetJcrName(@NotNull String oakName) Returns the JCR name for the given Oak name.@Nullable StringgetOakNameOrNull(@NotNull String jcrName) Returns the Oak name for the given JCR name, ornullif no such mapping exists because the given JCR name contains an unknown namespace URI or prefix, or is otherwise invalid.Returns the local namespace prefix mappings, or an empty map if there aren't any local mappings.Methods inherited from class org.apache.jackrabbit.oak.namepath.impl.GlobalNameMapper
getOakName, onSessionRefresh
-
Constructor Details
-
LocalNameMapper
-
LocalNameMapper
-
-
Method Details
-
getSessionLocalMappings
Description copied from interface:NameMapperReturns the local namespace prefix mappings, or an empty map if there aren't any local mappings.- Specified by:
getSessionLocalMappingsin interfaceNameMapper- Overrides:
getSessionLocalMappingsin classGlobalNameMapper- Returns:
- local namespace prefix to URI mappings
-
getJcrName
Description copied from interface:NameMapperReturns the JCR name for the given Oak name. The given name is expected to have come from a valid Oak repository that contains only valid names with proper namespace mappings. If that's not the case, either a programming error or a repository corruption has occurred and an appropriate unchecked exception gets thrown.- Specified by:
getJcrNamein interfaceNameMapper- Overrides:
getJcrNamein classGlobalNameMapper- Parameters:
oakName- Oak name- Returns:
- JCR name
-
getOakNameOrNull
Description copied from interface:NameMapperReturns the Oak name for the given JCR name, ornullif no such mapping exists because the given JCR name contains an unknown namespace URI or prefix, or is otherwise invalid.- Specified by:
getOakNameOrNullin interfaceNameMapper- Overrides:
getOakNameOrNullin classGlobalNameMapper- Parameters:
jcrName- JCR name- Returns:
- Oak name, or
null
-