org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr
Class XpandProtectedRegionResolver

java.lang.Object
  extended by org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver

public class XpandProtectedRegionResolver
extends java.lang.Object


Nested Class Summary
 class XpandProtectedRegionResolver.XpandProtectedRegion
           
 
Field Summary
static java.lang.String XPAND_PROTECTED_REGION_RESOLVER
           
 
Constructor Summary
XpandProtectedRegionResolver()
           
XpandProtectedRegionResolver(java.lang.String ignoreList, boolean defaultExcludes, java.util.List<Outlet> outlets, java.lang.String fileEncoding, boolean useBase64)
           
 
Method Summary
 XpandProtectedRegionResolver.XpandProtectedRegion createProtectedRegion(java.lang.String id, boolean disabled)
          Factory method to create an XpandProtectedRegion
 XpandProtectedRegionResolver.XpandProtectedRegion getProtectedRegion(java.lang.String id)
           
 void init()
          Initializes the XpandProtectedRegionResolver.
 boolean isRegistered(XpandProtectedRegionResolver.XpandProtectedRegion region)
           
 void register(XpandProtectedRegionResolver.XpandProtectedRegion region)
          Register a protected region under it's ID
 void reportRegions(java.io.File dumpPath)
          Dumps all known protected regions to files.
 void setDefaultExcludes(boolean defaultExcludes)
          This flag determines whether default file exclusion patterns should be used.
 void setFileEncoding(java.lang.String encoding)
          Sets the file encoding to be used when reading files.
 void setIgnoreList(java.lang.String ignoreList)
          Sets a custom list of file patterns that should be filtered during scanning of source files and directories.
 void setSrcPathes(java.lang.String srcPathsAsString)
          Sets the source paths that should be scanned.
 void setUseBASE64(boolean useBASE64)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XPAND_PROTECTED_REGION_RESOLVER

public static final java.lang.String XPAND_PROTECTED_REGION_RESOLVER
See Also:
Constant Field Values
Constructor Detail

XpandProtectedRegionResolver

public XpandProtectedRegionResolver()

XpandProtectedRegionResolver

public XpandProtectedRegionResolver(java.lang.String ignoreList,
                                    boolean defaultExcludes,
                                    java.util.List<Outlet> outlets,
                                    java.lang.String fileEncoding,
                                    boolean useBase64)
Method Detail

init

public void init()
          throws DuplicateXpandProtectedRegionException
Initializes the XpandProtectedRegionResolver. This starts the scan over all configured paths (property 'srcPaths').

A second call (already initialized) to this method will return immediately. The method should be called lazily.

Throws:
DuplicateXpandProtectedRegionException - If a Protected Region Id is detected the second time, i.e. it is not unique.

getProtectedRegion

public XpandProtectedRegionResolver.XpandProtectedRegion getProtectedRegion(java.lang.String id)

createProtectedRegion

public XpandProtectedRegionResolver.XpandProtectedRegion createProtectedRegion(java.lang.String id,
                                                                               boolean disabled)
Factory method to create an XpandProtectedRegion


register

public void register(XpandProtectedRegionResolver.XpandProtectedRegion region)
              throws DuplicateXpandProtectedRegionException
Register a protected region under it's ID

Parameters:
region -
Throws:
DuplicateXpandProtectedRegionException

isRegistered

public boolean isRegistered(XpandProtectedRegionResolver.XpandProtectedRegion region)

reportRegions

public void reportRegions(java.io.File dumpPath)
Dumps all known protected regions to files. For each protected region a file is created.

Parameters:
dumpPath - Directory where the dump files are created within.

setDefaultExcludes

public void setDefaultExcludes(boolean defaultExcludes)
This flag determines whether default file exclusion patterns should be used.

Parameters:
defaultExcludes - true: Use default file exclusion patterns, false: ignore them, just use the patterns specified by ignoreList
See Also:
reference manual

setFileEncoding

public void setFileEncoding(java.lang.String encoding)
Sets the file encoding to be used when reading files.

Parameters:
encoding - A valid encoding string.

setIgnoreList

public void setIgnoreList(java.lang.String ignoreList)
Sets a custom list of file patterns that should be filtered during scanning of source files and directories.

Parameters:
ignoreList - A comma separated list of file patterns to ignore during scan.

setSrcPathes

public void setSrcPathes(java.lang.String srcPathsAsString)
                  throws java.lang.IllegalArgumentException
Sets the source paths that should be scanned.

Parameters:
srcPathsAsString - A comma separated list of directory paths.
Throws:
java.lang.IllegalArgumentException - If one of the passed arguments is not a directory or does not exist

setUseBASE64

public void setUseBASE64(boolean useBASE64)