Package com.ibm.wsspi.artifact
Interface ArtifactEntry
- 
- All Superinterfaces:
- EnclosedEntity,- Entity
 
 public interface ArtifactEntry extends EnclosedEntity Represents an Entry within a Container. Note that Container does not require hashCode/equals, and thus should not be used as a key in HashMaps, etc.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ArtifactContainerconvertToContainer()Attempt to convert this entry into a Container.ArtifactContainerconvertToContainer(boolean localOnly)Attempt to convert this entry into a ArtifactContainer.java.io.InputStreamgetInputStream()Obtain inputstream for entry.longgetLastModified()Obtain the time that this entry was last modifiedjava.net.URLgetResource()This method should return a URL suitable for the ServletContext.getResource(String path) method.longgetSize()Obtain size of this Entries data, if any.- 
Methods inherited from interface com.ibm.wsspi.artifact.EnclosedEntitygetEnclosingContainer, getPath, getPhysicalPath, getRoot
 
- 
 
- 
- 
- 
Method Detail- 
convertToContainerArtifactContainer convertToContainer() Attempt to convert this entry into a Container.Returned container may be a new type of artifact, check ArtifactContainer.isRoot()on the return.- Returns:
- Container if conversion is possible, null otherwise.
 
 - 
convertToContainerArtifactContainer convertToContainer(boolean localOnly) Attempt to convert this entry into a ArtifactContainer.Returned container may be a new type of artifact, check ArtifactContainer.isRoot()on the return.- Parameters:
- localOnly- pass true if conversion should be restricted to returning Containers where isRoot returns false.
- Returns:
- ArtifactContainer if conversion is possible, null otherwise.
 
 - 
getInputStreamjava.io.InputStream getInputStream() throws java.io.IOExceptionObtain inputstream for entry.- Returns:
- inputStream if possible for this entry, or null otherwise.
- Throws:
- java.io.IOException- if there is supposed to be a stream, but an error occurred obtaining it.
 
 - 
getSizelong getSize() Obtain size of this Entries data, if any.- Returns:
- number of bytes this Entry represents.
 
 - 
getLastModifiedlong getLastModified() Obtain the time that this entry was last modified- Returns:
- A long value indicating the last modified time or 0L if the value is not available
 
 - 
getResourcejava.net.URL getResource() This method should return a URL suitable for the ServletContext.getResource(String path) method. If this Entry represents a container then this method will not work because some implementations of this API may map more than one location to a single container. Therefore to load all of the locations that contribute to a container you should do: Container container = entry.convertToContainer();
 if (container != null) {
 Collection<URI> allUrisForContainer = container.getUri();
 }
 This may return null if this Entry is a virtual container that does not have a real location on disk. - Returns:
- The URL pointing to this entry on disk
 
 
- 
 
-