public abstract class AbstractResource<T extends ResourceType> extends Object implements Resource
| Constructor and Description |
|---|
AbstractResource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkGuard(String guard)
Checks the given guard expression in the context of this resource.
|
void |
dispose() |
AdapterResource |
getActiveAdapter()
Returns the active Adapter on this object if any in the current request.
|
<A> A |
getAdapter(Class<A> adapter)
Returns an object which is an instance of the given class
associated with this object.
|
WebContext |
getContext() |
Set<String> |
getFacets() |
List<LinkDescriptor> |
getLinks(String category) |
Module |
getModule() |
String |
getName() |
Resource |
getNext() |
String |
getNextSegment() |
String |
getPath() |
Resource |
getPrevious() |
Template |
getTemplate(String fileName) |
String |
getTrailingPath() |
T |
getType() |
String |
getURL() |
Template |
getView(String viewId) |
boolean |
hasFacet(String facet) |
Resource |
initialize(WebContext ctx,
ResourceType type,
Object... args) |
boolean |
isAdapter() |
boolean |
isInstanceOf(String type) |
boolean |
isRoot() |
AdapterResource |
newAdapter(String type,
Object... args) |
Resource |
newObject(String type,
Object... args) |
Response |
redirect(String uri) |
void |
setNext(Resource next) |
void |
setPrevious(Resource previous) |
void |
setRoot(boolean isRoot) |
String |
toString() |
public Resource initialize(WebContext ctx, ResourceType type, Object... args)
initialize in interface Resourcepublic boolean isInstanceOf(String type)
isInstanceOf in interface Resourcepublic AdapterResource getActiveAdapter()
ResourcegetActiveAdapter in interface Resourcepublic WebContext getContext()
getContext in interface Resourcepublic Resource getPrevious()
getPrevious in interface Resourcepublic void setPrevious(Resource previous)
setPrevious in interface Resourcepublic String getTrailingPath()
getTrailingPath in interface Resourcepublic String getNextSegment()
getNextSegment in interface Resourcepublic List<LinkDescriptor> getLinks(String category)
public <A> A getAdapter(Class<A> adapter)
Adaptablenull if
no such object can be found.getAdapter in interface Adaptableadapter - the adapter class to look upnull if this object does not
have an adapter for the given classpublic AdapterResource newAdapter(String type, Object... args)
newAdapter in interface Resourcepublic Template getTemplate(String fileName)
getTemplate in interface Resourcepublic boolean checkGuard(String guard) throws ParseException
ResourcecheckGuard in interface ResourceParseExceptionCopyright © 2013 Nuxeo SA. All Rights Reserved.