Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.webengine.app.impl
Class DefaultModule

java.lang.Object
  extended by org.nuxeo.ecm.webengine.app.impl.DefaultModule
All Implemented Interfaces:
MessagesProvider, Module

public class DefaultModule
extends java.lang.Object
implements Module

Author:
Bogdan Stefanescu

Field Summary
static Log log
           
 
Constructor Summary
DefaultModule(ModuleHandler handler)
           
 
Method Summary
 void flushCache()
          Deprecated. 
 java.util.List<LinkDescriptor> getActiveLinks(Resource context, java.lang.String category)
           
 AdapterType getAdapter(Resource ctx, java.lang.String name)
          Deprecated. 
 java.util.List<java.lang.String> getAdapterNames(Resource ctx)
          Deprecated. 
 AdapterType[] getAdapters()
          Deprecated. 
 java.util.List<AdapterType> getAdapters(Resource ctx)
          Deprecated. 
 java.util.List<java.lang.String> getEnabledAdapterNames(Resource ctx)
          Deprecated. 
 java.util.List<AdapterType> getEnabledAdapters(Resource ctx)
          Deprecated. 
 WebEngine getEngine()
           
 ScriptFile getFile(java.lang.String path)
          Gets a file using the configured directory stack.
 java.util.List<LinkDescriptor> getLinks(java.lang.String category)
           
 java.lang.String getMediaTypeId(javax.ws.rs.core.MediaType mt)
          Deprecated. 
 Messages getMessages()
           
 java.util.Map<java.lang.String,java.lang.String> getMessages(java.lang.String language)
           
 java.lang.String getName()
           
 java.util.List<ResourceBinding> getResourceBindings()
          Deprecated. 
 java.io.File getRoot()
           
 Resource getRootObject(WebContext ctx)
          Deprecated. 
 java.io.File getSkinDir()
           
 java.lang.String getSkinPathPrefix()
          Deprecated. 
 ScriptFile getSkinResource(java.lang.String path)
          Gets a skin resource input stream.
 Module getSuperModule()
           
 java.lang.String getTemplateFileExt()
          Deprecated. 
 ResourceType getType(java.lang.String typeName)
          Deprecated. 
 ResourceType[] getTypes()
          Deprecated. 
 Validator getValidator(java.lang.String docType)
          Deprecated. 
 boolean isDerivedFrom(java.lang.String moduleName)
          Deprecated. 
 java.lang.Class<?> loadClass(java.lang.String className)
          Loads a class given its name.
 void loadMessages()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static final Log log
Constructor Detail

DefaultModule

public DefaultModule(ModuleHandler handler)
Method Detail

getEngine

public WebEngine getEngine()
Specified by:
getEngine in interface Module

getName

public java.lang.String getName()
Specified by:
getName in interface Module

loadClass

public java.lang.Class<?> loadClass(java.lang.String className)
                             throws java.lang.ClassNotFoundException
Description copied from interface: Module
Loads a class given its name.

The scripting class loader will be used to load the class.

Specified by:
loadClass in interface Module
Parameters:
className - the class name
Returns:
the class instance
Throws:
java.lang.ClassNotFoundException

getRoot

public java.io.File getRoot()
Specified by:
getRoot in interface Module

getSuperModule

public Module getSuperModule()
Specified by:
getSuperModule in interface Module

getSkinResource

public ScriptFile getSkinResource(java.lang.String path)
                           throws java.io.IOException
Description copied from interface: Module
Gets a skin resource input stream. This must not cache resources. This method is using the module stacking directory to find the resource.

Specified by:
getSkinResource in interface Module
Throws:
java.io.IOException

getFile

public ScriptFile getFile(java.lang.String path)
Description copied from interface: Module
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 Module.flushCache() method.

Specified by:
getFile in interface Module
Parameters:
path - the file path
Returns:
null if no file found otherwise the file

getSkinDir

public java.io.File getSkinDir()

loadMessages

public void loadMessages()

getMessages

public Messages getMessages()
Specified by:
getMessages in interface Module

getMessages

public java.util.Map<java.lang.String,java.lang.String> getMessages(java.lang.String language)
Specified by:
getMessages in interface MessagesProvider
Specified by:
getMessages in interface Module

getActiveLinks

