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
public class GetDataSourceQueriesAction extends ServiceableAction
SAX events for datasources types, datasources and queries
-
-
Field Summary
Fields Modifier and Type Field Description protected DataSourceClientInteraction
_dataSourceClientInteraction
The manager handling the data sourcesprotected DataSourceFactoryExtensionPoint
_dataSourceFactoryEP
The manager for data source factoriesprotected QueryDao
_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
Constructors Constructor Description GetDataSourceQueriesAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map
act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
protected Map<String,Object>
dataSourceTypeToJSON(DataSourceClientInteraction.DataSourceType dataSourceType)
Get the JSON representation of a type of data sourceprotected Map<String,Object>
queryToJSON(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 Detail
-
_dataSourceClientInteraction
protected DataSourceClientInteraction _dataSourceClientInteraction
The manager handling the data sources
-
_dataSourceFactoryEP
protected DataSourceFactoryExtensionPoint _dataSourceFactoryEP
The manager for data source factories
-
-
Constructor Detail
-
GetDataSourceQueriesAction
public GetDataSourceQueriesAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- 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
protected Map<String,Object> queryToJSON(Query query)
Gets query's properties to JSON format- Parameters:
query
- The query- Returns:
- The query's properties
-
-