org.codehaus.plexus.components.io.resources
Interface PlexusIoResourceCollection

All Known Subinterfaces:
PlexusIoArchivedResourceCollection
All Known Implementing Classes:
AbstractPlexusIoArchiveResourceCollection, AbstractPlexusIoResourceCollection, PlexusIoCompressedFileResourceCollection, PlexusIoFileResourceCollection, PlexusIoProxyResourceCollection, PlexusIoZipFileResourceCollection

public interface PlexusIoResourceCollection

A resource collection is a set of PlexusIoResource instances.


Field Summary
static java.lang.String DEFAULT_ROLE_HINT
          Role hint of the default resource collection, which is a set of files in a base directory.
static java.lang.String ROLE
          Role of the ResourceCollection component.
 
Method Summary
 long getLastModified()
          Returns the collections last modification time.
 java.lang.String getName(PlexusIoResource resource)
          Returns the resources suggested name.
 java.util.Iterator<PlexusIoResource> getResources()
          Returns an iterator over the resources in the collection.
 

Field Detail

ROLE

static final java.lang.String ROLE
Role of the ResourceCollection component.


DEFAULT_ROLE_HINT

static final java.lang.String DEFAULT_ROLE_HINT
Role hint of the default resource collection, which is a set of files in a base directory.

See Also:
Constant Field Values
Method Detail

getResources

java.util.Iterator<PlexusIoResource> getResources()
                                                  throws java.io.IOException
Returns an iterator over the resources in the collection.

Returns:
An iterator
Throws:
java.io.IOException - .

getName

java.lang.String getName(PlexusIoResource resource)
                         throws java.io.IOException
Returns the resources suggested name. This is used for integrating file mappers.

Parameters:
resource - A resource, which has been obtained by calling getResources().
Returns:
The resource name
Throws:
java.io.IOException - .

getLastModified

long getLastModified()
                     throws java.io.IOException
Returns the collections last modification time. For a collection of files, this might be the last modification time of the file, which has been modified at last. For an archive file, this might be the modification time of the archive file.

Returns:
PlexusIoResource.UNKNOWN_MODIFICATION_DATE, if the collections last modification time is unknown, otherwise the last modification time in milliseconds.
Throws:
java.io.IOException - .


Copyright © 2001-2011 Codehaus. All Rights Reserved.