|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
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()
Deprecated. resources are deprecated - you should use a jax-rs application to declare more resources. |
void |
flushSkinCache()
|
void |
flushTypeCache()
|
List<LinkDescriptor> |
getActiveLinks(Resource context,
String category)
|
AdapterType |
getAdapter(Resource ctx,
String name)
Gets the named adapter definition for the given resource. |
List<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. |
List<AdapterType> |
getAdapters(Resource ctx)
Gets the list of adapters that applies to the given resource. |
List<String> |
getEnabledAdapterNames(Resource ctx)
Gets the list of adapter names that are enabled for the given context. |
List<AdapterType> |
getEnabledAdapters(Resource ctx)
Gets the list of adapters that are enabled for the given context. |
WebEngine |
getEngine()
|
ScriptFile |
getFile(String path)
Gets a file using the configured directory stack. |
LinkRegistry |
getLinkRegistry()
|
List<LinkDescriptor> |
getLinks(String category)
|
String |
getMediaTypeId(MediaType mt)
|
Messages |
getMessages()
|
Map<String,String> |
getMessages(String language)
|
ModuleConfiguration |
getModuleConfiguration()
|
String |
getName()
|
Set<String> |
getNatures()
|
List<ResourceBinding> |
getResourceBindings()
|
File |
getRoot()
|
Resource |
getRootObject(WebContext ctx)
Deprecated. Use WebApplication to declare modules |
ResourceType |
getRootType()
Deprecated. Use WebApplication to declare modules |
static File |
getSkinDir(File moduleDir)
|
String |
getSkinPathPrefix()
Get the path prefix to be used from templates to prepend to links to static resources. |
ScriptFile |
getSkinResource(String path)
Gets a skin resource input stream. |
ModuleImpl |
getSuperModule()
|
String |
getTemplateFileExt()
|
ModuleTracker |
getTracker()
|
ResourceType |
getType(String typeName)
Gets a ResourceType instance given its name. |
TypeRegistry |
getTypeRegistry()
|
ResourceType[] |
getTypes()
Gets the types registered within this module. |
Validator |
getValidator(String docType)
|
boolean |
hasNature(String natureId)
|
boolean |
isDerivedFrom(String moduleName)
|
boolean |
isHeadless()
Whether or not this module has a GUI and should be listed in available GUI module list. |
Class<?> |
loadClass(String className)
Loads a class given its name. |
void |
loadConfiguration()
|
void |
reloadMessages()
|
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 Set<String> getNatures()
public boolean hasNature(String natureId)
public WebEngine getEngine()
getEngine
in interface Module
public String getName()
getName
in interface Module
public ModuleImpl getSuperModule()
getSuperModule
in interface Module
public ModuleConfiguration getModuleConfiguration()
@Deprecated public ResourceType getRootType()
WebApplication
to declare modules
@Deprecated public Resource getRootObject(WebContext ctx)
WebApplication
to declare modules
getRootObject
in interface Module
public String getSkinPathPrefix()
Module
This prefix is exposed to templates as ${skinPath}.
getSkinPathPrefix
in interface Module
public TypeRegistry getTypeRegistry()
public Class<?> loadClass(String className) throws ClassNotFoundException
Module
The scripting class loader will be used to load the class.
loadClass
in interface Module
className
- the class name
ClassNotFoundException
public ResourceType getType(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, String name)
Module
getAdapter
in interface Module
ctx
- the target resourcename
- the adapter name
public List<String> getAdapterNames(Resource ctx)
Module
getAdapterNames
in interface Module
ctx
- the context resource
public List<AdapterType> getAdapters(Resource ctx)
Module
getAdapters
in interface Module
ctx
- the context resource
public List<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 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 String getMediaTypeId(MediaType mt)
getMediaTypeId
in interface Module
public List<ResourceBinding> getResourceBindings()
getResourceBindings
in interface Module
public boolean isDerivedFrom(String moduleName)
isDerivedFrom
in interface Module
public Validator getValidator(String docType)
getValidator
in interface Module
public void loadConfiguration()
public List<LinkDescriptor> getLinks(String category)
getLinks
in interface Module
public List<LinkDescriptor> getActiveLinks(Resource context, String category)
getActiveLinks
in interface Module
public LinkRegistry getLinkRegistry()
public String getTemplateFileExt()
getTemplateFileExt
in interface Module
public void flushSkinCache()
public void flushTypeCache()
public void flushRootResourcesCache()
public void flushCache()
flushCache
in interface Module
public static File getSkinDir(File moduleDir)
public ScriptFile getFile(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(String path) throws IOException
Module
getSkinResource
in interface Module
IOException
public TypeRegistry createTypeRegistry()
public File getRoot()
getRoot
in interface Module
public void reloadMessages()
public Messages getMessages()
getMessages
in interface Module
public Map<String,String> getMessages(String language)
getMessages
in interface MessagesProvider
getMessages
in interface Module
public String toString()
toString
in class Object
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |