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
Modifier and TypeFieldDescriptionprotected OdfReferenceTableHelper
The ODF reference table helperprotected ShareableCourseHelper
The shareable course helperstatic final String
SCC model idFields 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, _extFields, _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
_contentTypeEP, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, _synchroComponent, SCC_UNIQUE_ID
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_contentDAO, _contentPrefix, _contentType, _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_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSearch the contents with the search parameters.protected boolean
additionalImportOperations
(ModifiableDefaultContent content, Map<String, List<Object>> remoteValues, Map<String, Object> importParams, Logger logger) Add specific fields to the content.protected String
Get the metadata name to get parent from childrenprotected String
Get the metadata name to get childrenprotected String
Get the children SCC model id.protected String
Get the name of the mapping.protected boolean
handleChildren
(ModifiableDefaultContent content, boolean create, Logger logger) Set the children metadata and invert relation, import and synchronize the children too.protected boolean
handleParent
(ModifiableDefaultContent currentContent, ModifiableDefaultContent parentContent, Logger logger) Set the parent metadata and invert relation.protected boolean
importCourseParts
(ModifiableDefaultContent content, Logger logger) Set the course parts of the currentCourse
.void
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsWithCatalogCollection
_getExpressionsList, _handleAdditionalMetadata
Methods inherited from class org.ametys.plugins.odfsync.apogee.scc.AbstractApogeeSynchronizableContentsCollection
_addUnexistingChildren, _applyChangesToParentContent, _convertBigDecimal, _convertBigDecimal, _fillContent, _fillRichTexts, _getChildrenRemoteSyncCode, _getSort, _importChildren, _importContent, _importOrSynchronizeContent, _importUnexistingChildren, _internalPopulate, _isChildWillBeRemoved, _resetChildren, _setRichTextValue, _synchronizeChildren, _synchronizeContent, _transformClobToString, _transformListOfMap2MapOfList, additionalCommonOperations, addUnexistingChildren, configureDataSource, configureSearchModel, contextualize, getClobColumns, getDataSourceId, getExternalOnlyFields, getIdColumn, getIdField, getLocalAndExternalFields, getRemoteValues, getRichTextFields, getTotalCount, getYear, handleRightAssignmentContext, importContent, importOrSynchronizeChildren, importOrSynchronizeContents, internalSearch, populate, putIdParameter, setAdditionalMetadata, synchronizeContent
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_getContentsToRemove, _getIdFieldValue, _handleContent, _importOrSynchronizeContent, _importOrSynchronizeContents, _isHandled, additionalSynchronizeOperations, configure, createContentAction, getContent, getTransformedRemoteValues, search, updateSyncInformations, validateContent
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_deleteContents, _getContentPathQuery, _getMetadataHolder, _isParamNotEmpty, _removeEmptyParameters, _removeMetadataIfExists, _synchronizeMetadata, _updateRelation, _updateRelation, applyChanges, applyChanges, createContentAction, deleteUnexistingContents, empty, sendErrorMail, updateSCCProperty, validateContent
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_parseLanguages, _parseParameters, configureStaticParams, getContentPrefix, getContentType, getId, getInitialActionId, getLabel, getLanguages, getParameterValues, getReportMails, getRestrictedField, getSearchModelConfiguration, getSynchronizeActionId, getSynchronizeCollectionModelId, getSynchronizingContentOperator, getValidateActionId, getWorkflowName, removalSync, synchronizeExistingContentsOnly, validateAfterImport
-
Field Details
-
MODEL_ID
SCC model id- See Also:
-
_odfRefTableHelper
The ODF reference table helper
-
-
Constructor Details
-
CourseSynchronizableContentsCollection
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractApogeeSynchronizableContentsWithCatalogCollection
- Throws:
ServiceException
-
_search
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:
searchParams
- Search parameterslogger
- The logger- Returns:
- A Map of mapped metadatas extract from Apogée database ordered by content unique Apogée ID
-
getMappingName
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Get the name of the mapping.- Specified by:
getMappingName
in classAbstractApogeeSynchronizableContentsCollection
- Returns:
- the mapping name
-
additionalImportOperations
protected boolean additionalImportOperations(ModifiableDefaultContent content, Map<String, List<Object>> remoteValues, Map<String, Object> importParams, Logger logger) Description copied from class:AbstractSimpleSynchronizableContentsCollection
Add specific fields to the content.- Overrides:
additionalImportOperations
in classAbstractSimpleSynchronizableContentsCollection
- Parameters:
content
- Content to updateremoteValues
- Values of the contentimportParams
- Import parameterslogger
- The logger- Returns:
true
if there are changes
-
handleParent
protected boolean handleParent(ModifiableDefaultContent currentContent, ModifiableDefaultContent parentContent, Logger logger) Description copied from class:AbstractApogeeSynchronizableContentsCollection
Set the parent metadata and invert relation.- Overrides:
handleParent
in classAbstractApogeeSynchronizableContentsCollection
- Parameters:
currentContent
- Current contentparentContent
- Parent content to setlogger
- The logger- Returns:
true
if there are changes
-
handleChildren
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Set the children metadata and invert relation, import and synchronize the children too.- Overrides:
handleChildren
in classAbstractApogeeSynchronizableContentsCollection
- Parameters:
content
- Current contentcreate
- true if the content has been newly createdlogger
- The logger- Returns:
true
if there are changes
-
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
-
getChildrenMetadataName
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Get the metadata name to get children- Specified by:
getChildrenMetadataName
in classAbstractApogeeSynchronizableContentsCollection
- Returns:
- the metadata name to get children
-
getChildrenInvertMetadataName
Description copied from class:AbstractApogeeSynchronizableContentsCollection
Get the metadata name to get parent from children- Specified by:
getChildrenInvertMetadataName
in classAbstractApogeeSynchronizableContentsCollection
- Returns:
- the metadata name to get parent from children
-
importCourseParts
Set the course parts of the currentCourse
.- Parameters:
content
- Current contentlogger
- The logger- Returns:
true
if there are changes
-