Package org.alfresco.util
Class PathMapper
- java.lang.Object
-
- org.alfresco.util.PathMapper
-
public class PathMapper extends Object
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 Constructor Description PathMapper()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPathMap(String sourcePath, String targetPath)Add a path mapping.voidclear()<V> Map<String,V>convertMap(Map<String,V> valueMap)Set<String>getMappedPaths(String sourcePath)Gets the remapped paths for the given source path, excluding any derivative paths i.e.Set<String>getMappedPathsWithPartialMatch(String sourcePath)Gets the remapped paths for the given source path, including any derivative paths i.e.booleanisEmpty()voidlock()Locks the instance against further modifications.
-
-
-
Method Detail
-
lock
public void lock()
Locks the instance against further modifications.
-
clear
public void clear()
-
addPathMap
public void addPathMap(String sourcePath, String targetPath)
Add a path mapping.- Parameters:
sourcePath- the source pathtargetPath- the target path
-
getMappedPaths
public Set<String> getMappedPaths(String sourcePath)
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
public Set<String> getMappedPathsWithPartialMatch(String sourcePath)
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()
-
-