public interface Module extends MessagesProvider
Modifier and Type | Method and Description |
---|---|
void |
flushCache() |
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.
|
List<LinkDescriptor> |
getLinks(String category) |
String |
getMediaTypeId(javax.ws.rs.core.MediaType mt) |
Messages |
getMessages() |
Map<String,String> |
getMessages(String language) |
String |
getName() |
List<ResourceBinding> |
getResourceBindings() |
File |
getRoot() |
Resource |
getRootObject(WebContext ctx) |
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.
|
Module |
getSuperModule() |
String |
getTemplateFileExt() |
ResourceType |
getType(String typeName)
Gets a
ResourceType instance given its name. |
ResourceType[] |
getTypes()
Gets the types registered within this module.
|
boolean |
isDerivedFrom(String moduleName) |
Class<?> |
loadClass(String className)
Loads a class given its name.
|
Resource getRootObject(WebContext ctx)
void flushCache()
Module getSuperModule()
String getTemplateFileExt()
String getMediaTypeId(javax.ws.rs.core.MediaType mt)
Map<String,String> getMessages(String language)
getMessages
in interface MessagesProvider
Messages getMessages()
List<ResourceBinding> getResourceBindings()
ScriptFile getFile(String path)
Note that the implementation may cache the results. To clear any cached data, you should call the
flushCache()
method.
path
- the file pathScriptFile getSkinResource(String path) throws IOException
IOException
Class<?> loadClass(String className) throws ClassNotFoundException
The scripting class loader will be used to load the class.
className
- the class nameClassNotFoundException
ResourceType getType(String typeName)
ResourceType
instance given its name.
The web type lookup is performed in the following order:
typeName
- the type nameTypeNotFoundException
- if no such web type was definedResourceType[] getTypes()
AdapterType[] getAdapters()
AdapterType getAdapter(Resource ctx, String name)
ctx
- the target resourcename
- the adapter nameWebSecurityException
- if the adapter exists but cannot be accessed in the context of that resourceAdapterNotFoundException
- if no such adapter exists for that resourceList<AdapterType> getAdapters(Resource ctx)
ctx
- the context resourceList<String> getAdapterNames(Resource ctx)
ctx
- the context resourceList<AdapterType> getEnabledAdapters(Resource ctx)
Enabled adapters are those adapters which can be accessed in the current security context.
ctx
- the context resourceList<String> getEnabledAdapterNames(Resource ctx)
Enabled services are those adapters which can be accessed in the current security context.
ctx
- the context resourceList<LinkDescriptor> getLinks(String category)
List<LinkDescriptor> getActiveLinks(Resource context, String category)
String getSkinPathPrefix()
This prefix is exposed to templates as ${skinPath}.
boolean isDerivedFrom(String moduleName)
Copyright © 2017 Nuxeo. All rights reserved.