Class SynchronizableContentsCollectionDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollectionDAO
- All Implemented Interfaces:
 LogEnabled,Disposable,Initializable,Component,Contextualizable,Serviceable
public class SynchronizableContentsCollectionDAO
extends AbstractLogEnabled
implements Component, Serviceable, Initializable, Contextualizable, Disposable
DAO for accessing 
SynchronizableContentsCollection- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionaddCollection(Map<String, Object> values) Add a newSynchronizableContentsCollectionvoidcontextualize(Context context) voiddispose()editCollection(String id, Map<String, Object> values) getCollectionParameterValues(String collectionId) Gets the values of the parameters of the given collectionGets the configuration for creating/editing a collection of synchronizable contents.getSupportedUserDirectories(String populationId) Gets the supported user directories (i.e.getSynchronizableContentsCollection(String collectionId) Get a synchronizable contents collection by its idgetSynchronizableContentsCollectionAsJson(String collectionId) Gets a synchronizable contents collection to JSON formatGets a synchronizable contents collection to JSON formatGet the synchronizable contents collectionsvoidRemoves the given collectionvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger 
- 
Field Details
- 
ROLE
Avalon Role - 
SCC_PARAMETERS_SEPARATOR
Separator for parameters with model id as prefix- See Also:
 
 
 - 
 - 
Constructor Details
- 
SynchronizableContentsCollectionDAO
public SynchronizableContentsCollectionDAO() 
 - 
 - 
Method Details
- 
initialize
- Specified by:
 initializein interfaceInitializable- Throws:
 Exception
 - 
contextualize
- Specified by:
 contextualizein interfaceContextualizable- Throws:
 ContextException
 - 
service
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 - 
getSynchronizableContentsCollectionAsJson
Gets a synchronizable contents collection to JSON format- Parameters:
 collectionId- The id of the synchronizable contents collection to get- Returns:
 - An object representing a 
SynchronizableContentsCollection 
 - 
getSynchronizableContentsCollectionAsJson
public Map<String,Object> getSynchronizableContentsCollectionAsJson(SynchronizableContentsCollection collection) Gets a synchronizable contents collection to JSON format- Parameters:
 collection- The synchronizable contents collection to get- Returns:
 - An object representing a 
SynchronizableContentsCollection 
 - 
getSynchronizableContentsCollections
Get the synchronizable contents collections- Returns:
 - the synchronizable contents collections
 
 - 
getSynchronizableContentsCollection
Get a synchronizable contents collection by its id- Parameters:
 collectionId- The id of collection- Returns:
 - the synchronizable contents collection or 
nullif not found 
 - 
getEditionConfiguration
Gets the configuration for creating/editing a collection of synchronizable contents.- Returns:
 - A map containing information about what is needed to create/edit a collection of synchronizable contents
 - Throws:
 Exception- If an error occurs.
 - 
getCollectionParameterValues
Gets the values of the parameters of the given collection- Parameters:
 collectionId- The id of the collection- Returns:
 - The values of the parameters
 
 - 
getSupportedUserDirectories
Gets the supported user directories (i.e. user directories based on a datasource) of the population in a json map- Parameters:
 populationId- The id of the user population- Returns:
 - the supported user directories (i.e. user directories based on a datasource) of the population in a json map
 
 - 
addCollection
Add a newSynchronizableContentsCollection- Parameters:
 values- The parameters' values- Returns:
 - The id of new created collection or null in case of error
 - Throws:
 ProcessingException- if creation failed
 - 
editCollection
public Map<String,Object> editCollection(String id, Map<String, Object> values) throws ProcessingException- Parameters:
 id- The id of collection to editvalues- The parameters' values- Returns:
 - The id of new created collection or null in case of error
 - Throws:
 ProcessingException- if edition failed
 - 
removeCollection
Removes the given collection- Parameters:
 id- The id of the collection to remove- Returns:
 - A map containing the id of the removed collection, or an error
 
 - 
dispose
- Specified by:
 disposein interfaceDisposable
 
 -