Class CourseSynchronizableContentsCollection
- java.lang.Object
-
- org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
-
- org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
-
- org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
-
- org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsCollection
-
- org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsWithCatalogCollection
-
- org.ametys.plugins.odfsync.apogee.scc.impl.CourseSynchronizableContentsCollection
-
- All Implemented Interfaces:
SynchronizableContentsCollection
,ApogeeSynchronizableContentsCollection
,Configurable
,Contextualizable
,Serviceable
public class CourseSynchronizableContentsCollection extends AbstractApogeeSynchronizableContentsWithCatalogCollection
SCC for course contents.
-
-
Field Summary
Fields Modifier and Type Field Description protected OdfReferenceTableHelper
_odfRefTableHelper
The ODF reference table helperprotected ShareableCourseHelper
_shareableCourseHelper
The shareable course helperstatic String
MODEL_ID
SCC model id-
Fields inherited from class org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsWithCatalogCollection
_catalogsManager
-
Fields inherited from class org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsCollection
__PARAM_COLUMNS, __PARAM_COLUMNS_COLUMN, __PARAM_CRITERIA, __PARAM_CRITERIA_CRITERION, __PARAM_CRITERIA_CRITERION_ID, __PARAM_CRITERIA_CRITERION_LABEL, __PARAM_CRITERIA_CRITERION_TYPE, __PARAM_ID_COLUMN, __PARAM_MAPPING, __PARAM_MAPPING_ATTRIBUTE, __PARAM_MAPPING_METADATA_REF, __PARAM_MAPPING_SYNCHRO, _apogeeDAO, _apogeeSCCHelper, _columns, _context, _criteria, _idColumn, _jsonUtils, _mapping, _odfHelper, _odfLang, _sccDAO, _syncFields, PARAM_ADD_UNEXISTING_CHILDREN, PARAM_DATASOURCE_ID, PARAM_YEAR
-
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_contentHelper, _synchronizingContentOperatorEP
-
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_contentWorkflowHelper, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, SCC_UNIQUE_ID
-
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_contentDAO, _contentPrefix, _contentType, _contentTypeEP, _id, _initialActionId, _label, _languages, _modelId, _modelParamValues, _removalSync, _reportMails, _resolver, _restrictedField, _sccHelper, _searchModelConfiguration, _synchronizeActionId, _synchronizeExistingContentsOnly, _synchronizingContentOperator, _validateActionId, _validateAfterImport, _workflowName
-
Fields inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
COLLECTION_ID_DATA_NAME, RESULT_NB_CREATED_CONTENTS, RESULT_NB_DELETED_CONTENTS, RESULT_NB_NOT_CHANGED_CONTENTS, RESULT_NB_SYNCHRONIZED_CONTENTS
-
-
Constructor Summary
Constructors Constructor Description CourseSynchronizableContentsCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Map<String,Object>>
_search(Map<String,Object> searchParameters, org.slf4j.Logger logger)
Search the contents with the search parameters.ContentSynchronizationResult
additionalImportOperations(ModifiableContent content, Map<String,Object> additionalParameters, org.slf4j.Logger logger)
Add specific fields to the content.protected Map<String,Object>
getAdditionalAttributeValues(String idValue, Content content, Map<String,Object> additionalParameters, boolean create, org.slf4j.Logger logger)
Retrieves additional values to synchronize for a contentprotected String
getChildrenAttributeName()
Get the attribute name to get childrenprotected String
getChildrenSCCModelId()
Get the children SCC model id.protected String
getMappingName()
Get the name of the mapping.protected Set<String>
getNotSynchronizedRelatedContentIds(Content content, Map<String,Object> contentValues, Map<String,Object> additionalParameters, String lang, org.slf4j.Logger logger)
Retrieves the ids of the contents related to the given content but that are not part of the synchronizationprotected Pair<String,Object>
getParentAttribute(ModifiableContent parent)
Retrieves the attribute to synchronize for the given parent (as aPair
of name and value)protected List<ModifiableContent>
importCourseParts(Content course, org.slf4j.Logger logger)
Creates the course parts of the currentCourse
.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsWithCatalogCollection
_getAdditionalInputsForContentCreation, _getExpressionsList
-
Methods inherited from class org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsCollection
_addUnexistingChildren, _convertBigDecimal, _convertBigDecimal, _getChildrenRemoteSyncCode, _getSort, _importChildren, _importContent, _importUnexistingChildren, _internalPopulate, _isChildWillBeRemoved, _synchronizeChildren, _synchronizeContent, _transformClobToString, _transformListOfMap2MapOfList, addUnexistingChildren, configureDataSource, configureSearchModel, contextualize, getClobColumns, getDataSourceId, getIdColumn, getIdField, getLanguages, getLocalAndExternalFields, getParentFromAdditionalParameters, getParentIdFromAdditionalParameters, getRemoteValues, getRichTextFields, getTotalCount, getYear, handleChildren, handleRightAssignmentContext, importContent, importOrSynchronizeChildren, importOrSynchronizeContents, internalSearch, populate, putIdParameter, synchronizeContent
-
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_editContent, _fillContent, _getContentsToRemove, _handleContent, _importOrSynchronizeContent, _importOrSynchronizeContent, _importOrSynchronizeContents, _isHandled, _transformRemoteValues, configure, createContentAction, getContent, getTransformedRemoteValues, search, updateSyncInformations, validateContent
-
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_deleteContents, _getContentPathQuery, _hasSomethingChanged, _isParamNotEmpty, _logSynchronizationResult, _removeEmptyParameters, createContentAction, deleteUnexistingContents, empty, getSynchronizationResult, sendErrorMail, validateContent
-
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_parseLanguages, _parseParameters, _transformRemoteValuesCardinality, configureStaticParams, getContentPrefix, getContentType, getId, getInitialActionId, getLabel, getParameterValues, getReportMails, getRestrictedField, getSearchModelConfiguration, getSynchronizeActionId, getSynchronizeCollectionModelId, getSynchronizingContentOperator, getValidateActionId, getWorkflowName, removalSync, synchronizeExistingContentsOnly, validateAfterImport
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
additionalCommonOperations, additionalSynchronizeOperations
-
-
-
-
Field Detail
-
MODEL_ID
public static final String MODEL_ID
SCC model id- See Also:
- Constant Field Values
-
_odfRefTableHelper
protected OdfReferenceTableHelper _odfRefTableHelper
The ODF reference table helper
-
_shareableCourseHelper
protected ShareableCourseHelper _shareableCourseHelper
The shareable course helper
-
-
Constructor Detail
-
CourseSynchronizableContentsCollection
public CourseSynchronizableContentsCollection()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractApogeeSynchronizableContentsWithCatalogCollection
- Throws:
ServiceException
-
_search
protected List<Map<String,Object>> _search(Map<String,Object> searchParameters, org.slf4j.Logger logger)
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Search the contents with the search parameters. Use id parameter to search an unique content.- Specified by:
_search
in classAbstractApogeeSynchronizableContentsCollection
- Parameters:
searchParameters
- Search parameterslogger
- The logger- Returns:
- A Map of mapped metadatas extract from Apogée database ordered by content unique Apogée ID
-
getMappingName
protected String getMappingName()
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Get the name of the mapping.- Specified by:
getMappingName
in classAbstractApogeeSynchronizableContentsCollection
- Returns:
- the mapping name
-
getAdditionalAttributeValues
protected Map<String,Object> getAdditionalAttributeValues(String idValue, Content content, Map<String,Object> additionalParameters, boolean create, org.slf4j.Logger logger)
Description copied from class:AbstractSimpleSynchronizableContentsCollection
Retrieves additional values to synchronize for a content- Overrides:
getAdditionalAttributeValues
in classAbstractApogeeSynchronizableContentsCollection
- Parameters:
idValue
- id value of the contentcontent
- The contentadditionalParameters
- Additional parameterscreate
-true
if the content has been newly created,false
otherwiselogger
- The logger- Returns:
- the values to add
-
getParentAttribute
protected Pair<String,Object> getParentAttribute(ModifiableContent parent)
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Retrieves the attribute to synchronize for the given parent (as aPair
of name and value)- Overrides:
getParentAttribute
in classAbstractApogeeSynchronizableContentsCollection
- Parameters:
parent
- the parent content- Returns:
- the parent attribute
-
getNotSynchronizedRelatedContentIds
protected Set<String> getNotSynchronizedRelatedContentIds(Content content, Map<String,Object> contentValues, Map<String,Object> additionalParameters, String lang, org.slf4j.Logger logger)
Description copied from class:AbstractSimpleSynchronizableContentsCollection
Retrieves the ids of the contents related to the given content but that are not part of the synchronization- Overrides:
getNotSynchronizedRelatedContentIds
in classAbstractApogeeSynchronizableContentsCollection
- Parameters:
content
- contentcontentValues
- the content values that will be setadditionalParameters
- Additional parameterslang
- Language of the contentlogger
- The logger- Returns:
- the ids of the contents that are not part of the synchronization
-
additionalImportOperations
public ContentSynchronizationResult additionalImportOperations(ModifiableContent content, Map<String,Object> additionalParameters, org.slf4j.Logger logger)
Description copied from interface:SynchronizableContentsCollection
Add specific fields to the content.- Parameters:
content
- Content to updateadditionalParameters
- Additional parameterslogger
- The logger- Returns:
- The synchronization result of the import additional operations
-
getChildrenSCCModelId
protected String getChildrenSCCModelId()
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Get the children SCC model id. Can be null if no implementation is defined.- Overrides:
getChildrenSCCModelId
in classAbstractApogeeSynchronizableContentsCollection
- Returns:
- the children SCC model id
-
getChildrenAttributeName
protected String getChildrenAttributeName()
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Get the attribute name to get children- Specified by:
getChildrenAttributeName
in classAbstractApogeeSynchronizableContentsCollection
- Returns:
- the attribute name to get children
-
importCourseParts
protected List<ModifiableContent> importCourseParts(Content course, org.slf4j.Logger logger)
Creates the course parts of the currentCourse
.- Parameters:
course
- The currentCourse
logger
- The logger- Returns:
- The list of the imported course parts
-
-