public abstract class AbstractPlexusIoResourceCollection extends java.lang.Object implements PlexusIoResourceCollection
Modifier and Type | Class and Description |
---|---|
(package private) static class |
AbstractPlexusIoResourceCollection.IdentityTransformer |
Modifier and Type | Field and Description |
---|---|
private boolean |
caseSensitive |
private java.lang.String[] |
excludes |
private FileMapper[] |
fileMappers |
private FileSelector[] |
fileSelectors |
static InputStreamTransformer |
identityTransformer |
private java.lang.String[] |
includes |
private boolean |
includingEmptyDirectories |
private java.lang.String |
prefix |
private InputStreamTransformer |
streamTransformer |
private boolean |
usingDefaultExcludes |
DEFAULT_ROLE_HINT, ROLE
Modifier | Constructor and Description |
---|---|
protected |
AbstractPlexusIoResourceCollection() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getExcludes()
Returns a string of patterns, which excluded files
should match.
|
FileMapper[] |
getFileMappers()
Returns the file name mappers, which are used to transform
the resource names.
|
FileSelector[] |
getFileSelectors()
Returns a set of file selectors, which should be used
to select the included files.
|
java.lang.String[] |
getIncludes()
Returns a string of patterns, which included files
should match.
|
java.io.InputStream |
getInputStream(PlexusIoResource resource)
Returns an input stream for the provided resource, with stream transformers applied
|
long |
getLastModified()
Returns the collections last modification time.
|
java.lang.String |
getName(PlexusIoResource resource)
Returns the resources suggested name.
|
protected java.lang.String |
getName(java.lang.String resourceName) |
java.lang.String |
getPrefix()
Returns the prefix, which the file sets contents shall
have.
|
protected InputStreamTransformer |
getStreamTransformer() |
boolean |
isCaseSensitive()
Returns, whether the include/exclude patterns are
case sensitive.
|
boolean |
isIncludingEmptyDirectories()
Returns, whether empty directories are being included.
|
protected boolean |
isSelected(PlexusIoResource plexusIoResource) |
boolean |
isUsingDefaultExcludes()
Returns, whether the default excludes are being
applied.
|
java.util.Iterator<PlexusIoResource> |
iterator() |
PlexusIoResource |
resolve(PlexusIoResource resource)
Resolves the supplied resource into a "real" resource.
|
void |
setCaseSensitive(boolean caseSensitive)
Sets, whether the include/exclude patterns are
case sensitive.
|
void |
setExcludes(java.lang.String[] excludes)
Sets a string of patterns, which excluded files
should match.
|
void |
setFileMappers(FileMapper[] fileMappers)
Sets the file name mappers, which are used to transform
the resource names.
|
void |
setFileSelectors(FileSelector[] fileSelectors)
Sets a set of file selectors, which should be used
to select the included files.
|
void |
setIncludes(java.lang.String[] includes)
Sets a string of patterns, which included files
should match.
|
void |
setIncludingEmptyDirectories(boolean includingEmptyDirectories)
Sets, whether empty directories are being included.
|
void |
setPrefix(java.lang.String prefix)
Sets the prefix, which the file sets contents shall
have.
|
void |
setStreamTransformer(InputStreamTransformer streamTransformer) |
void |
setUsingDefaultExcludes(boolean usingDefaultExcludes)
Sets, whether the default excludes are being
applied.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResources, isConcurrentAccessSupported, stream
public static final InputStreamTransformer identityTransformer
private java.lang.String prefix
private java.lang.String[] includes
private java.lang.String[] excludes
private FileSelector[] fileSelectors
private boolean caseSensitive
private boolean usingDefaultExcludes
private boolean includingEmptyDirectories
private FileMapper[] fileMappers
private InputStreamTransformer streamTransformer
protected AbstractPlexusIoResourceCollection()
public void setExcludes(java.lang.String[] excludes)
public java.lang.String[] getExcludes()
public void setFileSelectors(FileSelector[] fileSelectors)
public FileSelector[] getFileSelectors()
public void setStreamTransformer(InputStreamTransformer streamTransformer)
protected InputStreamTransformer getStreamTransformer()
public void setIncludes(java.lang.String[] includes)
public java.lang.String[] getIncludes()
public void setPrefix(java.lang.String prefix)
public java.lang.String getPrefix()
public void setCaseSensitive(boolean caseSensitive)
public boolean isCaseSensitive()
public void setUsingDefaultExcludes(boolean usingDefaultExcludes)
public boolean isUsingDefaultExcludes()
public void setIncludingEmptyDirectories(boolean includingEmptyDirectories)
public boolean isIncludingEmptyDirectories()
protected boolean isSelected(PlexusIoResource plexusIoResource) throws java.io.IOException
java.io.IOException
public FileMapper[] getFileMappers()
public void setFileMappers(FileMapper[] fileMappers)
public java.util.Iterator<PlexusIoResource> iterator()
iterator
in interface java.lang.Iterable<PlexusIoResource>
public java.lang.String getName(PlexusIoResource resource)
PlexusIoResourceCollection
getName
in interface PlexusIoResourceCollection
resource
- A resource, which has been obtained by
calling PlexusIoResourceCollection.getResources()
.protected java.lang.String getName(java.lang.String resourceName)
public java.io.InputStream getInputStream(PlexusIoResource resource) throws java.io.IOException
PlexusIoResourceCollection
getInputStream
in interface PlexusIoResourceCollection
resource
- The resourcesjava.io.IOException
- when something goes badpublic PlexusIoResource resolve(PlexusIoResource resource) throws java.io.IOException
PlexusIoResourceCollection
resolve
in interface PlexusIoResourceCollection
resource
- The resourcesjava.io.IOException
- when something goes badpublic long getLastModified() throws java.io.IOException
PlexusIoResourceCollection
getLastModified
in interface PlexusIoResourceCollection
PlexusIoResource.UNKNOWN_MODIFICATION_DATE
,
if the collections last modification time is unknown,
otherwise the last modification time in milliseconds.java.io.IOException
- .