org.codehaus.plexus.components.io.resources.proxy
Class PlexusIoProxyResourceCollection

java.lang.Object
  extended by org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
      extended by org.codehaus.plexus.components.io.resources.proxy.PlexusIoProxyResourceCollection
All Implemented Interfaces:
PlexusIoResourceCollection, PlexusIOResourceCollectionWithAttributes, org.codehaus.plexus.logging.LogEnabled

public class PlexusIoProxyResourceCollection
extends AbstractPlexusIoResourceCollection
implements PlexusIOResourceCollectionWithAttributes

Implementation of PlexusIoResourceCollection for an archives contents.


Field Summary
 
Fields inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection
DEFAULT_ROLE_HINT, ROLE
 
Constructor Summary
PlexusIoProxyResourceCollection()
           
 
Method Summary
protected  FileSelector getDefaultFileSelector()
           
 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.
 PlexusIoResourceCollection getSrc()
          Returns the archive to read.
 void setDefaultAttributes(int uid, String userName, int gid, String groupName, int fileMode, int dirMode)
          Sets the file and directory attributes to use as defaults.
 void setOverrideAttributes(int uid, String userName, int gid, String groupName, int fileMode, int dirMode)
          Sets the file and directory attributes to use as overrides.
 void setSrc(PlexusIoResourceCollection src)
          Sets the archive to read.
 
Methods inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
enableLogging, getExcludes, getFileMappers, getFileSelectors, getIncludes, getLogger, getPrefix, isCaseSensitive, isIncludingEmptyDirectories, isSelected, isUsingDefaultExcludes, setCaseSensitive, setExcludes, setFileMappers, setFileSelectors, setIncludes, setIncludingEmptyDirectories, setPrefix, setUsingDefaultExcludes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlexusIoProxyResourceCollection

public PlexusIoProxyResourceCollection()
Method Detail

setSrc

public void setSrc(PlexusIoResourceCollection src)
Sets the archive to read.


getSrc

public PlexusIoResourceCollection getSrc()
Returns the archive to read.


getDefaultFileSelector

protected FileSelector getDefaultFileSelector()

getResources

public Iterator<PlexusIoResource> getResources()
                                        throws IOException
Description copied from interface: PlexusIoResourceCollection
Returns an iterator over the resources in the collection.

Specified by:
getResources in interface PlexusIoResourceCollection
Returns:
An iterator
Throws:
IOException - .

getName

public String getName(PlexusIoResource resource)
               throws IOException
Description copied from interface: PlexusIoResourceCollection
Returns the resources suggested name. This is used for integrating file mappers.

Specified by:
getName in interface PlexusIoResourceCollection
Overrides:
getName in class AbstractPlexusIoResourceCollection
Parameters:
resource - A resource, which has been obtained by calling PlexusIoResourceCollection.getResources().
Returns:
The resource name
Throws:
IOException - .

getLastModified

public long getLastModified()
                     throws IOException
Description copied from interface: PlexusIoResourceCollection
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.

Specified by:
getLastModified in interface PlexusIoResourceCollection
Overrides:
getLastModified in class AbstractPlexusIoResourceCollection
Returns:
PlexusIoResource.UNKNOWN_MODIFICATION_DATE, if the collections last modification time is unknown, otherwise the last modification time in milliseconds.
Throws:
IOException - .

setDefaultAttributes

public void setDefaultAttributes(int uid,
                                 String userName,
                                 int gid,
                                 String groupName,
                                 int fileMode,
                                 int dirMode)
Description copied from interface: PlexusIOResourceCollectionWithAttributes
Sets the file and directory attributes to use as defaults.

Specified by:
setDefaultAttributes in interface PlexusIOResourceCollectionWithAttributes
fileMode - The octal mode to use for files
dirMode - The octal mode to use for directories

setOverrideAttributes

public void setOverrideAttributes(int uid,
                                  String userName,
                                  int gid,
                                  String groupName,
                                  int fileMode,
                                  int dirMode)
Description copied from interface: PlexusIOResourceCollectionWithAttributes
Sets the file and directory attributes to use as overrides.

Specified by:
setOverrideAttributes in interface PlexusIOResourceCollectionWithAttributes
fileMode - The octal mode to use for files
dirMode - The octal mode to use for directories


Copyright © 2001-2011 Codehaus. All Rights Reserved.