|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.internal.xpand2.pr.ProtectedRegionResolverImpl
public class ProtectedRegionResolverImpl
Default implementation of the ProtectedRegionResolver
interface.
Nested Class Summary | |
---|---|
static class |
ProtectedRegionResolverImpl.ProtectedRegionImpl
|
Field Summary | |
---|---|
protected java.lang.String |
encoding
|
protected boolean |
useBASE64
|
Constructor Summary | |
---|---|
ProtectedRegionResolverImpl()
|
Method Summary | |
---|---|
ProtectedRegion |
createProtectedRegion(java.lang.String id,
boolean disabled)
Creates a ProtectedRegion instance. |
protected java.util.Collection<ProtectedRegionResolverImpl.ProtectedRegionImpl> |
getAllRegions(java.io.File file)
Retrieves all Protected Regions from a source file. |
ProtectedRegion |
getProtectedRegion(java.lang.String id)
Retrieve a ProtectedRegion by its Id. |
void |
init()
Initializes the ProtectedRegionResolver. |
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 |
---|
protected boolean useBASE64
protected java.lang.String encoding
Constructor Detail |
---|
public ProtectedRegionResolverImpl()
Method Detail |
---|
protected java.util.Collection<ProtectedRegionResolverImpl.ProtectedRegionImpl> getAllRegions(java.io.File file) throws ProtectedRegionSyntaxException, java.io.IOException
file
- The source file to scan.
ProtectedRegionSyntaxException
- If one of the Protected Regions in the file is incomplete or invalid.
java.io.IOException
- On errors occuring when reading the filepublic ProtectedRegion createProtectedRegion(java.lang.String id, boolean disabled)
ProtectedRegionResolver
ProtectedRegion
instance.
createProtectedRegion
in interface ProtectedRegionResolver
id
- The Protected Region's Id.disabled
- The Protected Region's activation status ( true
: disabled, false
: enabled)
public ProtectedRegion getProtectedRegion(java.lang.String id)
ProtectedRegionResolver
ProtectedRegion
by its Id.
getProtectedRegion
in interface ProtectedRegionResolver
id
- The Id of the ProtectedRegion
searched for.
null
if the Protected
Region is not known to the Resolver.public void init() throws java.lang.IllegalStateException
A second call (already initialized) to this method will return immediately.
java.lang.IllegalStateException
- If a Protected Region Id is detected the second time, i.e. it is not unique.public void reportRegions(java.io.File dumpPath)
dumpPath
- Directory where the dump files are created within.public void setDefaultExcludes(boolean defaultExcludes)
defaultExcludes
- true
: Use default file exclusion patterns, false
: ignore them, just use
the patterns specified by ignoreList
public void setFileEncoding(java.lang.String encoding)
encoding
- A valid encoding string.public void setIgnoreList(java.lang.String ignoreList)
ignoreList
- A comma separated list of file patterns to ignore during scan.public void setSrcPathes(java.lang.String srcPathsAsString) throws java.lang.IllegalArgumentException
srcPathsAsString
- A comma separated list of directory paths.
java.lang.IllegalArgumentException
- If one of the passed arguments is not a directory or does not
existpublic void setUseBASE64(boolean useBASE64)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |