|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.webengine.model.impl.ModuleImpl
public class ModuleImpl
The default implementation for a web configuration.
Constructor Summary | |
---|---|
ModuleImpl(WebEngine engine,
ModuleImpl superModule,
ModuleConfiguration config)
|
Method Summary | |
---|---|
TypeRegistry |
createTypeRegistry()
TODO There are no more reasons to lazy load the type registry since module are lazy loaded. |
void |
flushCache()
|
void |
flushRootResourcesCache()
|
void |
flushSkinCache()
|
void |
flushTypeCache()
|
java.util.List<LinkDescriptor> |
getActiveLinks(Resource context,
java.lang.String category)
|
AdapterType |
getAdapter(Resource ctx,
java.lang.String name)
Gets the named adapter definition for the given resource. |
java.util.List<java.lang.String> |
getAdapterNames(Resource ctx)
Gets the list of adapter names that applies to the given resource. |
AdapterType[] |
getAdapters()
Gets the adapters registered within this module. |
java.util.List<AdapterType> |
getAdapters(Resource ctx)
Gets the list of adapters that applies to the given resource. |
java.util.List<java.lang.String> |
getEnabledAdapterNames(Resource ctx)
Gets the list of adapter names that are enabled for the given context. |
java.util.List<AdapterType> |
getEnabledAdapters(Resource ctx)
Gets the list of adapters that are enabled for the given context. |
WebEngine |
getEngine()
|
ScriptFile |
getFile(java.lang.String path)
Gets a file using the configured directory stack. |
LinkRegistry |
getLinkRegistry()
|
java.util.List<LinkDescriptor> |
getLinks(java.lang.String category)
|
java.lang.String |
getMediaTypeId(javax.ws.rs.core.MediaType mt)
|
Messages |
getMessages()
|
java.util.Map<java.lang.String,java.lang.String> |
getMessages(java.lang.String language)
|
ModuleConfiguration |
getModuleConfiguration()
|
java.lang.String |
getName()
|
java.util.Set<java.lang.String> |
getNatures()
|
java.util.List<ResourceBinding> |
getResourceBindings()
|
java.io.File |
getRoot()
|
Resource |
getRootObject(WebContext ctx)
|
ResourceType |
getRootType()
|
static java.io.File |
getSkinDir(java.io.File moduleDir)
|
java.lang.String |
getSkinPathPrefix()
Get the path prefix to be used from templates to prepend to links to static resources. |
ScriptFile |
getSkinResource(java.lang.String path)
Gets a skin resource input stream. |
ModuleImpl |
getSuperModule()
|
java.lang.String |
getTemplateFileExt()
|
ModuleTracker |
getTracker()
|
ResourceType |
getType(java.lang.String typeName)
Gets a ResourceType instance given its name. |
TypeRegistry |
getTypeRegistry()
|
ResourceType[] |
getTypes()
Gets the types registered within this module. |
Validator |
getValidator(java.lang.String docType)
|
boolean |
hasNature(java.lang.String natureId)
|
boolean |
isDerivedFrom(java.lang.String moduleName)
|
boolean |
isHeadless()
Whether or not this module has a GUI and should be listed in available GUI module list. |
java.lang.Class<?> |
loadClass(java.lang.String className)
Loads a class given its name. |
void |
loadConfiguration()
|
void |
reloadMessages()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ModuleImpl(WebEngine engine, ModuleImpl superModule, ModuleConfiguration config)
Method Detail |
---|
public ModuleTracker getTracker()
public boolean isHeadless()
public java.util.Set<java.lang.String> getNatures()
public boolean hasNature(java.lang.String natureId)
public WebEngine getEngine()
getEngine
in interface Module
public java.lang.String getName()
getName
in interface Module
public ModuleImpl getSuperModule()
getSuperModule
in interface Module
public ModuleConfiguration getModuleConfiguration()
public ResourceType getRootType()
public Resource getRootObject(WebContext ctx)
getRootObject
in interface Module
public java.lang.String getSkinPathPrefix()
Module
This prefix is exposed to templates as ${skinPath}.
getSkinPathPrefix
in interface Module
public TypeRegistry getTypeRegistry()
public java.lang.Class<?> loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
Module
The scripting class loader will be used to load the class.
loadClass
in interface Module
className
- the class name
java.lang.ClassNotFoundException
public ResourceType getType(java.lang.String typeName)
Module
ResourceType
instance given its name.
The web type lookup is performed in the following order:
getType
in interface Module
typeName
- the type name
public ResourceType[] getTypes()
Module
getTypes
in interface Module
public AdapterType[] getAdapters()
Module
getAdapters
in interface Module
public AdapterType getAdapter(Resource ctx, java.lang.String name)
Module
getAdapter
in interface Module
ctx
- the target resourcename
- the adapter name
public java.util.List<java.lang.String> getAdapterNames(Resource ctx)
Module
getAdapterNames
in interface Module
ctx
- the context resource
public java.util.List<AdapterType> getAdapters(Resource ctx)
Module
getAdapters
in interface Module
ctx
- the context resource
public java.util.List<java.lang.String> getEnabledAdapterNames(Resource ctx)
Module
Enabled services are those adapters which can be accessed in the current security context.
getEnabledAdapterNames
in interface Module
ctx
- the context resource
public java.util.List<AdapterType> getEnabledAdapters(Resource ctx)
Module
Enabled adapters are those adapters which can be accessed in the current security context.
getEnabledAdapters
in interface Module
ctx
- the context resource
public java.lang.String getMediaTypeId(javax.ws.rs.core.MediaType mt)
getMediaTypeId
in interface Module
public java.util.List<ResourceBinding> getResourceBindings()
getResourceBindings
in interface Module
public boolean isDerivedFrom(java.lang.String moduleName)
isDerivedFrom
in interface Module
public Validator getValidator(java.lang.String docType)
getValidator
in interface Module
public void loadConfiguration()
public java.util.List<LinkDescriptor> getLinks(java.lang.String category)
getLinks
in interface Module
public java.util.List<LinkDescriptor> getActiveLinks(Resource context, java.lang.String category)
getActiveLinks
in interface Module
public LinkRegistry getLinkRegistry()
public java.lang.String getTemplateFileExt()
getTemplateFileExt
in interface Module
public void flushSkinCache()
public void flushTypeCache()
public void flushRootResourcesCache()
public void flushCache()
flushCache
in interface Module
public static java.io.File getSkinDir(java.io.File moduleDir)
public ScriptFile getFile(java.lang.String path)
Module
Note that the implementation may cache the results. To clear any cached
data, you should call the Module.flushCache()
method.
getFile
in interface Module
path
- the file path
public ScriptFile getSkinResource(java.lang.String path) throws java.io.IOException
Module
getSkinResource
in interface Module
java.io.IOException
public TypeRegistry createTypeRegistry()
public java.io.File getRoot()
getRoot
in interface Module
public void reloadMessages()
public Messages getMessages()
getMessages
in interface Module
public java.util.Map<java.lang.String,java.lang.String> getMessages(java.lang.String language)
getMessages
in interface MessagesProvider
getMessages
in interface Module
public java.lang.String toString()
toString
in class java.lang.Object
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |