public abstract class AbstractPlexusIoResourceCollection extends Object implements PlexusIoResourceCollection
Modifier and Type | Field and Description |
---|---|
static InputStreamTransformer |
identityTransformer |
DEFAULT_ROLE_HINT, ROLE
Modifier | Constructor and Description |
---|---|
protected |
AbstractPlexusIoResourceCollection() |
Modifier and Type | Method and Description |
---|---|
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.
|
String[] |
getIncludes()
Returns a string of patterns, which included files
should match.
|
InputStream |
getInputStream(PlexusIoResource resource)
Returns an input stream for the provided resource, with stream transformers applied
|
long |
getLastModified()
Returns the collections last modification time.
|
String |
getName(PlexusIoResource resource)
Returns the resources suggested name.
|
protected String |
getName(String resourceName) |
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.
|
Iterator<PlexusIoResource> |
iterator() |
PlexusIoResource |
resolve(PlexusIoResource resource)
Resolves the supplide resource into a "real" resource.
|
void |
setCaseSensitive(boolean caseSensitive)
Sets, whether the include/exclude patterns are
case sensitive.
|
void |
setExcludes(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(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(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
public static final InputStreamTransformer identityTransformer
protected AbstractPlexusIoResourceCollection()
public void setExcludes(String[] excludes)
public String[] getExcludes()
public void setFileSelectors(FileSelector[] fileSelectors)
public FileSelector[] getFileSelectors()
public void setStreamTransformer(InputStreamTransformer streamTransformer)
protected InputStreamTransformer getStreamTransformer()
public void setIncludes(String[] includes)
public String[] getIncludes()
public void setPrefix(String prefix)
public 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 IOException
IOException
public FileMapper[] getFileMappers()
public void setFileMappers(FileMapper[] fileMappers)
public Iterator<PlexusIoResource> iterator()
iterator
in interface Iterable<PlexusIoResource>
public String getName(PlexusIoResource resource)
PlexusIoResourceCollection
getName
in interface PlexusIoResourceCollection
resource
- A resource, which has been obtained by
calling PlexusIoResourceCollection.getResources()
.public InputStream getInputStream(PlexusIoResource resource) throws IOException
PlexusIoResourceCollection
getInputStream
in interface PlexusIoResourceCollection
resource
- The resourcesIOException
- when something goes badpublic PlexusIoResource resolve(PlexusIoResource resource) throws IOException
PlexusIoResourceCollection
resolve
in interface PlexusIoResourceCollection
resource
- The resourcesIOException
- when something goes badpublic long getLastModified() throws 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.IOException
- .Copyright © 2001-2014 Codehaus. All Rights Reserved.