com.noelios.restlet.ext.servlet
Class ServletWarEntity

java.lang.Object
  extended by com.noelios.restlet.local.Entity
      extended by com.noelios.restlet.ext.servlet.ServletWarEntity

public class ServletWarEntity
extends Entity

Local entity based on a Servlet context's resource file.

Author:
Thierry Boileau

Constructor Summary
ServletWarEntity(ServletContext servletContext, java.lang.String path)
          Constructor.
 
Method Summary
 boolean exists()
           
 java.util.List<Entity> getChildren()
           
 java.lang.String getName()
           
 Entity getParent()
           
 Representation getRepresentation(MediaType defaultMediaType, int timeToLive)
           
 ServletContext getServletContext()
          Returns the Servlet context to use.
 boolean isDirectory()
           
 boolean isNormal()
           
 
Methods inherited from class com.noelios.restlet.local.Entity
getBaseName, getBaseName, getExtensions, getExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletWarEntity

public ServletWarEntity(ServletContext servletContext,
                        java.lang.String path)
Constructor.

Parameters:
servletContext - The parent Servlet context.
path - The entity path.
Method Detail

exists

public boolean exists()
Specified by:
exists in class Entity

getChildren

public java.util.List<Entity> getChildren()
Specified by:
getChildren in class Entity

getName

public java.lang.String getName()
Specified by:
getName in class Entity

getParent

public Entity getParent()
Specified by:
getParent in class Entity

getRepresentation

public Representation getRepresentation(MediaType defaultMediaType,
                                        int timeToLive)
Specified by:
getRepresentation in class Entity

getServletContext

public ServletContext getServletContext()
Returns the Servlet context to use.

Returns:
The Servlet context to use.

isDirectory

public boolean isDirectory()
Specified by:
isDirectory in class Entity

isNormal

public boolean isNormal()
Specified by:
isNormal in class Entity


Copyright © 2005-2008 Noelios Technologies.