Class AbstractConnector
- All Implemented Interfaces:
ConnectorLocal,ConnectorPersistLocal,ConnectorPersistRemote,ConnectorRemote,PersistConnectorRemote,PluginControl,PublishingManagementConnector
This class implements all relevant connector interfaces using simple default implementations.
-
Methods for reading data (interface
ConnectorRemote) from content system will return NotImplementedException. -
Methods for writing data (interface
PersistConnectorRemote) to content system will return NotImplementedException. -
Methods for bulk writing data (interface
ConnectorPersistRemote) to content system will return NotImplementedException. -
Methods for handling configuration life-cycle (interface
PluginControl) are fully implemented.
These methods depend on your implementation of the abstract methods getMappedName(), getConnectorLibrary(), getConfigurationClass().
Plug-in Life-Cycle
Deployment of the connector does not have any effects: no special initialization will be started.
Changing a configuration in the repository will trigger reading the configurations through the afterCreateConfigurations(String, PluginConfigCollection), afterDeleteConfigurations(String, PluginConfigCollection), afterUpdateConfigurations(String, PluginConfigCollection) implementations.
Overriding any of the "repository events" should call for the super classes method. E.g.
@Override
public void afterUpdateConfigurations(String sessionId, PluginConfigCollection updatedConfigs) throws PluginException {
// your code goes here
super.afterUpdateConfigurations(sessionId, updatedConfigs);
}
The first use of getInstanceConfig(String) will also trigger reading the configurations. getInstanceConfig(String) is typically called in any of the data reading/writing method like getRootBuckets etc.
The first use of getInstanceData(String) will trigger reading the additional data through fetchInstanceData(Configuration). getInstanceData(String) is also typically called in any of the data reading/writing method like getRootBuckets etc.
Minimal Connector Example
This is a minimal implementation of a subclass of AbstractConnector.
Beside the AbstractConnector subclass you will also have to subclass AbstractConnector.Configuration and AbstractConnector.Library.
@Stateless(mappedName = DemoConnector.MAPPED_NAME)
@PubServerPlugin
public class DemoConnector extends AbstractConnector implements ConnectorLocal {
protected static final Logger LOGGER = LoggerFactory.getLogger(DemoConnector.class);
public static final String MAPPED_NAME = "com.priint.pubserver.plugins.connector.demo.DemoConnector";
protected static final Class<?> DATA_CLASS = Document.class;
protected static final Class<? extends Configuration> CONFIG_CLASS = DemoConnectorConfig.class;
@EJB
private DemoConnectorLibrary pluginLibrary;
@Override
protected Class<? extends Configuration> getConfigurationClass() {
return CONFIG_CLASS;
}
@Override
protected Library getConnectorLibrary() {
return this.pluginLibrary;
}
@Override
protected Logger getLogger() {
return LOGGER;
}
@Override
protected String getMappedName() {
return MAPPED_NAME;
}
@Override
protected Object fetchInstanceData(Configuration connectorConfig) {
// implement this if you need initialization of connector instance
// the object you return here will be cached
// and can be retrieved using getInstanceData(instanceName)
return null;
}
// list of implemented data getter and setter methods starting with getRootBuckets.
@Override
@PubServerMethod(type = PluginMethod.MethodType.CONNECTOR, description = "")
public List<Bucket> getRootBuckets(Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException,
DataSourceException, ConnectorException {
try {
// your code goes here
} catch (DataSourceException | ConnectorException e) {
throw e;
} catch (Throwable e) {
throw new DemoConnectorException("Unknown exception", e);
}
}
// continue with override of other methods ...
}- Since:
- 4.0.5, 4.1.7 added method getInstanceNames()
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase class for connector configurations.static classSimple implementation of PluginLibraryControl for a connector.Nested classes/interfaces inherited from interface com.priint.pubserver.plugin.interfaces.ConnectorPersistRemote
ConnectorPersistRemote.EntityDataRecord, ConnectorPersistRemote.EntityDataRecord4Update, ConnectorPersistRemote.PushCommand, ConnectorPersistRemote.PushDataNested classes/interfaces inherited from interface com.priint.pubserver.plugin.interfaces.ConnectorRemote
ConnectorRemote.Direction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRootPlannings(List<Planning> plannings) This method add new plannings on root levelvoidafterCreateConfigurations(String sessionId, PluginConfigCollection createdConfigs) This method is called by the ConfigurationManager after adding configuration files.voidafterDeleteConfigurations(String sessionId, PluginConfigCollection deletedConfigs) This method is called by the ConfigurationManager after deleting configuration files.voidafterUpdateConfigurations(String sessionId, PluginConfigCollection updatedConfigs) This method is called by the ConfigurationManager after the check-in of configuration files.bulkInsert(List<EntityItem> entityItems) bulkUpsert(List<EntityItem> entityItems) callMethodByName(String methodName, Class<?>[] argTypes, Object[] argValues) This method provides a reflection call to methods of JPAUtils.voidchangeParentRealGridElementForPlannedBuckets(List<Planning> planningList, Planning realGridElemet) This method move a the list of planned buckets to the new Real Grid ElementvoidClean JPA cache for connectorcommitItems(List<EntityItem> entityItemList) voiddeleteBuckets(List<Bucket> buckets) voiddeleteContentMetaData(List<ContentMetaData> contentMetaData) Deletes list of ContentMetaDatavoiddeleteCords(List<Cord> cords) voiddeleteKeyValues(List<KeyValue> keyValues) voiddeleteMediaAssets(List<MediaAsset> mediaAssets) voiddeletePlanning(List<Planning> planning) voiddeletePlannings(List<String> planningIds) voiddeletePrices(List<Price> prices) voiddeleteTableDataCells(List<TableDataCell> tableDataCells) voiddeleteTableDataRows(List<TableDataRow> tableDataRow) voiddeleteTableDatas(List<TableData> tableDatas) voiddeleteTexts(List<Text> texts) intexecuteNativeCall(String call) FOR INTERNAL USE ONLY.
Execute a native sql call like
"update con_bucket set identifier = 'Y' where identifier = 'X';"<T,J> List<T> executeNativeQuery(String call, Class<J> clazz) FOR INTERNAL USE ONLY.
Execute a native sql query like
"select * from con_bucket;"fetchInstanceData(AbstractConnector.Configuration connectorConfig) Retrieve initialization data for a configuration.getBuckets(String searchStr, Context context, ConnectorEntity connectorEntity) Searching for certain buckets via context and searchStr alone.getBucketsByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) Searching for buckets via group identifier and optional context, connectorEntity and label.getBucketsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) Searching for buckets via identifier and optional context, connectorEntity and label.getChildBuckets(String bucketId, Context context, ConnectorEntity connectorEntity, String parentBucketConnectorEntity, String searchStr) Get the subordinated buckets for a given bucket.protected abstract Class<? extends AbstractConnector.Configuration>For every entity in the publishing server the correspondent entity from the connector is deposited.getConnectorEntities(String instance) Get entities supported by the content system.protected abstract AbstractConnector.LibrarygetContentMetadataByIdentifier(String metaDataId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given identifier.getContentMetadataOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given bucket.getContentMetadataOfCord(String cordId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given cordId.getContentMetadataOfKeyValue(String keyValueId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given key value.getContentMetadataOfMediaAsset(String mediaAssetId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given mediaAssetId.getContentMetadataOfMetadata(String metaDataId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given metaDataId.getContentMetadataOfPlanning(String planningId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given planningId.getContentMetadataOfPrice(String priceId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given priceId.getContentMetadataOfTableData(String tableDataId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given tableDataId.getContentMetadataOfText(String textId, Context context, ConnectorEntity connectorEntity, String searchStr) Get content meta data for a given textId.Retrieves a list of existing contexts in the data source.getCordedBuckets(String bucketId, Context context, ConnectorRemote.Direction directed, ConnectorEntity connectorEntity, String searchStr) Get buckets which are connected via cords.getCords(String searchStr, Context context, ConnectorEntity connectorEntity) Searching for certain Cords via context and searchStr alone.getCordsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get cord by its identifier.getCordsOfBuckets(String bucketId, ConnectorEntity connectorEntity, Context context, ConnectorRemote.Direction directed, String searchStr) Get cords of a bucket.getCountOfCordRefsOfPlanning(String planningId, Context context) This method returns a number of planned cords in given planninggetCountOfKeyValueRefsOfPlanning(String planningId, Context context) This method returns a number of planned key values in given planninggetCountOfMediaAssetRefsOfPlanning(String planningId, Context context) This method returns a number of planned media assets in given planninggetCountOfPriceRefsOfPlanning(String planningId, Context context) This method returns a number of planned prices in given planninggetCountOfSubBucketRefsOfPlanning(String planningId, Context context) This method returns a number of planned sub-buckets in given planninggetCountOfTextRefsOfPlanning(String planningId, Context context) This method returns a number of planned texts in given planninggetInstanceConfig(String instanceName) Get configuration for a connector instance.getInstanceData(String instanceName) Get data object for a connector instance.protected Collection<String>Get the names of all currently loaded configuration instances.getKeyValues(String searchStr, Context context, ConnectorEntity connectorEntity) Get certain keyValues by context and searchStr alone.getKeyValuesByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get key value objects via group identifier.getKeyValuesByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get keyvalue objects via its identifier.getKeyValuesOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) Get key value objects for a given bucket.protected abstract org.slf4j.Loggerprotected abstract StringgetMediaAssets(String searchStr, Context context, ConnectorEntity connectorEntity) Searching for certain MediaAssets via context and searchStr alone.getMediaAssetsByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get media assets for a group identifier.getMediaAssetsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get media assets for an identifier.getMediaAssetsOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) Get media assets for a given bucket.getNextIdentifier(Class<?> clazz) getObjectList(Map<String, Object> Params, String NQN, Class<EntityData> clazz) Temporary method to created complicated statements.Get a list of origins existing in the data.getPlanningByDocument(String documentId, ConnectorEntity connectorEntity, String searchStr) This method returns a List of Planning objects searched by the referenced documentIdgetPlanningByDocumentAndPage(String documentId, String pageIndex, Context context, ConnectorEntity connectorEntity, String resultEntityId, String searchString) This method returns a list of planning objects searched by the referenced pageIndex in given documentgetPlanningByIdentifier(String identifier, ConnectorEntity connectorEntity, String searchStr) This method returns a List of Planning objects searched by their IdentifiergetPlanningByPage(String pageId, ConnectorEntity connectorEntity, String searchStr) This method returns a List of Planning objects searched by the referenced pageIdgetPlanningByPage(String pageIndex, Context context, ConnectorEntity connectorEntity, String resultEntityId, String searchString) This method returns a list of planning objects searched by the referenced pageIndex in given documentgetPlanningOfBucket(String identifier, String entityIdentifier, String modelIdentifier, int deleted) getPlanningsBySnippetId(String snippetId) This method returns plannings with assigned snippet by snippet idgetPlanningsBySnippetOrigin(String snippetOriginId, Context context, String resultEntityId, String searchString) getPlanningsBySourcePlanningId(String sourcePlanningId, Context context, String resultEntityId, String searchString) getPlanningsOfPageBySnippetOrigin(String snippetOriginId, int pageIndex, Context context, String resultEntityId, String searchString) getPlanningsOfPageBySourcePlanningId(String sourcePlanningId, int pageIndex, Context context, String resultEntityId, String searchString) getPrices(String searchStr, Context context, ConnectorEntity connectorEntity) Get Prices matching a certain context and searchStr alone.getPricesByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get prices for a group identifier.getPricesByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get prices via identifier.getPricesOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) Get prices for a given bucket.getProposedEntities(String origin) Infer entity model base data from data source.getRootBuckets(Context context, ConnectorEntity connectorEntity, String searchStr) Returns the top level nodes from an hierarchy.getRootContentMetadataOfPlanning(String parentId, Context context, ConnectorEntity connectorEntity, String searchStr) getSubPlanning(String parentPlanningId) This method returns sub PlanninggetTableData(String searchStr, Context context, ConnectorEntity connectorEntity) Get TableData matching a certain context and searchStr alone.getTableDataByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get tables for a group identifier.getTableDataByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get table data by its identifier.getTableDataOfBucket(String parentBucketId, Context context, ConnectorEntity connectorEntity, String searchStr) Get table data for a given bucket.getTexts(String searchStr, Context context, ConnectorEntity connectorEntity) Searching for certain texts via context and searchStr.getTextsByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get texts via group identifier.getTextsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) Get text by its identifier.getTextsOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) Get texts for a given bucket.voidinitInstance(String mappedName, String instanceName) Will be called when a plug-in is created by the plugin manager.voidinsert(EntityData entityData) final ObjectinvalidateInstanceData(String instanceName) Unset initialization data for a configuration.booleanmerge(EntityItem entityDataRecord) Method performs an update of given record.
Record which is to be updated must exist in database.booleanmerge(ConnectorPersistRemote.EntityDataRecord4Update entityDataRecord4Update) Deprecated.since 4.1.6booleanmergeItems(List<EntityItem> entityDataRecordList) Method performsConnectorPersistRemote.merge(EntityItem)on the given list of records.
Listed records must exists in databasebooleanmergeList(List<ConnectorPersistRemote.EntityDataRecord4Update> entityDataRecord4UpdateList) Deprecated.since 4.1.6persist(EntityData entityData) persist(EntityItem entityItem) Performs an insert of a new record.persistItems(List<EntityItem> entityItemList) PerformsConnectorPersistRemote.persist(EntityItem)on each item of the given list of records.
Listed records must not exists in database.persistList(List<EntityData> entityDataList) persistListFromSerializedFiles(List<String> serFiles) booleanremove(EntityItem entityDataRecord) Performs record deletion from data source.booleanremove(ConnectorPersistRemote.EntityDataRecord entityDataRecord) Deprecated.since 4.1.6booleanremoveItems(List<EntityItem> entityDataRecordList) PerformsConnectorPersistRemote.remove(EntityItem)on the given list of records.booleanremoveList(List<ConnectorPersistRemote.EntityDataRecord> entityDataRecordList) Deprecated.since 4.1.6setBuckets(List<Bucket> buckets, String searchStr) Persist a List of BucketsetContentMetaData(List<ContentMetaData> contentMetaData) Persists a list of ContentMetaDataPersist a CordPersist a List of CordssetKeyValues(List<KeyValue> keyValues, String searchStr) Persist a List of KeyValuesetMediaAssets(List<MediaAsset> mediaAssets, String searchStr) Persist a List of MediaAssetsvoidsetPlanning(Planning planning, String searchStr) This method persist a Planning objectPersist a List of PricessetTableData(TableData tableData, String searchStr) Persist a TableDatasetTableDataCell(TableDataCell tableDataCells, String searchStr) Persist a TableDataCellsetTableDataCells(List<TableDataCell> tableDataCells, String searchStr) Persist a list of TableDataCellssetTableDataRow(TableDataRow tableDataRow, String searchStr) Persist a TableDataRowsetTableDataRows(List<TableDataRow> tableDataRow, String searchStr) Persist a list of TableDataRowssetTableDatas(List<TableData> tableDatas, String searchStr) Persist a list of TableDataPersist a List of Textvoidupdate(ConnectorPersistRemote.EntityDataRecord4Update entityDataRecord4Update) Deprecated.since 4.1.6updateConfigurations(String sessionId, PluginConfigCollection updateConfigs) Called by the ConfigManager before configurations in the domain of this plugin are created or updated.voidupdatePlanning(Planning planning) voidupdatePlannings(List<Planning> plannings) voidupdateSequenceOfRootPlanning(List<Planning> plannings) This method sorts plannings on root levelvoidvalidateConfigurations(PluginConfigCollection configCollection) Validate a list of plug-in configurations.Methods inherited from class com.priint.pubserver.plugin.PluginControlDefault
createConfiguration, deleteConfigurations, getSession, getSessionId, loadServerConfig, ping, readSessionAttribute, writeSessionAttributeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.priint.pubserver.plugin.interfaces.PluginControl
createConfiguration, deleteConfigurations, loadServerConfig, pingMethods inherited from interface com.priint.pubserver.plugin.interfaces.PublishingManagementConnector
clonePlanningsOfDocument
-
Constructor Details
-
AbstractConnector
public AbstractConnector()
-
-
Method Details
-
getLogger
protected abstract org.slf4j.Logger getLogger() -
getMappedName
-
getConnectorLibrary
-
getConfigurationClass
-
validateConfigurations
Description copied from interface:PluginControlValidate a list of plug-in configurations.This will throw an exception if a configuration is null.
If will also throw an exception if the configuration is not XML schema valid.
It might also throw an exception if other more specific requirements of the plug-in are not met.Please refer to the detailed message of the exception for more information.
The default implementation of this methods will just pass through.
- Specified by:
validateConfigurationsin interfacePluginControl- Throws:
PluginException- if any configuration is null or invalid.
-
updateConfigurations
public PluginConfigCollection updateConfigurations(String sessionId, PluginConfigCollection updateConfigs) throws PluginException Description copied from interface:PluginControlCalled by the ConfigManager before configurations in the domain of this plugin are created or updated.
This method allows plugin developers to react to configuration changes. If the plugin is derived from PluginControlDefault, there is usually no need to override the default implementation.
You can override this method, to- change the application status (e.g. clean caches etc.), depending on the items being updated
- pre-process files (e.g. calculate fields or dependencies) of items being updated
- add configuration files to the set of files, which are to be updated or created
- remove files from the set of files, which are to be updated or created
This method is called at the beginning of the update processing chain, i.e. before calculating dependencies and before persisting items in the repository. Items contained in the updateConfig collection do not necessarily exist in the repository at this stage. By removing items from the collection, you can prevent certain files from being updated or created at all.
If the method returns null, the return value is ignored and the collection passed to the method as parameter is used for further processing.
Note: this method is called outside of the checkin transaction. If you perform checkin or delete operations in your updateConfigurations implementation, these are run as separate transactions. If the main transaction fails, these transactions will not be rolled back.
Note: starting with Version 4.1 / Revision 12465, there are two important changes to the behavior of this method:
- this method may be called several times during an update process:
- the first call contains the list of files requested for update, which was provided by the client
- the second call contains additional dependent files found for the list of files returned by the first call
- subsequent calls contain additional dependent files found for the list of files obtained from the previous call
- this method may be called during a delete process, if deletion of certain configurations triggers changes in dependent files. The method is not called for files, which are to be deleted anyway.
The default implementation is:
public PluginConfigCollection updateConfigurations( String sessionId, PluginConfigCollection updateConfigs) throws PluginException { return updateConfigs; }This would have the same effect:
public PluginConfigCollection updateConfigurations( String sessionId, PluginConfigCollection updateConfigs) throws PluginException { return null; }To process and return all configurations, use this code skeleton:
public PluginConfigCollection updateConfigurations( String sessionId PluginConfigCollection updateConfigs) throws PluginException { for (String path : updateConfigs.getKeySet()) { PluginConfigDataHandler config = updateConfigs.getConfigDataHandler(path); // // TODO: your pre-processing... // } return updatedConfigs; // returning null would have the same effect }Disallow any configuration changes:
public PluginConfigCollection updateConfigurations( String sessionId, PluginConfigCollection updateConfigs) throws PluginException { return PluginConfigCollection.createEmptySet(); }- Specified by:
updateConfigurationsin interfacePluginControl- Overrides:
updateConfigurationsin classPluginControlDefault- Parameters:
sessionId- Identifier of the current sessionupdateConfigs- the configurations currently being updated- Returns:
- the pre-processed or filtered configuration items or null, if the updateConfigs collection should be used for further processing.
- Throws:
PluginException
-
afterCreateConfigurations
public void afterCreateConfigurations(String sessionId, PluginConfigCollection createdConfigs) throws PluginException Description copied from interface:PluginControlThis method is called by the ConfigurationManager after adding configuration files.
Usually the implementation of this method will trigger the reload of the configuration.
- Specified by:
afterCreateConfigurationsin interfacePluginControl- Overrides:
afterCreateConfigurationsin classPluginControlDefault- Parameters:
sessionId- Identifier of the current sessioncreatedConfigs- the configurations that have being created- Throws:
PluginException
-
afterDeleteConfigurations
public void afterDeleteConfigurations(String sessionId, PluginConfigCollection deletedConfigs) throws PluginException Description copied from interface:PluginControlThis method is called by the ConfigurationManager after deleting configuration files.
Usually the implementation of this method will trigger the reload of the configuration. If your application caches configurations, this would be the right place to refresh caches.
Note: starting with Version 4.1, Revision 12465, the list of files also contains all dependent files, which were deleted.
- Specified by:
afterDeleteConfigurationsin interfacePluginControl- Overrides:
afterDeleteConfigurationsin classPluginControlDefault- Parameters:
sessionId- Identifier of the current sessiondeletedConfigs- the configurations that have being deleted- Throws:
PluginException
-
afterUpdateConfigurations
public void afterUpdateConfigurations(String sessionId, PluginConfigCollection updatedConfigs) throws PluginException Description copied from interface:PluginControlThis method is called by the ConfigurationManager after the check-in of configuration files.
Usually the implementation of this method will trigger the reload of the configuration.
If your application caches configurations, this would be the right place to refresh caches.Note: starting with Version 4.1, Revision 12465, the list of files also contains all dependent files, which were updated.
Furthermore, this method is also called after updating dependent files during a delete process.- Specified by:
afterUpdateConfigurationsin interfacePluginControl- Overrides:
afterUpdateConfigurationsin classPluginControlDefault- Parameters:
sessionId- Identifier of the current sessionupdatedConfigs- collection of configurations that have being updated- Throws:
PluginException
-
getConnectorEntities
public List<ConnectorEntity> getConnectorEntities() throws NotImplementedException, DataSourceException, ConnectorExceptionDescription copied from interface:ConnectorRemoteFor every entity in the publishing server the correspondent entity from the connector is deposited.This method returns ALL connector entities served by the content system via the connector.
- Specified by:
getConnectorEntitiesin interfaceConnectorRemote- Returns:
- List of ALL connector entities served by the content system via the connector or an empty list if no entities are served by the content system.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getConnectorEntities
public List<ConnectorEntity> getConnectorEntities(String instance) throws NotImplementedException, DataSourceException, ConnectorException Get entities supported by the content system.This is an extension to the ConnectorRemote interface. The default method in that interface only works for single instance connectors.
- Parameters:
instance-- Returns:
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getRootBuckets
public List<Bucket> getRootBuckets(Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteReturns the top level nodes from an hierarchy.- Specified by:
getRootBucketsin interfaceConnectorRemote- Parameters:
context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all matching root buckets or an empty list if no matching root buckets are found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getChildBuckets
public List<Bucket> getChildBuckets(String bucketId, Context context, ConnectorEntity connectorEntity, String parentBucketConnectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet the subordinated buckets for a given bucket.- Specified by:
getChildBucketsin interfaceConnectorRemote- Parameters:
bucketId- The ID of the source bucket of all subordinated buckets.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.parentBucketConnectorEntity- A content system specific hint used to find the parent bucket, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label (e.g. part ofcon_bucket.label) or value field of the content.
Implementation may be connector specific.- Returns:
- List of all subordinated buckets from one given bucket or
an empty list if no matching buckets are found. - Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getCordedBuckets
public List<Bucket> getCordedBuckets(String bucketId, Context context, ConnectorRemote.Direction directed, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet buckets which are connected via cords.The cords are directional connections. That means: A cord points from a source bucket to a destination bucket. Therefore you have to decide which buckets to return:
- the buckets where the current bucket points to
- the buckets which points to the current bucket
- both of them
- Specified by:
getCordedBucketsin interfaceConnectorRemote- Parameters:
bucketId- Id of the source bucket in the content system.context- Optional context needed to restrict the query to certain language, country, etc.directed- Indication if only the buckets needed which point away from or point to the source bucket or both.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label (e.g. part ofcon_bucket.label) or value field of the content.
Implementation may be connector specific.- Returns:
- List of buckets which are connected with the source bucket via cords or an empty list if no matching buckets are found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getBucketsByGroupIdentifier
public List<Bucket> getBucketsByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteSearching for buckets via group identifier and optional context, connectorEntity and label.- Specified by:
getBucketsByGroupIdentifierin interfaceConnectorRemote- Parameters:
groupIdentifier- Group identifier of the bucket.
The group identifier must NOT be unique. Associated with the context it will be unique.
If no context is indicated, all context variations will be given back.context- Optional context needed to get the language and the country of the context..connectorEntity- The connectorEntity for which buckets have to give out.searchStr- Optional part ofcon_bucket.label, the internal name of the container.- Returns:
- A List of matching buckets or
an empty list if no matching buckets are found. - Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getBucketsByIdentifier
public List<Bucket> getBucketsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteSearching for buckets via identifier and optional context, connectorEntity and label.- Specified by:
getBucketsByIdentifierin interfaceConnectorRemote- Parameters:
identifier- Identifier of the buckets in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- A List of matching buckets or
an empty list if no matching buckets are found. - Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getBuckets
public List<Bucket> getBuckets(String searchStr, Context context, ConnectorEntity connectorEntity) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteSearching for certain buckets via context and searchStr alone.- Specified by:
getBucketsin interfaceConnectorRemote- Parameters:
searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.- Returns:
- List of all needed buckets or an empty list if no bucket has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getCordsOfBuckets
public List<Cord> getCordsOfBuckets(String bucketId, ConnectorEntity connectorEntity, Context context, ConnectorRemote.Direction directed, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet cords of a bucket.The cords are directional connections. That means: A cord points from a source bucket to a destination bucket. Therefore you have to decide which cords to return:
- the cords where the current bucket points to
- the cords which points to the current bucket
- both of them
- Specified by:
getCordsOfBucketsin interfaceConnectorRemote- Parameters:
bucketId- Id of the source bucket in the content system.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.context- Optional context needed to restrict the query to certain language, country, etc..directed- Indication if only the buckets needed which point away from or point to the source bucket or both.searchStr- Search pattern typically used for filtering the label (e.g. part ofcon_cord.label) or value field of the content.
Implementation may be connector specific.- Returns:
- A List of matching cords or an empty list if no matching cords are found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getCords
public List<Cord> getCords(String searchStr, Context context, ConnectorEntity connectorEntity) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteSearching for certain Cords via context and searchStr alone.- Specified by:
getCordsin interfaceConnectorRemote- Parameters:
searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.- Returns:
- List of all needed Cords or an empty list if no Cords has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getCordsByIdentifier
public List<Cord> getCordsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet cord by its identifier.- Specified by:
getCordsByIdentifierin interfaceConnectorRemote- Parameters:
identifier- Identifier of the searched cords in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all needed cords or an empty list if no cords has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTextsOfBucket
public List<Text> getTextsOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet texts for a given bucket.- Specified by:
getTextsOfBucketin interfaceConnectorRemote- Parameters:
bucketId- Id of the source bucket in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all texts from a given bucket or an empty list if the bucket has no texts matching context and searchStr.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTexts
public List<Text> getTexts(String searchStr, Context context, ConnectorEntity connectorEntity) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteSearching for certain texts via context and searchStr.- Specified by:
getTextsin interfaceConnectorRemote- Parameters:
searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.- Returns:
- List of all matching texts or an empty list if no texts has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTextsByIdentifier
public List<Text> getTextsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet text by its identifier.- Specified by:
getTextsByIdentifierin interfaceConnectorRemote- Parameters:
identifier- Identifier of the searched texts in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all needed texts or an empty list if no texts has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTextsByGroupIdentifier
public List<Text> getTextsByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet texts via group identifier.- Specified by:
getTextsByGroupIdentifierin interfaceConnectorRemote- Parameters:
groupIdentifier- Group identifier of the texts. The group identifier must NOT be unique. Associated with the context it will be unique. If no context is indicated, all context variations will be returned.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all needed texts or an empty list if no texts has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getKeyValuesOfBucket
public List<KeyValue> getKeyValuesOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet key value objects for a given bucket.- Specified by:
getKeyValuesOfBucketin interfaceConnectorRemote- Parameters:
bucketId- Id of the source bucket in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all key value objects from a given bucket or an empty list if the bucket has no matching key value objects.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getKeyValuesByIdentifier
public List<KeyValue> getKeyValuesByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet keyvalue objects via its identifier.- Specified by:
getKeyValuesByIdentifierin interfaceConnectorRemote- Parameters:
identifier- Identifier of the key values in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all keyvalue objects for a given identifier or an empty list if no matching keyvalue objects have been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getKeyValuesByGroupIdentifier
public List<KeyValue> getKeyValuesByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet key value objects via group identifier.- Specified by:
getKeyValuesByGroupIdentifierin interfaceConnectorRemote- Parameters:
groupIdentifier- Group identifier of the key values. The group identifier must NOT be unique. Associated with the context it will be unique. If no context is indicated, all context variations will be returned.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all key value objects for a given group identifier or an empty list if no matching key value objects could be found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getKeyValues
public List<KeyValue> getKeyValues(String searchStr, Context context, ConnectorEntity connectorEntity) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet certain keyValues by context and searchStr alone.- Specified by:
getKeyValuesin interfaceConnectorRemote- Parameters:
searchStr- Search pattern typically used for filtering the label (e.g. part ofcon_key_value.key_label) or value field of the content.
Implementation may be connector specific.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.- Returns:
- List of all matching keyValues or an empty list if no keyValues has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getMediaAssetsOfBucket
public List<MediaAsset> getMediaAssetsOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet media assets for a given bucket.- Specified by:
getMediaAssetsOfBucketin interfaceConnectorRemote- Parameters:
bucketId- Id of the source bucket in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all matching media assets for a given bucket or an empty list if no media assets have been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getMediaAssetsByIdentifier
public List<MediaAsset> getMediaAssetsByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet media assets for an identifier.- Specified by:
getMediaAssetsByIdentifierin interfaceConnectorRemote- Parameters:
identifier- Identifier of the searched media assetscontext- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all matching media assets for an identifier or an empty list if no media assets have been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getMediaAssetsByGroupIdentifier
public List<MediaAsset> getMediaAssetsByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet media assets for a group identifier.- Specified by:
getMediaAssetsByGroupIdentifierin interfaceConnectorRemote- Parameters:
groupIdentifier- Group identifier of the media assets. The group identifier must NOT be unique. Associated with the context it will be unique. If no context is indicated, all context variations will be returned.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all matching media assets or an empty list if no media assets has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getMediaAssets
public List<MediaAsset> getMediaAssets(String searchStr, Context context, ConnectorEntity connectorEntity) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteSearching for certain MediaAssets via context and searchStr alone.- Specified by:
getMediaAssetsin interfaceConnectorRemote- Parameters:
searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.- Returns:
- List of all matching mediaAssets or an empty list if no mediaAssets has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getPricesOfBucket
public List<Price> getPricesOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet prices for a given bucket.- Specified by:
getPricesOfBucketin interfaceConnectorRemote- Parameters:
bucketId- Id of the source bucket in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of prices for a given bucket or an empty list if no matching prices have been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getPricesByIdentifier
public List<Price> getPricesByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet prices via identifier.- Specified by:
getPricesByIdentifierin interfaceConnectorRemote- Parameters:
identifier- Identifier of the searched pricescontext- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of matching prices or an empty list if no prices has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getPricesByGroupIdentifier
public List<Price> getPricesByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet prices for a group identifier.- Specified by:
getPricesByGroupIdentifierin interfaceConnectorRemote- Parameters:
groupIdentifier- Group identifier of the prices. The group identifier must NOT be unique. Associated with the context it will be unique. If no context is indicated, all context variations will be returned.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of matching prices or an empty list if no prices has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getPrices
public List<Price> getPrices(String searchStr, Context context, ConnectorEntity connectorEntity) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet Prices matching a certain context and searchStr alone.- Specified by:
getPricesin interfaceConnectorRemote- Parameters:
searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.- Returns:
- List of all matching prices or an empty list if no prices has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTableData
public List<TableData> getTableData(String searchStr, Context context, ConnectorEntity connectorEntity) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet TableData matching a certain context and searchStr alone.- Specified by:
getTableDatain interfaceConnectorRemote- Parameters:
searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.- Returns:
- List of all matching tables or an empty list if no table has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTableDataByGroupIdentifier
public List<TableData> getTableDataByGroupIdentifier(String groupIdentifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet tables for a group identifier.- Specified by:
getTableDataByGroupIdentifierin interfaceConnectorRemote- Parameters:
groupIdentifier- Group identifier of the tables. The group identifier must NOT be unique. Associated with the context it will be unique. If no context is indicated, all context variations will be returned.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of matching tables or an empty list if no table has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTableDataByIdentifier
public List<TableData> getTableDataByIdentifier(String identifier, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet table data by its identifier.- Specified by:
getTableDataByIdentifierin interfaceConnectorRemote- Parameters:
identifier- Identifier of the searched table data in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all needed table data or an empty list if no table data has been found.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getTableDataOfBucket
public List<TableData> getTableDataOfBucket(String parentBucketId, Context context, ConnectorEntity connectorEntity, String searchStr) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet table data for a given bucket.- Specified by:
getTableDataOfBucketin interfaceConnectorRemote- Parameters:
parentBucketId- Id of the source bucket in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering the label or value field of the content. Implementation may be connector specific.- Returns:
- List of all table data from a given bucket or an empty list if the bucket has no table data matching context and searchStr.
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
setCord
public Cord setCord(Cord cord, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a Cord- Specified by:
setCordin interfacePersistConnectorRemote- Parameters:
cord- A Cord objectsearchStr- Search string- Returns:
- persisted Cord.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setTableData
public TableData setTableData(TableData tableData, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a TableData- Specified by:
setTableDatain interfacePersistConnectorRemote- Parameters:
tableData- A TableData objectsearchStr- Search string- Returns:
- persisted TableData.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setTableDataRow
public TableDataRow setTableDataRow(TableDataRow tableDataRow, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a TableDataRow- Specified by:
setTableDataRowin interfacePersistConnectorRemote- Parameters:
tableDataRow- A TableDataRow objectsearchStr- Search string- Returns:
- persisted TableDataRow.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setTableDataCell
public TableDataCell setTableDataCell(TableDataCell tableDataCells, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a TableDataCell- Specified by:
setTableDataCellin interfacePersistConnectorRemote- Parameters:
tableDataCells- A TableDataCell objectsearchStr- Search string- Returns:
- persisted TableDataCell.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
persist
Description copied from interface:ConnectorPersistRemotePerforms an insert of a new record. IfBucketis to be inserted, and object holds the structure, the whole structure will be inserted including: subBuckets, KeyValues, Texts, Prices, MediaAssets, MediaObjects, Context
Record which is to be inserted must not exists in database, the only one exception isContext. If existing context will be passed as a part of the structure, the existing one will be used.Checking the existence of
Context- When identifier of Context is passed id will be used for checking
- When no identifier is provided it will be created based on language and country, and then used for existence checking
- Specified by:
persistin interfaceConnectorPersistRemote- Parameters:
entityItem- The structure containing the entity data item in "value" field.- Returns:
- inserted object or null, if fails.
- Throws:
ConnectorException
-
persistItems
Description copied from interface:ConnectorPersistRemotePerformsConnectorPersistRemote.persist(EntityItem)on each item of the given list of records.
Listed records must not exists in database.The operation may or may not be transactional safe depending on the connector implementation. Please see the connector documentation.
- Specified by:
persistItemsin interfaceConnectorPersistRemote- Parameters:
entityItemList- list ofEntityItem. Each item will contain the actual entity data in its "value" field.- Returns:
- list of inserted objects or empty list, if it fails.
- Throws:
ConnectorException
-
persistListFromSerializedFiles
public List<EntityItem> persistListFromSerializedFiles(List<String> serFiles) throws ConnectorException - Specified by:
persistListFromSerializedFilesin interfaceConnectorPersistRemote- Returns:
- entityItems
- Throws:
ConnectorException
-
merge
Description copied from interface:ConnectorPersistRemoteMethod performs an update of given record.
Record which is to be updated must exist in database.- Specified by:
mergein interfaceConnectorPersistRemote- Parameters:
entityDataRecord- structure of information about record to be modified- Returns:
- true if update succeed
- Throws:
ConnectorException
-
mergeItems
Description copied from interface:ConnectorPersistRemoteMethod performsConnectorPersistRemote.merge(EntityItem)on the given list of records.
Listed records must exists in database- Specified by:
mergeItemsin interfaceConnectorPersistRemote- Parameters:
entityDataRecordList- list of items containing either a value or a push map to update fields of the underlying item.- Returns:
- true if update succeed
- Throws:
ConnectorException
-
remove
Description copied from interface:ConnectorPersistRemotePerforms record deletion from data source.It is up to the connector how this deletion is implemented. E.g. how related objects are also removed. The only requirements are: (1) A persist of the same item after a remove should be successful (other things being equal). (2) A getByIdentifier after a remove should return an empty list.
Depending on the connector implementation different handling of exceptional state may occur. E.g. you may get ConnectorException encapsulating an INDEX VIOLATION.
- Specified by:
removein interfaceConnectorPersistRemote- Parameters:
entityDataRecord- information about entity to be processed- Returns:
- true, if remove succeed.
- Throws:
ConnectorException
-
removeItems
Description copied from interface:ConnectorPersistRemotePerformsConnectorPersistRemote.remove(EntityItem)on the given list of records.- Specified by:
removeItemsin interfaceConnectorPersistRemote- Parameters:
entityDataRecordList- list of information about entities to be removed.- Returns:
- true on success
- Throws:
ConnectorException
-
commitItems
Description copied from interface:ConnectorPersistRemotePerforms the command defined for eachEntityIteminListon theEntityItem.The details of this operation may differ between connectors.
(1) the operation as a whole may or may not be transactional safe.
(2) the single operations may be chunked (by action type or number of items) and executed in "batch" mode.- Specified by:
commitItemsin interfaceConnectorPersistRemote- Parameters:
entityItemList- List ofEntityItemwith command to be performed.- Returns:
- List of items
EntityItemwith status and message as created by insert, update or delete operation. - Throws:
ConnectorException
-
bulkInsert
Description copied from interface:ConnectorPersistRemotePerforms the insert command for eachEntityIteminListon theEntityItem.The details of this operation may differ between connectors.
(1) the operation as a whole may be transactional safe.- Specified by:
bulkInsertin interfaceConnectorPersistRemote- Parameters:
entityItems- List ofEntityItemwith command to be performed.- Returns:
- List of items
EntityItemwith status and message as created by insert - Throws:
ConnectorException
-
bulkUpsert
Description copied from interface:ConnectorPersistRemotePerforms the upsert command for eachEntityIteminListon theEntityItem.The details of this operation may differ between connectors.
(1) the operation as a whole may be transactional safe.- Specified by:
bulkUpsertin interfaceConnectorPersistRemote- Parameters:
entityItems- List ofEntityItemwith command to be performed.- Returns:
- List of items
EntityItemwith status and message as created by insert - Throws:
ConnectorException
-
getNextIdentifier
- Specified by:
getNextIdentifierin interfaceConnectorPersistRemote- Returns:
- identifier
- Throws:
ConnectorException
-
executeNativeCall
Description copied from interface:ConnectorPersistRemoteFOR INTERNAL USE ONLY.
Execute a native sql call like
"update con_bucket set identifier = 'Y' where identifier = 'X';"- Specified by:
executeNativeCallin interfaceConnectorPersistRemote- Parameters:
call- the native sql-command to run- Returns:
- the number of affected entities
-
executeNativeQuery
Description copied from interface:ConnectorPersistRemoteFOR INTERNAL USE ONLY.
Execute a native sql query like
"select * from con_bucket;"- Specified by:
executeNativeQueryin interfaceConnectorPersistRemote- Parameters:
call- the native sql-query to runclazz- the corresponding entity class of the returned data- Returns:
- a List of the found entity data
-
getContextList
public List<Context> getContextList() throws NotImplementedException, DataSourceException, ConnectorExceptionDescription copied from interface:ConnectorPersistRemoteRetrieves a list of existing contexts in the data source.- Specified by:
getContextListin interfaceConnectorPersistRemote- Returns:
- list of contexts
- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
getObjectList
public List<EntityData> getObjectList(Map<String, Object> Params, String NQN, Class<EntityData> clazz) throws ConnectorExceptionDescription copied from interface:ConnectorPersistRemoteTemporary method to created complicated statements. It will be used only in Import Methods!- Specified by:
getObjectListin interfaceConnectorPersistRemote- Returns:
- Throws:
ConnectorException
-
callMethodByName
public List<Object> callMethodByName(String methodName, Class<?>[] argTypes, Object[] argValues) throws ConnectorException Description copied from interface:ConnectorPersistRemoteThis method provides a reflection call to methods of JPAUtils. All static methods of JPAUtils can be called using a reflection call approach please note that due to some casting and compilation issue, argTypes[0] will always be PublishingHubDBConnector.class and argValues[0]= this Other argType and argValue can be passed based on the method programmer wants to call from JPAUtils.java- Specified by:
callMethodByNamein interfaceConnectorPersistRemote- Parameters:
methodName- - method name to call using reflectionargTypes- - argTypes of called method parametersargValues- - argValues of called methods- Returns:
- if called method returns anything then the same will be added to List
- Throws:
ConnectorException
-
insert
- Specified by:
insertin interfaceConnectorPersistRemote- Throws:
ConnectorException
-
getPlanningsBySnippetId
public List<Planning> getPlanningsBySnippetId(String snippetId) throws ConnectorException, DataSourceException Description copied from interface:PublishingManagementConnectorThis method returns plannings with assigned snippet by snippet id- Specified by:
getPlanningsBySnippetIdin interfacePublishingManagementConnector- Parameters:
snippetId- identifier of the snippet- Returns:
- List of plannings
- Throws:
ConnectorExceptionDataSourceException
-
getPlanningsBySourcePlanningId
public List<Planning> getPlanningsBySourcePlanningId(String sourcePlanningId, Context context, String resultEntityId, String searchString) throws DataSourceException, ConnectorException - Specified by:
getPlanningsBySourcePlanningIdin interfacePublishingManagementConnector- Returns:
- Throws:
DataSourceExceptionConnectorException
-
getPlanningsOfPageBySourcePlanningId
public List<Planning> getPlanningsOfPageBySourcePlanningId(String sourcePlanningId, int pageIndex, Context context, String resultEntityId, String searchString) throws DataSourceException, ConnectorException - Specified by:
getPlanningsOfPageBySourcePlanningIdin interfacePublishingManagementConnector- Returns:
- Throws:
DataSourceExceptionConnectorException
-
getPlanningsBySnippetOrigin
public List<Planning> getPlanningsBySnippetOrigin(String snippetOriginId, Context context, String resultEntityId, String searchString) throws DataSourceException, ConnectorException - Specified by:
getPlanningsBySnippetOriginin interfacePublishingManagementConnector- Returns:
- Throws:
DataSourceExceptionConnectorException
-
getPlanningsOfPageBySnippetOrigin
public List<Planning> getPlanningsOfPageBySnippetOrigin(String snippetOriginId, int pageIndex, Context context, String resultEntityId, String searchString) throws DataSourceException, ConnectorException - Specified by:
getPlanningsOfPageBySnippetOriginin interfacePublishingManagementConnector- Returns:
- Throws:
DataSourceExceptionConnectorException
-
getPlanningByDocumentAndPage
public List<Planning> getPlanningByDocumentAndPage(String documentId, String pageIndex, Context context, ConnectorEntity connectorEntity, String resultEntityId, String searchString) throws DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a list of planning objects searched by the referenced pageIndex in given document- Specified by:
getPlanningByDocumentAndPagein interfacePublishingManagementConnector- Parameters:
documentId- document IDpageIndex- zero based index of the page in the documentcontext- context criteria, including documentIdconnectorEntity- connector entityresultEntityId- entity Id of the result recordssearchString- search string- Returns:
- list of Planning
- Throws:
DataSourceExceptionConnectorException
-
getProposedEntities
Description copied from interface:ConnectorPersistRemoteInfer entity model base data from data source.- Specified by:
getProposedEntitiesin interfaceConnectorPersistRemote- Returns:
- The proposed entities.
- Throws:
ConnectorException
-
getOrigins
Description copied from interface:ConnectorPersistRemoteGet a list of origins existing in the data.An origin is typically something like a importId.
Implementation is connector specific. Most connectors will not support this and just return null or empty list.
- Specified by:
getOriginsin interfaceConnectorPersistRemote- Returns:
- list of origins (or null or empty list)
- Throws:
ConnectorException
-
getPlanningByIdentifier
public List<Planning> getPlanningByIdentifier(String identifier, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a List of Planning objects searched by their Identifier- Specified by:
getPlanningByIdentifierin interfacePublishingManagementConnector- Parameters:
identifier- planning identifierconnectorEntity- connector entitysearchStr- search string- Returns:
- list of Planning
- Throws:
DataSourceExceptionConnectorException
-
getPlanningByDocument
public List<Planning> getPlanningByDocument(String documentId, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a List of Planning objects searched by the referenced documentId- Specified by:
getPlanningByDocumentin interfacePublishingManagementConnector- Parameters:
documentId- document IdconnectorEntity- connector entitysearchStr- search string- Returns:
- list of Planning
- Throws:
DataSourceExceptionConnectorException
-
getPlanningByPage
public List<Planning> getPlanningByPage(String pageId, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a List of Planning objects searched by the referenced pageId- Specified by:
getPlanningByPagein interfacePublishingManagementConnector- Parameters:
pageId- page IdconnectorEntity- connector entitysearchStr- search string- Returns:
- list of Planning
- Throws:
DataSourceExceptionConnectorException
-
setPlanning
public void setPlanning(Planning planning, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method persist a Planning object- Specified by:
setPlanningin interfacePublishingManagementConnector- Parameters:
planning- planning object to persistsearchStr- search string- Throws:
DataSourceExceptionConnectorException
-
setBuckets
public List<Bucket> setBuckets(List<Bucket> buckets, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a List of Bucket- Specified by:
setBucketsin interfacePersistConnectorRemote- Parameters:
buckets- A List of Bucket objectsearchStr- Search string- Returns:
- List of persisted buckets.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setTexts
public List<Text> setTexts(List<Text> texts, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a List of Text- Specified by:
setTextsin interfacePersistConnectorRemote- Parameters:
texts- A List of Text objectssearchStr- Search string- Returns:
- List of persisted text.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setKeyValues
public List<KeyValue> setKeyValues(List<KeyValue> keyValues, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a List of KeyValue- Specified by:
setKeyValuesin interfacePersistConnectorRemote- Parameters:
keyValues- A List of KeyValue objectsearchStr- Search string- Returns:
- List of persisted KeyValue.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setMediaAssets
public List<MediaAsset> setMediaAssets(List<MediaAsset> mediaAssets, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a List of MediaAssets- Specified by:
setMediaAssetsin interfacePersistConnectorRemote- Parameters:
mediaAssets- A MediaAsset objectsearchStr- Search string- Returns:
- List of persisted MediaAssets.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setPrices
public List<Price> setPrices(List<Price> prices, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a List of Prices- Specified by:
setPricesin interfacePersistConnectorRemote- Parameters:
prices- A Price objectsearchStr- Search string- Returns:
- List of persisted Prices.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setCords
public List<Cord> setCords(List<Cord> cords, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a List of Cords- Specified by:
setCordsin interfacePersistConnectorRemote- Parameters:
cords- a List of CordssearchStr- Search string- Returns:
- List of persisted Cords.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setTableDatas
public List<TableData> setTableDatas(List<TableData> tableDatas, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a list of TableData- Specified by:
setTableDatasin interfacePersistConnectorRemote- Parameters:
tableDatas- A TableData objectsearchStr- Search string- Returns:
- List of persisted TableData.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setTableDataRows
public List<TableDataRow> setTableDataRows(List<TableDataRow> tableDataRow, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a list of TableDataRows- Specified by:
setTableDataRowsin interfacePersistConnectorRemote- Parameters:
tableDataRow- A TableDataRow objectsearchStr- Search string- Returns:
- List of persisted TableDataRows.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
setTableDataCells
public List<TableDataCell> setTableDataCells(List<TableDataCell> tableDataCells, String searchStr) throws ConnectorException, DataSourceException, NotImplementedException Description copied from interface:PersistConnectorRemotePersist a list of TableDataCells- Specified by:
setTableDataCellsin interfacePersistConnectorRemote- Parameters:
tableDataCells- A TableDataCell objectsearchStr- Search string- Returns:
- List of persisted TableDataCells.
- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteBuckets
public void deleteBuckets(List<Bucket> buckets) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteBucketsin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteTexts
public void deleteTexts(List<Text> texts) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteTextsin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteKeyValues
public void deleteKeyValues(List<KeyValue> keyValues) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteKeyValuesin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteMediaAssets
public void deleteMediaAssets(List<MediaAsset> mediaAssets) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteMediaAssetsin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deletePrices
public void deletePrices(List<Price> prices) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deletePricesin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteCords
public void deleteCords(List<Cord> cords) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteCordsin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteTableDatas
public void deleteTableDatas(List<TableData> tableDatas) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteTableDatasin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteTableDataRows
public void deleteTableDataRows(List<TableDataRow> tableDataRow) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteTableDataRowsin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deleteTableDataCells
public void deleteTableDataCells(List<TableDataCell> tableDataCells) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deleteTableDataCellsin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
deletePlanning
public void deletePlanning(List<Planning> planning) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
deletePlanningin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
getPlanningOfBucket
public List<Planning> getPlanningOfBucket(String identifier, String entityIdentifier, String modelIdentifier, int deleted) throws ConnectorException, DataSourceException, NotImplementedException - Specified by:
getPlanningOfBucketin interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceExceptionNotImplementedException
-
getPlanningByPage
public List<Planning> getPlanningByPage(String pageIndex, Context context, ConnectorEntity connectorEntity, String resultEntityId, String searchString) throws DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a list of planning objects searched by the referenced pageIndex in given document- Specified by:
getPlanningByPagein interfacePublishingManagementConnector- Parameters:
pageIndex- zero based index of the page in the documentcontext- context criteria, including documentIdconnectorEntity- connector entityresultEntityId- entity Id of the result recordssearchString- search string- Returns:
- list of Planning
- Throws:
DataSourceExceptionConnectorException
-
getSubPlanning
public List<Planning> getSubPlanning(String parentPlanningId) throws ConnectorException, DataSourceException Description copied from interface:PublishingManagementConnectorThis method returns sub Planning- Specified by:
getSubPlanningin interfacePublishingManagementConnector- Parameters:
parentPlanningId- identifier of parent Planning- Returns:
- list of sub plannings
- Throws:
ConnectorExceptionDataSourceException
-
setContentMetaData
public List<ContentMetaData> setContentMetaData(List<ContentMetaData> contentMetaData) throws ConnectorException, DataSourceException Description copied from interface:PersistConnectorRemotePersists a list of ContentMetaData- Specified by:
setContentMetaDatain interfacePersistConnectorRemote- Returns:
- Throws:
ConnectorExceptionDataSourceException
-
deleteContentMetaData
public void deleteContentMetaData(List<ContentMetaData> contentMetaData) throws ConnectorException, DataSourceException Description copied from interface:PersistConnectorRemoteDeletes list of ContentMetaData- Specified by:
deleteContentMetaDatain interfacePersistConnectorRemote- Throws:
ConnectorExceptionDataSourceException
-
getContentMetadataByIdentifier
public List<ContentMetaData> getContentMetadataByIdentifier(String metaDataId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given identifier.- Specified by:
getContentMetadataByIdentifierin interfaceConnectorRemote- Parameters:
metaDataId- Id of the source contentMetaData in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given metaDataId or an empty list if the contentMetaData not exists or no matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfBucket
public List<ContentMetaData> getContentMetadataOfBucket(String bucketId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given bucket.- Specified by:
getContentMetadataOfBucketin interfaceConnectorRemote- Parameters:
bucketId- Id of the source bucket in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given bucket or an empty list if the bucket has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfKeyValue
public List<ContentMetaData> getContentMetadataOfKeyValue(String keyValueId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given key value.- Specified by:
getContentMetadataOfKeyValuein interfaceConnectorRemote- Parameters:
keyValueId- Id of the source keyValue in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given keyValue or an empty list if the keyValue has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfPlanning
public List<ContentMetaData> getContentMetadataOfPlanning(String planningId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given planningId.- Specified by:
getContentMetadataOfPlanningin interfaceConnectorRemote- Parameters:
planningId- Id of the source planning in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given planning or an empty list if the planning has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getRootContentMetadataOfPlanning
public List<ContentMetaData> getRootContentMetadataOfPlanning(String parentId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException - Specified by:
getRootContentMetadataOfPlanningin interfaceConnectorRemote- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfTableData
public List<ContentMetaData> getContentMetadataOfTableData(String tableDataId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given tableDataId.- Specified by:
getContentMetadataOfTableDatain interfaceConnectorRemote- Parameters:
tableDataId- Id of the source tableData in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given tableData or an empty list if the tableData has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfMediaAsset
public List<ContentMetaData> getContentMetadataOfMediaAsset(String mediaAssetId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given mediaAssetId.- Specified by:
getContentMetadataOfMediaAssetin interfaceConnectorRemote- Parameters:
mediaAssetId- Id of the source mediaAsset in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given mediaAsset or an empty list if the mediaAsset has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfCord
public List<ContentMetaData> getContentMetadataOfCord(String cordId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given cordId.- Specified by:
getContentMetadataOfCordin interfaceConnectorRemote- Parameters:
cordId- Id of the source cord in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given cord or an empty list if the cord has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfText
public List<ContentMetaData> getContentMetadataOfText(String textId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given textId.- Specified by:
getContentMetadataOfTextin interfaceConnectorRemote- Parameters:
textId- Id of the source text in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given text or an empty list if the text has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfPrice
public List<ContentMetaData> getContentMetadataOfPrice(String priceId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given priceId.- Specified by:
getContentMetadataOfPricein interfaceConnectorRemote- Parameters:
priceId- Id of the source price in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given price or an empty list if the price has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
getContentMetadataOfMetadata
public List<ContentMetaData> getContentMetadataOfMetadata(String metaDataId, Context context, ConnectorEntity connectorEntity, String searchStr) throws DataSourceException, ConnectorException Description copied from interface:ConnectorRemoteGet content meta data for a given metaDataId.- Specified by:
getContentMetadataOfMetadatain interfaceConnectorRemote- Parameters:
metaDataId- Id of the source contentMetaData in the content system.context- Optional context needed to restrict the query to certain language, country, etc.connectorEntity- A hint specific to the connector or content system for where to find the data, e.g. a table name or the value of a keyed column in a database.searchStr- Search pattern typically used for filtering result of the method. Implementation may be connector specific.- Returns:
- List of content meta data for a given contentMetaData or an empty list if the contentMetaData has no content meta data matching context and searchStr.
- Throws:
DataSourceExceptionConnectorException
-
changeParentRealGridElementForPlannedBuckets
public void changeParentRealGridElementForPlannedBuckets(List<Planning> planningList, Planning realGridElemet) throws ConnectorException, DataSourceException This method move a the list of planned buckets to the new Real Grid Element- Specified by:
changeParentRealGridElementForPlannedBucketsin interfacePublishingManagementConnector- Parameters:
planningList- list of PlanningrealGridElemet- realGridElelemt- Throws:
ConnectorExceptionDataSourceException
-
getInstanceConfig
public AbstractConnector.Configuration getInstanceConfig(String instanceName) throws ConnectorException Get configuration for a connector instance.You will have to cast the result to you subclass of
AbstractConnector.Configuration.- Parameters:
instanceName- defined in entity model and retrieved viaConnectorEntity.getInstance().- Returns:
- configuration object - never null.
- Throws:
ConnectorException- if instance cannot be found
-
getInstanceData
Get data object for a connector instance.Object can be of any type and must be casted to your instance Data object type.
Object is set through
fetchInstanceData(Configuration)whengetInstanceData(String)is called the first time for an instance.- Parameters:
instanceName- defined in entity model and retrieved viaConnectorEntity.getInstance().- Returns:
- connector instance or null if not existing.
- Throws:
ConnectorException- if instance configuration cannot be foundDataSourceException- if fetchInstanceData is called and fails
-
fetchInstanceData
public Object fetchInstanceData(AbstractConnector.Configuration connectorConfig) throws DataSourceException Retrieve initialization data for a configuration.Called by
getInstanceData(String)if data is not set.- Parameters:
connectorConfig-- Returns:
- any object or null
- Throws:
DataSourceException- if instance data retrieval fails
-
invalidateInstanceData
Unset initialization data for a configuration.This will trigger a new
fetchInstanceData(Configuration)whengetInstanceData(String)is called for the next time.- Parameters:
instanceName-- Returns:
- old object or null
-
initInstance
Description copied from interface:PluginControlWill be called when a plug-in is created by the plugin manager.Typically used with stateful beans, e.g. connectors, that provide named instances.
Do not use with stateless beans. For stateless beans use @PostConstruct instead.
- Specified by:
initInstancein interfacePluginControl- Overrides:
initInstancein classPluginControlDefault- Parameters:
mappedName- Mapped name as defined in the @Stateful bean annotation of the plugin class.instanceName- Name of the specific instance of the plug-in, if multiple instances are allowed. e.g. if you have variant of a connector running alternatively with database schema 1 and schema 2 of a content system, or a viewer plug-in supporting legacy web-browsers and mobile browser, etc.- Throws:
PluginException
-
getInstanceNames
Get the names of all currently loaded configuration instances.- Returns:
-
persist
- Specified by:
persistin interfaceConnectorPersistRemote- Throws:
ConnectorException
-
persistList
- Specified by:
persistListin interfaceConnectorPersistRemote- Throws:
ConnectorException
-
merge
@Deprecated public boolean merge(ConnectorPersistRemote.EntityDataRecord4Update entityDataRecord4Update) throws ConnectorException Deprecated.since 4.1.6- Specified by:
mergein interfaceConnectorPersistRemote- Throws:
ConnectorException
-
mergeList
@Deprecated public boolean mergeList(List<ConnectorPersistRemote.EntityDataRecord4Update> entityDataRecord4UpdateList) throws ConnectorException Deprecated.since 4.1.6- Specified by:
mergeListin interfaceConnectorPersistRemote- Throws:
ConnectorException
-
remove
@Deprecated public boolean remove(ConnectorPersistRemote.EntityDataRecord entityDataRecord) throws ConnectorException Deprecated.since 4.1.6- Specified by:
removein interfaceConnectorPersistRemote- Throws:
ConnectorException
-
removeList
@Deprecated public boolean removeList(List<ConnectorPersistRemote.EntityDataRecord> entityDataRecordList) throws ConnectorException Deprecated.since 4.1.6- Specified by:
removeListin interfaceConnectorPersistRemote- Throws:
ConnectorException
-
update
@Deprecated public void update(ConnectorPersistRemote.EntityDataRecord4Update entityDataRecord4Update) throws ConnectorException Deprecated.since 4.1.6- Specified by:
updatein interfaceConnectorPersistRemote- Throws:
ConnectorException
-
getCountOfMediaAssetRefsOfPlanning
public Long getCountOfMediaAssetRefsOfPlanning(String planningId, Context context) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a number of planned media assets in given planning- Specified by:
getCountOfMediaAssetRefsOfPlanningin interfacePublishingManagementConnector- Parameters:
planningId- planning identifiercontext- context criteria- Returns:
- number of planned media assets (Long)
- Throws:
DataSourceExceptionConnectorExceptionNotImplementedException
-
getCountOfTextRefsOfPlanning
public Long getCountOfTextRefsOfPlanning(String planningId, Context context) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a number of planned texts in given planning- Specified by:
getCountOfTextRefsOfPlanningin interfacePublishingManagementConnector- Parameters:
planningId- planning identifiercontext- context criteria- Returns:
- number of planned media assets (Long)
- Throws:
DataSourceExceptionConnectorExceptionNotImplementedException
-
getCountOfKeyValueRefsOfPlanning
public Long getCountOfKeyValueRefsOfPlanning(String planningId, Context context) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a number of planned key values in given planning- Specified by:
getCountOfKeyValueRefsOfPlanningin interfacePublishingManagementConnector- Parameters:
planningId- planning identifiercontext- context criteria- Returns:
- number of planned media assets (Long)
- Throws:
DataSourceExceptionConnectorExceptionNotImplementedException
-
getCountOfPriceRefsOfPlanning
public Long getCountOfPriceRefsOfPlanning(String planningId, Context context) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a number of planned prices in given planning- Specified by:
getCountOfPriceRefsOfPlanningin interfacePublishingManagementConnector- Parameters:
planningId- planning identifiercontext- context criteria- Returns:
- number of planned media assets (Long)
- Throws:
DataSourceExceptionConnectorExceptionNotImplementedException
-
getCountOfCordRefsOfPlanning
public Long getCountOfCordRefsOfPlanning(String planningId, Context context) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a number of planned cords in given planning- Specified by:
getCountOfCordRefsOfPlanningin interfacePublishingManagementConnector- Parameters:
planningId- planning identifiercontext- context criteria- Returns:
- number of planned media assets (Long)
- Throws:
DataSourceExceptionConnectorExceptionNotImplementedException
-
getCountOfSubBucketRefsOfPlanning
public Long getCountOfSubBucketRefsOfPlanning(String planningId, Context context) throws NotImplementedException, DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method returns a number of planned sub-buckets in given planning- Specified by:
getCountOfSubBucketRefsOfPlanningin interfacePublishingManagementConnector- Parameters:
planningId- planning identifiercontext- context criteria- Returns:
- number of planned media assets (Long)
- Throws:
DataSourceExceptionConnectorExceptionNotImplementedException
-
clearCaches
Clean JPA cache for connector- Specified by:
clearCachesin interfaceConnectorRemote- Throws:
NotImplementedExceptionDataSourceExceptionConnectorException
-
addRootPlannings
public void addRootPlannings(List<Planning> plannings) throws DataSourceException, ConnectorException Description copied from interface:PublishingManagementConnectorThis method add new plannings on root level- Specified by:
addRootPlanningsin interfacePublishingManagementConnector- Parameters:
plannings- - list of planning to add- Throws:
DataSourceExceptionConnectorException
-
deletePlannings
- Specified by:
deletePlanningsin interfacePublishingManagementConnector- Throws:
ConnectorException
-
updatePlanning
- Specified by:
updatePlanningin interfacePublishingManagementConnector- Throws:
ConnectorException
-
updatePlannings
- Specified by:
updatePlanningsin interfacePublishingManagementConnector- Throws:
ConnectorException
-
updateSequenceOfRootPlanning
Description copied from interface:PublishingManagementConnectorThis method sorts plannings on root level- Specified by:
updateSequenceOfRootPlanningin interfacePublishingManagementConnector- Parameters:
plannings- - list of planning to sort- Throws:
ConnectorException
-