org.alfresco.util
Class PathMapper

java.lang.Object
  extended by org.alfresco.util.PathMapper

public class PathMapper
extends java.lang.Object

A component that maps source data paths to target data paths.

This class caches results and is thread-safe.

Since:
3.2

Constructor Summary
PathMapper()
          Default constructor
 
Method Summary
 void addPathMap(java.lang.String sourcePath, java.lang.String targetPath)
          Add a path mapping.
 void clear()
           
 java.util.Map convertMap(java.util.Map valueMap)
           
 java.util.Set getMappedPaths(java.lang.String sourcePath)
          Gets the remapped paths for the given source path, excluding any derivative paths i.e.
 java.util.Set getMappedPathsWithPartialMatch(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathMapper

public PathMapper()
Default constructor

Method Detail

lock

public void lock()
Locks the instance against further modifications.


clear

public void clear()

addPathMap

public void addPathMap(java.lang.String sourcePath,
                       java.lang.String targetPath)
Add a path mapping.

Parameters:
sourcePath - the source path
targetPath - the target path

getMappedPaths

public java.util.Set getMappedPaths(java.lang.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 java.util.Set getMappedPathsWithPartialMatch(java.lang.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()

convertMap

public java.util.Map convertMap(java.util.Map valueMap)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.