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
Generates the uitools factories definition using the component associated
-
Field Summary
Modifier and TypeFieldDescriptionprotected Context
Cocoon contextprotected CurrentUserProvider
The current user provider componentprotected StaticFileImportsManager
The static files import managerprotected JSONUtils
The json utils componentprotected MessageTargetFactoriesManager
The list of existing message target factoriesprotected RelationsManager
The relations managerprotected SourceResolver
The Excalibur source resolverprotected RibbonControlsManager
The ribbon control managerprotected RibbonImportManager
The ribbon import managerprotected RibbonManagerCache
The ribbon manager cache helperprotected RibbonTabsManager
The ribbon tab managerprotected SAXClientSideElementHelper
The sax clientside element helperprotected UIToolsFactoriesManager
The ui tools factories managerprotected UserHelper
The User Helperprotected WidgetsManager
The widgets managerFields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) protected void
doGenerate
(Map<String, Object> contextParameters) Generates the UI factories definitions, with parametersvoid
generate()
Get the contextual parametersprotected Map<String,
List<ClientSideElement>> getElementsToSax
(ClientSideElementDependenciesManager dependenciesManager, RibbonConfigurationManager ribbonManager) Retrieve the list of elements to generate the Workspaceprotected RibbonConfigurationSource
Get the ribbon configurationprotected Source
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 Details
-
_ribbonControlManager
The ribbon control manager -
_ribbonTabManager
The ribbon tab manager -
_messageTargetFactoriesManager
The list of existing message target factories -
_uitoolsFactoriesManager
The ui tools factories manager -
_relationsManager
The relations manager -
_widgetsManager
The widgets manager -
_saxClientSideElementHelper
The sax clientside element helper -
_fileImportsManager
The static files import manager -
_resolver
The Excalibur source resolver -
_cocoonContext
Cocoon context -
_currentUserProvider
The current user provider component -
_jsonUtils
The json utils component -
_userHelper
The User Helper -
_ribbonManagerCache
The ribbon manager cache helper -
_ribbonImportManager
The ribbon import manager
-
-
Constructor Details
-
WorkspaceGenerator
public WorkspaceGenerator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
generate
- Specified by:
generate
in interfaceGenerator
- Throws:
IOException
SAXException
ProcessingException
-
getContextualParameters
Get the contextual parameters- Returns:
- The contextual parameters
-
doGenerate
protected void doGenerate(Map<String, Object> contextParameters) throws IOException, SAXException, ProcessingExceptionGenerates 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, SAXExceptionSAX 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
Get the ribbon configuration- Returns:
- the ribbon configuration
- Throws:
IOException
- if an errors occurs getting the ribbon configuration
-
getUIToolsConfiguration
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 SAXExceptionSAX 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 SAXExceptionSAX the relations handlers- Parameters:
contextParameters
- the context parameterselements
- The list of relation handlers- Throws:
SAXException
- if an error occurred
-
saxWidgets
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 SAXExceptionSAX the static file imports- Parameters:
contextParameters
- the context parameterselements
- The list of static file imports elements- Throws:
SAXException
- if an error occurred
-
saxAdditionnalInfo
Use this method when inheriting the WorkspaceGenerator to sax additional data- Parameters:
contextParameters
- the context parameters- Throws:
SAXException
- if an error occurred
-