|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ArtifactEntry
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 Summary | |
---|---|
ArtifactContainer |
convertToContainer()
Attempt to convert this entry into a Container. |
ArtifactContainer |
convertToContainer(boolean localOnly)
Attempt to convert this entry into a ArtifactContainer. |
java.io.InputStream |
getInputStream()
Obtain inputstream for entry. |
long |
getLastModified()
Obtain the time that this entry was last modified |
java.net.URL |
getResource()
This method should return a URL suitable for the ServletContext.getResource(String path) method. |
long |
getSize()
Obtain size of this Entries data, if any. |
Methods inherited from interface com.ibm.wsspi.artifact.EnclosedEntity |
---|
getEnclosingContainer, getPath, getPhysicalPath, getRoot |
Methods inherited from interface com.ibm.wsspi.artifact.Entity |
---|
getName |
Method Detail |
---|
ArtifactContainer convertToContainer()
Returned container may be a new type of artifact, check ArtifactContainer.isRoot()
on the return.
ArtifactContainer convertToContainer(boolean localOnly)
Returned container may be a new type of artifact, check ArtifactContainer.isRoot()
on the return.
localOnly
- pass true if conversion should be restricted to returning Containers where isRoot returns false.
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
- if there is supposed to be a stream, but an error occurred obtaining it.long getSize()
long getLastModified()
java.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.
ServletContext.getResource(String path)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |