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

All Known Subinterfaces:
PlexusIoArchivedResourceCollection
All Known Implementing Classes:
AbstractPlexusIoArchiveResourceCollection, AbstractPlexusIoResourceCollection, PlexusIoCompressedFileResourceCollection

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 getResources()
          Returns an iterator over the resources in the collection.
 

Field Detail

ROLE

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


DEFAULT_ROLE_HINT

public 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

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

Throws:
java.io.IOException

getName

public 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().
Throws:
java.io.IOException

getLastModified

public 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-2009 Codehaus. All Rights Reserved.