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

Field Detail

ROLE

static final String ROLE
Role of the ResourceCollection component.


DEFAULT_ROLE_HINT

static final 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

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

Returns:
An iterator
Throws:
IOException - .

getName

String getName(PlexusIoResource resource)
               throws 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:
IOException - .

getLastModified

long getLastModified()
                     throws 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:
IOException - .


Copyright © 2001-2012 Codehaus. All Rights Reserved.