public abstract class AbstractResource<T extends ResourceType> extends Object implements Resource
Modifier and Type | Field and Description |
---|---|
protected WebContext |
ctx |
protected AbstractResource<?> |
next |
protected String |
path |
protected AbstractResource<?> |
prev |
protected T |
type |
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) |
protected void |
initialize(Object... args) |
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) |
javax.ws.rs.core.Response |
redirect(String uri) |
void |
setNext(Resource next) |
void |
setPrevious(Resource previous) |
void |
setRoot(boolean isRoot) |
String |
toString() |
protected WebContext ctx
protected AbstractResource<?> next
protected AbstractResource<?> prev
protected T extends ResourceType type
public AbstractResource()
public Resource initialize(WebContext ctx, ResourceType type, Object... args)
initialize
in interface Resource
protected void initialize(Object... args)
public boolean isInstanceOf(String type)
isInstanceOf
in interface Resource
public AdapterResource getActiveAdapter()
Resource
getActiveAdapter
in interface Resource
public WebContext getContext()
getContext
in interface Resource
public Resource getPrevious()
getPrevious
in interface Resource
public void setPrevious(Resource previous)
setPrevious
in interface Resource
public String getTrailingPath()
getTrailingPath
in interface Resource
public String getNextSegment()
getNextSegment
in interface Resource
public List<LinkDescriptor> getLinks(String category)
public <A> A getAdapter(Class<A> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
adapter
- 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 Resource
public Template getTemplate(String fileName)
getTemplate
in interface Resource
public boolean checkGuard(String guard) throws ParseException
Resource
checkGuard
in interface Resource
ParseException
Copyright © 2016 Nuxeo SA. All rights reserved.