Class SCCSearchToolHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.contentio.synchronize.search.SCCSearchToolHelper
-
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
public class SCCSearchToolHelper extends AbstractLogEnabled implements Component, Serviceable
Helper for SCC callables.
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver_resolverThe Ametys resolverprotected SynchronizableContentsCollectionDAO_synchronizableContentsCollectionDAOSCC DAO
-
Constructor Summary
Constructors Constructor Description SCCSearchToolHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getSearchModelConfiguration(String collectionId)Get theSCCSearchModelConfigurationfrom the collectionId.StringgetSyncCode(String contentId, String collectionId)Get the value of the synchronization field.Map<String,Object>importContent(String collectionId, String id, Map<String,Object> additionalParameters)Import the content specified by the id in the specified collection.voidservice(ServiceManager manager)booleansynchronizeContent(String collectionId, String contentId, String syncCode)Synchronize the content on the given collection with the given synchronization code.-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_synchronizableContentsCollectionDAO
protected SynchronizableContentsCollectionDAO _synchronizableContentsCollectionDAO
SCC DAO
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys resolver
-
-
Constructor Detail
-
SCCSearchToolHelper
public SCCSearchToolHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getSearchModelConfiguration
public Map<String,Object> getSearchModelConfiguration(String collectionId)
Get theSCCSearchModelConfigurationfrom the collectionId.- Parameters:
collectionId- Collection ID- Returns:
- The
SCCSearchModelConfiguration
-
importContent
public Map<String,Object> importContent(String collectionId, String id, Map<String,Object> additionalParameters)
Import the content specified by the id in the specified collection.- Parameters:
collectionId- Collection IDid- Synchonization ID of the contentadditionalParameters- Additional parameters- Returns:
- Imported contents
-
synchronizeContent
public boolean synchronizeContent(String collectionId, String contentId, String syncCode)
Synchronize the content on the given collection with the given synchronization code.- Parameters:
collectionId- Collection IDcontentId- Content IDsyncCode- Synchronization code- Returns:
- true if an error occured
-
getSyncCode
public String getSyncCode(String contentId, String collectionId)
Get the value of the synchronization field.- Parameters:
collectionId- Collection IDcontentId- Content ID- Returns:
- The value of the synchronization field
-
-