Class SynchronizableContentsCollectionHelper
- java.lang.Object
 - 
- org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollectionHelper
 
 
- 
- All Implemented Interfaces:
 Component,Serviceable
public class SynchronizableContentsCollectionHelper extends Object implements Serviceable, Component
Helper for Synchronizable Contents Collections. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected SynchronizableContentsCollectionDAO_sccDAOSCC DAOstatic StringROLEThe Avalon Role 
- 
Constructor Summary
Constructors Constructor Description SynchronizableContentsCollectionHelper() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SynchronizableContentsCollectiongetSCCFromModelId(String modelId)Get the firstSynchronizableContentsCollectionfound for the given SCC model id.Map<String,Map<String,List<Object>>>organizeRemoteValuesByMetadata(Map<String,Map<String,Object>> searchResult, Map<String,List<String>> mapping)Transform results to be organized by metadata, and remove the null values.voidservice(ServiceManager smanager) 
 - 
 
- 
- 
Field Detail
- 
_sccDAO
protected SynchronizableContentsCollectionDAO _sccDAO
SCC DAO 
 - 
 
- 
Constructor Detail
- 
SynchronizableContentsCollectionHelper
public SynchronizableContentsCollectionHelper()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 
- 
getSCCFromModelId
public SynchronizableContentsCollection getSCCFromModelId(String modelId)
Get the firstSynchronizableContentsCollectionfound for the given SCC model id.- Parameters:
 modelId- Id of the SCC model- Returns:
 - The first SCC found or null
 
 
- 
organizeRemoteValuesByMetadata
public Map<String,Map<String,List<Object>>> organizeRemoteValuesByMetadata(Map<String,Map<String,Object>> searchResult, Map<String,List<String>> mapping)
Transform results to be organized by metadata, and remove the null values.- Parameters:
 searchResult- Remote values from a search by content and column or attributemapping- Mapping between metadata and columns/attributes- Returns:
 - A 
Mapof possible metadata values organized by content synchronization key and metadata name 
 
 - 
 
 -