Package org.alfresco.util
Class PathMapper
java.lang.Object
org.alfresco.util.PathMapper
A component that maps source data paths to target data paths.
This class caches results and is thread-safe.
- Since:
- 3.2
- Author:
- Derek Hulley
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPathMap
(String sourcePath, String targetPath) Add a path mapping.void
clear()
convertMap
(Map<String, V> valueMap) getMappedPaths
(String sourcePath) Gets the remapped paths for the given source path, excluding any derivative paths i.e.getMappedPathsWithPartialMatch
(String sourcePath) Gets the remapped paths for the given source path, including any derivative paths i.e.boolean
isEmpty()
void
lock()
Locks the instance against further modifications.
-
Constructor Details
-
PathMapper
public PathMapper()Default constructor
-
-
Method Details
-
lock
public void lock()Locks the instance against further modifications. -
clear
public void clear() -
addPathMap
Add a path mapping.- Parameters:
sourcePath
- the source pathtargetPath
- the target path
-
getMappedPaths
Gets the remapped paths for the given source path, excluding any derivative paths i.e. does exact path matching only.- Parameters:
sourcePath
- the source path- Returns:
- Returns the target paths (never null)
-
getMappedPathsWithPartialMatch
Gets the remapped paths for the given source path, including any derivative paths i.e. does partial path matching.- Parameters:
sourcePath
- the source path- Returns:
- Returns the target paths (never null)
-
isEmpty
public boolean isEmpty() -
convertMap
-