public java.util.List<LinkDescriptor> getActiveLinks(Resource context,
                                                     java.lang.String category)
Specified by:
getActiveLinks in interface Module

getLinks

public java.util.List<LinkDescriptor> getLinks(java.lang.String category)
Specified by:
getLinks in interface Module

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

flushCache

@Deprecated
public void flushCache()
Deprecated. 

Specified by:
flushCache in interface Module

getTemplateFileExt

@Deprecated
public java.lang.String getTemplateFileExt()
Deprecated. 

Specified by:
getTemplateFileExt in interface Module

getMediaTypeId

@Deprecated
public java.lang.String getMediaTypeId(javax.ws.rs.core.MediaType mt)
Deprecated. 

Specified by:
getMediaTypeId in interface Module

getSkinPathPrefix

@Deprecated
public java.lang.String getSkinPathPrefix()
Deprecated. 

Description copied from interface: Module
Get the path prefix to be used from templates to prepend to links to static resources.

This prefix is exposed to templates as ${skinPath}.

Specified by:
getSkinPathPrefix in interface Module
Returns:
the skin path prefix. never null.

getRootObject

@Deprecated
public Resource getRootObject(WebContext ctx)
Deprecated. 

Specified by:
getRootObject in interface Module

getAdapter

@Deprecated
public AdapterType getAdapter(Resource ctx,
                                         java.lang.String name)
Deprecated. 

Description copied from interface: Module
Gets the named adapter definition for the given resource.

Specified by:
getAdapter in interface Module
Parameters:
ctx - the target resource
name - the adapter name
Returns:
the adapter if any adapter with that name applies for that resource otherwise throws an exception

getAdapterNames

@Deprecated
public java.util.List<java.lang.String> getAdapterNames(Resource ctx)
Deprecated. 

Description copied from interface: Module
Gets the list of adapter names that applies to the given resource.

Specified by:
getAdapterNames in interface Module
Parameters:
ctx - the context resource
Returns:
the list of adapters Cannot be null.

getAdapters

@Deprecated
public AdapterType[] getAdapters()
Deprecated. 

Description copied from interface: Module
Gets the adapters registered within this module.

Specified by:
getAdapters in interface Module
Returns:
the adapters. Cannot be null.

getAdapters

@Deprecated
public java.util.List<AdapterType> getAdapters(Resource ctx)
Deprecated. 

Description copied from interface: Module
Gets the list of adapters that applies to the given resource.

Specified by:
getAdapters in interface Module
Parameters:
ctx - the context resource
Returns:
the list of adapters Cannot be null.

getEnabledAdapterNames

@Deprecated
public java.util.List<java.lang.String> getEnabledAdapterNames(Resource ctx)
Deprecated. 

Description copied from interface: Module
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.

Specified by:
getEnabledAdapterNames in interface Module
Parameters:
ctx - the context resource
Returns:
the list of adapters. Cannot be null.

getEnabledAdapters

@Deprecated
public java.util.List<AdapterType> getEnabledAdapters(Resource ctx)
Deprecated. 

Description copied from interface: Module
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.

Specified by:
getEnabledAdapters in interface Module
Parameters:
ctx - the context resource
Returns:
the list of adapter.s Cannot be null.

getResourceBindings

@Deprecated
public java.util.List<ResourceBinding> getResourceBindings()
Deprecated. 

Specified by:
getResourceBindings in interface Module

getType

@Deprecated
public ResourceType getType(java.lang.String typeName)
Deprecated. 

Description copied from interface: Module
Gets a ResourceType instance given its name.

The web type lookup is performed in the following order:

  1. First the annotated Groovy classes are checked. (web/ directory)
  2. Then the configuration type registry corresponding

Specified by:
getType in interface Module
Parameters:
typeName - the type name
Returns:
the web type instance

getTypes

@Deprecated
public ResourceType[] getTypes()
Deprecated. 

Description copied from interface: Module
Gets the types registered within this module.

Specified by:
getTypes in interface Module
Returns:
the types. Cannot be null.

getValidator

@Deprecated
public Validator getValidator(java.lang.String docType)
Deprecated. 

Specified by:
getValidator in interface Module

isDerivedFrom

@Deprecated
public boolean isDerivedFrom(java.lang.String moduleName)
Deprecated. 

Specified by:
isDerivedFrom in interface Module

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.