Package org.nuxeo.ecm.webengine.model
Interface Module
- All Superinterfaces:
MessagesProvider
- All Known Implementing Classes:
ModuleImpl
- Author:
- Bogdan Stefanescu
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getActiveLinks
(Resource context, String category) getAdapter
(Resource ctx, String name) Gets the named adapter definition for the given resource.getAdapterNames
(Resource ctx) Gets the list of adapter names that applies to the given resource.Gets the adapters registered within this module.getAdapters
(Resource ctx) Gets the list of adapters that applies to the given resource.Gets the list of adapter names that are enabled for the given context.Gets the list of adapters that are enabled for the given context.Gets a file using the configured directory stack.getMediaTypeId
(javax.ws.rs.core.MediaType mt) getMessages
(String language) getName()
getRoot()
getRootObject
(WebContext ctx) Get the path prefix to be used from templates to prepend to links to static resources.getSkinResource
(String path) Gets a skin resource input stream.Gets aResourceType
instance given its name.getTypes()
Gets the types registered within this module.boolean
isDerivedFrom
(String moduleName) Class<?>
Loads a class given its name.
-
Method Details
-
getName
String getName() -
getRoot
File getRoot() -
getRootObject
-
getEngine
WebEngine getEngine() -
flushCache
void flushCache() -
getSuperModule
Module getSuperModule() -
getTemplateFileExt
String getTemplateFileExt() -
getMediaTypeId
-
getMessages
- Specified by:
getMessages
in interfaceMessagesProvider
-
getMessages
Messages getMessages() -
getResourceBindings
List<ResourceBinding> getResourceBindings() -
getFile
Gets a file using the configured directory stack. Each directory in the stack is asked for the file until a file is found. If no file is found, returns null.Note that the implementation may cache the results. To clear any cached data, you should call the
flushCache()
method.- Parameters:
path
- the file path- Returns:
- null if no file found otherwise the file
-
getSkinResource
Gets a skin resource input stream. This must not cache resources. This method is using the module stacking directory to find the resource.- Throws:
IOException
-
loadClass
Loads a class given its name.The scripting class loader will be used to load the class.
- Parameters:
className
- the class name- Returns:
- the class instance
- Throws:
ClassNotFoundException
-
getType
Gets aResourceType
instance given its name.The web type lookup is performed in the following order:
- First the annotated Groovy classes are checked. (web/ directory)
- Then the configuration type registry corresponding
- Parameters:
typeName
- the type name- Returns:
- the web type instance
- Throws:
WebResourceNotFoundException
- if no such web type was defined
-
getTypes
ResourceType[] getTypes()Gets the types registered within this module.- Returns:
- the types. Cannot be null.
-
getAdapters
AdapterType[] getAdapters()Gets the adapters registered within this module.- Returns:
- the adapters. Cannot be null.
-
getAdapter
Gets the named adapter definition for the given resource.- Parameters:
ctx
- the target resourcename
- the adapter name- Returns:
- the adapter if any adapter with that name applies for that resource otherwise throws an exception
- Throws:
WebSecurityException
- if the adapter exists but cannot be accessed in the context of that resourceWebResourceNotFoundException
- if no such adapter exists for that resource
-
getAdapters
Gets the list of adapters that applies to the given resource.- Parameters:
ctx
- the context resource- Returns:
- the list of adapters Cannot be null.
-
getAdapterNames
Gets the list of adapter names that applies to the given resource.- Parameters:
ctx
- the context resource- Returns:
- the list of adapters Cannot be null.
-
getEnabledAdapters
Gets the list of adapters that are enabled for the given context.Enabled adapters are those adapters which can be accessed in the current security context.
- Parameters:
ctx
- the context resource- Returns:
- the list of adapter.s Cannot be null.
-
getEnabledAdapterNames
Gets the list of adapter names that are enabled for the given context.Enabled services are those adapters which can be accessed in the current security context.
- Parameters:
ctx
- the context resource- Returns:
- the list of adapters. Cannot be null.
-
getLinks
-
getActiveLinks
-
getSkinPathPrefix
String getSkinPathPrefix()Get the path prefix to be used from templates to prepend to links to static resources.This prefix is exposed to templates as ${skinPath}.
- Returns:
- the skin path prefix. never null.
-
isDerivedFrom
-