Class w3c.jigsaw.resources.ContainerResource
All Packages Class Hierarchy This Package Previous Next Index
Class w3c.jigsaw.resources.ContainerResource
java.lang.Object
|
+----w3c.jigsaw.resources.AttributeHolder
|
+----w3c.jigsaw.resources.Resource
|
+----w3c.jigsaw.resources.HTTPResource
|
+----w3c.jigsaw.resources.ContainerResource
- public class ContainerResource
- extends HTTPResource
The ContainerResource is a resource that can have children.
This resource implements the basic HTTP lookup, through a three stage
process:
- Given a request, create an appropriate LookupState object, that will
handle the state of the lookup operation.
- Loop along the container resources we encounter, checking access
authorization along the way. At each step, we invoke the current target
lookup method with the current lookup state as a parameter.
- Return the located target resource.
Sub-classes of this class can redefine both of the lookup methods,
depending on their needs (eg a proxying resource will redefine the one
that takes a request as an argument, while a directory resource, will
just redefine the second one).
This class does not make any assumption on the actual policy
used to store and retreive the container childrens.
- See Also:
- LookupState, DirectoryResource
-
ContainerResource()
-
-
checkAccess(LookupState)
- Is the request allowed to visit this container at all ?
-
lookup(LookupState)
- Lookup the next component of this lookup state in here.
-
lookup(Request)
- Lookup the target of this request, starting from here.
ContainerResource
public ContainerResource()
checkAccess
public void checkAccess(LookupState state) throws HTTPException
- Is the request allowed to visit this container at all ?
- Parameters:
- request - The request that is being looked up.
- Throws: HTTPException
- If access is denied.
lookup
public HTTPResource lookup(LookupState state) throws HTTPException
- Lookup the next component of this lookup state in here.
- Parameters:
- state - The current lookup state.
- Returns:
- A resource instance, or null if no match
was found.
lookup
public HTTPResource lookup(Request request) throws HTTPException
- Lookup the target of this request, starting from here.
- Parameters:
- request - The request whose target is to be looked up.
- Throws: HTTPException
- If we couldn't locate the target, or parse
thee requested URI.
All Packages Class Hierarchy This Package Previous Next Index