Class GetDataSourceQueriesAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.externaldata.ui.GetDataSourceQueriesAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
SAX events for datasources types, datasources and queries
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataSourceClientInteraction
The manager handling the data sourcesprotected DataSourceFactoryExtensionPoint
The manager for data source factoriesprotected QueryDao
The Query DAO.Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) dataSourceTypeToJSON
(DataSourceClientInteraction.DataSourceType dataSourceType) Get the JSON representation of a type of data sourcequeryToJSON
(Query query) Gets query's properties to JSON formatvoid
service
(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_dataSourceClientInteraction
The manager handling the data sources -
_dataSourceFactoryEP
The manager for data source factories -
_queryDao
The Query DAO.
-
-
Constructor Details
-
GetDataSourceQueriesAction
public GetDataSourceQueriesAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
dataSourceTypeToJSON
protected Map<String,Object> dataSourceTypeToJSON(DataSourceClientInteraction.DataSourceType dataSourceType) throws Exception Get the JSON representation of a type of data source- Parameters:
dataSourceType
- The data source type ID- Returns:
- The datasource type as JSON
- Throws:
Exception
- If an error occurred
-
queryToJSON
Gets query's properties to JSON format- Parameters:
query
- The query- Returns:
- The query's properties
-