com.ibm.wsspi.adaptable.module

Interface Entry

All Superinterfaces:
Adaptable

  1. public interface Entry
  2. extends Adaptable
An adaptable entry.

Method Summary

Modifier and Type Method and Description
  1. Container
getEnclosingContainer()
Gets the container this entry lives in..
  1. long
getLastModified()
Obtain the time that this entry was last modified
  1. java.lang.String
getName()
Gets the name of this entry.
  1. java.lang.String
getPath()
Gets the path of this entry.
  1. java.lang.String
getPhysicalPath()
Deprecated. added purely to support getRealPath on ServletContext ..
  1. java.net.URL
getResource()
This method should return a URL suitable for the ServletContext.getResource(String path) method.
  1. Container
getRoot()
Gets the Container that represents the root of this Entries hierarchy.
  1. long
getSize()
Obtain size of this Entries data, if any.
Methods inherited from interface com.ibm.wsspi.adaptable.module.Adaptable
adapt

Method Detail

getName

  1. java.lang.String getName()
Gets the name of this entry.
Returns:
name of Entry

getPath

  1. java.lang.String getPath()
Gets the path of this entry.
Returns:
path of Entry

getSize

  1. long getSize()
Obtain size of this Entries data, if any.
Returns:
number of bytes this Entry represents.

getLastModified

  1. long 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

getResource

  1. 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.

Returns:
The URL pointing to this entry on disk
See Also:
ServletContext.getResource(String path)

getPhysicalPath

  1. @Deprecated
  2. java.lang.String getPhysicalPath( )
Deprecated. added purely to support getRealPath on ServletContext ..

Get path for this Entity. Not all implementations of this interface need to support this method and should return null if they do not support them.

If the entry is container within an archive file such as a JAR or ZIP then this will return null.

For directories that have more than one physical location mapped to them then this will return the first mapped resource.

Returns:
String representing physical path on disk for this entity.. null if there is none. null is very possible.

getEnclosingContainer

  1. Container getEnclosingContainer( )
Gets the container this entry lives in..
Returns:
container this entry lives in..

getRoot

  1. Container getRoot()
Gets the Container that represents the root of this Entries hierarchy. eg. the Container with path "/".
Returns:
container representing /