Class AbstractResourceType
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResourceType
-
- All Implemented Interfaces:
ResourceType
- Direct Known Subclasses:
AdapterTypeImpl
,ResourceTypeImpl
public abstract class AbstractResourceType extends Object implements ResourceType
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassProxy
clazz
protected com.sun.jersey.server.spi.component.ResourceComponentConstructor
constructor
protected WebEngine
engine
protected Set<String>
facets
protected Guard
guard
protected String
name
protected Module
owner
protected AbstractResourceType
superType
protected ConcurrentMap<String,ScriptFile>
templateCache
protected int
visibility
-
Fields inherited from interface org.nuxeo.ecm.webengine.model.ResourceType
ROOT_TYPE_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractResourceType(WebEngine engine, Module module, AbstractResourceType superType, String name, ClassProxy clazz, com.sun.jersey.server.spi.component.ResourceComponentConstructor constructor, int visibility)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ScriptFile
findSkinTemplate(Module module, String name)
protected ScriptFile
findTypeTemplate(Module module, String name)
ScriptFile
findView(Module module, String name)
void
flushCache()
Set<String>
getFacets()
Guard
getGuard()
String
getName()
Module
getOwnerModule()
Class<Resource>
getResourceClass()
ResourceType
getSuperType()
ScriptFile
getView(Module module, String name)
Gets a view for this type in the context of the given module.int
getVisibility()
boolean
hasFacet(String facet)
boolean
isDerivedFrom(String type)
boolean
isEnabled(Resource ctx)
protected abstract void
loadAnnotations(AnnotationManager annoMgr)
protected void
loadGuardFromAnnoation(Class<?> c)
<T extends Resource>
TnewInstance(Class<T> typeof, WebContext context)
protected String
resolveResourcePath(String className, String fileName)
String
toString()
-
-
-
Field Detail
-
engine
protected final WebEngine engine
-
owner
protected final Module owner
-
constructor
protected final com.sun.jersey.server.spi.component.ResourceComponentConstructor constructor
-
name
protected final String name
-
visibility
protected int visibility
-
superType
protected AbstractResourceType superType
-
clazz
protected volatile ClassProxy clazz
-
guard
protected volatile Guard guard
-
templateCache
protected volatile ConcurrentMap<String,ScriptFile> templateCache
-
-
Constructor Detail
-
AbstractResourceType
protected AbstractResourceType(WebEngine engine, Module module, AbstractResourceType superType, String name, ClassProxy clazz, com.sun.jersey.server.spi.component.ResourceComponentConstructor constructor, int visibility)
-
-
Method Detail
-
getVisibility
public int getVisibility()
-
loadAnnotations
protected abstract void loadAnnotations(AnnotationManager annoMgr)
-
getSuperType
public ResourceType getSuperType()
- Specified by:
getSuperType
in interfaceResourceType
-
getOwnerModule
public Module getOwnerModule()
-
getGuard
public Guard getGuard()
- Specified by:
getGuard
in interfaceResourceType
-
getFacets
public Set<String> getFacets()
- Specified by:
getFacets
in interfaceResourceType
-
hasFacet
public boolean hasFacet(String facet)
- Specified by:
hasFacet
in interfaceResourceType
-
getName
public String getName()
- Specified by:
getName
in interfaceResourceType
-
getResourceClass
public Class<Resource> getResourceClass()
- Specified by:
getResourceClass
in interfaceResourceType
-
newInstance
public <T extends Resource> T newInstance(Class<T> typeof, WebContext context)
- Specified by:
newInstance
in interfaceResourceType
-
isEnabled
public boolean isEnabled(Resource ctx)
- Specified by:
isEnabled
in interfaceResourceType
-
isDerivedFrom
public boolean isDerivedFrom(String type)
- Specified by:
isDerivedFrom
in interfaceResourceType
-
flushCache
public void flushCache()
- Specified by:
flushCache
in interfaceResourceType
-
loadGuardFromAnnoation
protected void loadGuardFromAnnoation(Class<?> c)
-
getView
public ScriptFile getView(Module module, String name)
Description copied from interface:ResourceType
Gets a view for this type in the context of the given module.- Specified by:
getView
in interfaceResourceType
-
findView
public ScriptFile findView(Module module, String name)
-
findSkinTemplate
protected ScriptFile findSkinTemplate(Module module, String name)
-
findTypeTemplate
protected ScriptFile findTypeTemplate(Module module, String name)
-
-