|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.rest.AbstractRestBean
public class AbstractRestBean
Abstract base class for EJB classes that implement REST methods. For the cache and its evicion policies see rhq-cache-service.xml
| Constructor Summary | |
|---|---|
AbstractRestBean()
|
|
| Method Summary | ||
|---|---|---|
ResourceWithType |
fillRWT(org.rhq.core.domain.resource.Resource res,
javax.ws.rs.core.UriInfo uriInfo)
|
|
protected
|
getFqn(int id,
Class<T> clazz)
Construct a Fqn object from the passed data |
|
protected
|
getFromCache(org.jboss.cache.Fqn fqn,
Class<T> clazz)
Retrieve an object from the cache if present or null otherwise. |
|
protected
|
getFromCache(int id,
Class<T> clazz)
Retrieve an object from the cache. |
|
protected org.rhq.core.domain.resource.Resource |
getResourceFromCache(int resourceid)
|
|
protected List<org.rhq.core.domain.resource.Resource> |
getResourcesFromCacheByParentId(int pid)
|
|
protected void |
putResourceToCache(org.rhq.core.domain.resource.Resource res)
|
|
protected
|
putToCache(org.jboss.cache.Fqn fqn,
T o)
Put an object into the cache. |
|
protected
|
putToCache(int id,
Class<T> clazz,
T o)
Put an object into the cache identified by its type and id |
|
protected
|
removeFromCache(int operationId,
Class<T> clazz)
Remove an item from the cache |
|
protected String |
renderTemplate(String templateName,
Object objectToRender)
Renders the passed object with the help of a freemarker template into a string. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractRestBean()
| Method Detail |
|---|
protected String renderTemplate(String templateName,
Object objectToRender)
templateName - Template to use for rendering. If the template name does not end in .ftl, .ftl is appended.objectToRender - Object to render via template
protected <T> T getFromCache(int id,
Class<T> clazz)
id - Id of the object to load.clazz - Wanted return type
getFqn(int, Class)
protected <T> T getFromCache(org.jboss.cache.Fqn fqn,
Class<T> clazz)
fqn - FullyQualified name (=path in cache) ot the object to retrieveclazz - Return type
putToCache(org.jboss.cache.Fqn, Object)
protected <T> boolean putToCache(org.jboss.cache.Fqn fqn,
T o)
fqn - Fully qualified name (=path to object)o - Object to put
getFromCache(org.jboss.cache.Fqn, Class)
protected <T> boolean putToCache(int id,
Class<T> clazz,
T o)
id - Id of the object to putclazz - Type to put ino - Object to put
putToCache(org.jboss.cache.Fqn, Object)protected void putResourceToCache(org.rhq.core.domain.resource.Resource res)
protected List<org.rhq.core.domain.resource.Resource> getResourcesFromCacheByParentId(int pid)
protected org.rhq.core.domain.resource.Resource getResourceFromCache(int resourceid)
protected <T> org.jboss.cache.Fqn getFqn(int id,
Class<T> clazz)
id - Id of the target objectclazz - Type of object for that node
protected <T> boolean removeFromCache(int operationId,
Class<T> clazz)
operationId - Id of the itemclazz - Type of object for that node
public ResourceWithType fillRWT(org.rhq.core.domain.resource.Resource res,
javax.ws.rs.core.UriInfo uriInfo)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||