Package org.ametys.plugins.core.ui
Class WorkspaceGenerator
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.xml.AbstractXMLProducer
-
- org.apache.cocoon.generation.AbstractGenerator
-
- org.apache.cocoon.generation.ServiceableGenerator
-
- org.ametys.plugins.core.ui.WorkspaceGenerator
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,Contextualizable
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
RepositoryWorkspaceGenerator
,WorkspaceGenerator
,WorkspaceGenerator
public class WorkspaceGenerator extends ServiceableGenerator implements Contextualizable
Generates the uitools factories definition using the component associated
-
-
Field Summary
Fields Modifier and Type Field Description protected Context
_cocoonContext
Cocoon contextprotected CurrentUserProvider
_currentUserProvider
The current user provider componentprotected StaticFileImportsManager
_fileImportsManager
The static files import managerprotected JSONUtils
_jsonUtils
The json utils componentprotected MessageTargetFactoriesManager
_messageTargetFactoriesManager
The list of existing message target factoriesprotected RelationsManager
_relationsManager
The relations managerprotected SourceResolver
_resolver
The Excalibur source resolverprotected RibbonControlsManager
_ribbonControlManager
The ribbon control managerprotected RibbonImportManager
_ribbonImportManager
The ribbon import managerprotected RibbonManagerCache
_ribbonManagerCache
The ribbon manager cache helperprotected RibbonTabsManager
_ribbonTabManager
The ribbon tab managerprotected SAXClientSideElementHelper
_saxClientSideElementHelper
The sax clientside element helperprotected UIToolsFactoriesManager
_uitoolsFactoriesManager
The ui tools factories managerprotected UserHelper
_userHelper
The User Helperprotected WidgetsManager
_widgetsManager
The widgets manager-
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
-
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
-
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
-
Constructor Summary
Constructors Constructor Description WorkspaceGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
protected void
doGenerate(Map<String,Object> contextParameters)
Generates the UI factories definitions, with parametersvoid
generate()
protected Map<String,Object>
getContextualParameters()
Get the contextual parametersprotected Map<String,List<ClientSideElement>>
getElementsToSax(ClientSideElementDependenciesManager dependenciesManager, RibbonConfigurationManager ribbonManager)
Retrieve the list of elements to generate the Workspaceprotected RibbonConfigurationSource
getRibbonConfiguration()
Get the ribbon configurationprotected Source
getUIToolsConfiguration()
Get the UI tools configurationprotected void
saxAdditionnalInfo(Map<String,Object> contextParameters)
Use this method when inheriting the WorkspaceGenerator to sax additional dataprotected void
saxMessageTargetFactories(Map<String,Object> contextParameters, List<ClientSideElement> elements)
SAX the message target factoriesprotected void
saxRelationsHandlers(Map<String,Object> contextParameters, List<ClientSideElement> elements)
SAX the relations handlersprotected void
saxStaticFileImports(Map<String,Object> contextParameters, List<ClientSideElement> elements)
SAX the static file importsprotected void
saxUITools(Map<String,Object> contextParameters, List<ClientSideElement> elements)
SAX the UI Toolsprotected void
saxWidgets(Map<String,Object> contextParameters)
SAX the widgetsvoid
service(ServiceManager smanager)
-
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
-
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
-
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
-
-
-
Field Detail
-
_ribbonControlManager
protected RibbonControlsManager _ribbonControlManager
The ribbon control manager
-
_ribbonTabManager
protected RibbonTabsManager _ribbonTabManager
The ribbon tab manager
-
_messageTargetFactoriesManager
protected MessageTargetFactoriesManager _messageTargetFactoriesManager
The list of existing message target factories
-
_uitoolsFactoriesManager
protected UIToolsFactoriesManager _uitoolsFactoriesManager
The ui tools factories manager
-
_relationsManager
protected RelationsManager _relationsManager
The relations manager
-
_widgetsManager
protected WidgetsManager _widgetsManager
The widgets manager
-
_saxClientSideElementHelper
protected SAXClientSideElementHelper _saxClientSideElementHelper
The sax clientside element helper
-
_fileImportsManager
protected StaticFileImportsManager _fileImportsManager
The static files import manager
-
_resolver
protected SourceResolver _resolver
The Excalibur source resolver
-
_cocoonContext
protected Context _cocoonContext
Cocoon context
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider component
-
_jsonUtils
protected JSONUtils _jsonUtils
The json utils component
-
_userHelper
protected UserHelper _userHelper
The User Helper
-
_ribbonManagerCache
protected RibbonManagerCache _ribbonManagerCache
The ribbon manager cache helper
-
_ribbonImportManager
protected RibbonImportManager _ribbonImportManager
The ribbon import manager
-
-
Constructor Detail
-
WorkspaceGenerator
public WorkspaceGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
- Specified by:
generate
in interfaceGenerator
- Throws:
IOException
SAXException
ProcessingException
-
getContextualParameters
protected Map<String,Object> getContextualParameters()
Get the contextual parameters- Returns:
- The contextual parameters
-
doGenerate
protected void doGenerate(Map<String,Object> contextParameters) throws IOException, SAXException, ProcessingException
Generates the UI factories definitions, with parameters- Parameters:
contextParameters
- context parameters.- Throws:
IOException
- if an error occurredSAXException
- if an error occurredProcessingException
- if an error occurred
-
getElementsToSax
protected Map<String,List<ClientSideElement>> getElementsToSax(ClientSideElementDependenciesManager dependenciesManager, RibbonConfigurationManager ribbonManager) throws SAXException
Retrieve the list of elements to generate the Workspace- Parameters:
dependenciesManager
- The dependencies managerribbonManager
- The ribbon manager for this workspace- Returns:
- The list of elements, mapped by extension points.
- Throws:
SAXException
- If an error occurs
-
saxUITools
protected void saxUITools(Map<String,Object> contextParameters, List<ClientSideElement> elements) throws IOException, SAXException
SAX the UI Tools- Parameters:
contextParameters
- the context parameterselements
- The list of elements to sax- Throws:
IOException
- if an error occurredSAXException
- if an error occurred
-
getRibbonConfiguration
protected RibbonConfigurationSource getRibbonConfiguration() throws IOException
Get the ribbon configuration- Returns:
- the ribbon configuration
- Throws:
IOException
- if an errors occurs getting the ribbon configuration
-
getUIToolsConfiguration
protected Source getUIToolsConfiguration() throws IOException
Get the UI tools configuration- Returns:
- the UI tools configuration
- Throws:
IOException
- if an errors occurs getting the UI tools configuration
-
saxMessageTargetFactories
protected void saxMessageTargetFactories(Map<String,Object> contextParameters, List<ClientSideElement> elements) throws SAXException
SAX the message target factories- Parameters:
contextParameters
- the context parameterselements
- The list of elements for the message target factories- Throws:
SAXException
- if an error occurred
-
saxRelationsHandlers
protected void saxRelationsHandlers(Map<String,Object> contextParameters, List<ClientSideElement> elements) throws SAXException
SAX the relations handlers- Parameters:
contextParameters
- the context parameterselements
- The list of relation handlers- Throws:
SAXException
- if an error occurred
-
saxWidgets
protected void saxWidgets(Map<String,Object> contextParameters) throws SAXException
SAX the widgets- Parameters:
contextParameters
- the context parameters- Throws:
SAXException
- if an error occurred
-
saxStaticFileImports
protected void saxStaticFileImports(Map<String,Object> contextParameters, List<ClientSideElement> elements) throws SAXException
SAX the static file imports- Parameters:
contextParameters
- the context parameterselements
- The list of static file imports elements- Throws:
SAXException
- if an error occurred
-
saxAdditionnalInfo
protected void saxAdditionnalInfo(Map<String,Object> contextParameters) throws SAXException
Use this method when inheriting the WorkspaceGenerator to sax additional data- Parameters:
contextParameters
- the context parameters- Throws:
SAXException
- if an error occurred
-
-