Interface NameMapper
- All Known Subinterfaces:
NamePathMapper
- All Known Implementing Classes:
GlobalNameMapper,LocalNameMapper,NamePathMapper.Default,NamePathMapperImpl
TODO document
-
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetJcrName(@NotNull String oakName) Returns the JCR name for the given Oak name.@NotNull StringgetOakName(@NotNull String jcrName) Returns the Oak name for the specified JCR 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.
-
Method Details
-
getOakNameOrNull
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.- Parameters:
jcrName- JCR name- Returns:
- Oak name, or
null
-
getOakName
Returns the Oak name for the specified JCR name. In contrast togetOakNameOrNull(String)this method will throw aRepositoryExceptionif the JCR name is invalid and cannot be resolved.- Parameters:
jcrName- The JCR name to be converted.- Returns:
- A valid Oak name.
- Throws:
RepositoryException- If the JCR name cannot be resolved.
-
getSessionLocalMappings
Returns the local namespace prefix mappings, or an empty map if there aren't any local mappings.- Returns:
- local namespace prefix to URI mappings
-
getJcrName
Returns 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.- Parameters:
oakName- Oak name- Returns:
- JCR name
-