Class RemoteImportCDMFrComponent
- java.lang.Object
-
- org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
-
- org.ametys.plugins.odfsync.cdmfr.components.impl.RemoteImportCDMFrComponent
-
- All Implemented Interfaces:
ImportCDMFrComponent,Initializable,Component,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
CoAccreditedRemoteImportCDMFrComponent
public class RemoteImportCDMFrComponent extends AbstractImportCDMFrComponent
Component to import a CDM-fr input stream from a remote server.
-
-
Field Summary
Fields Modifier and Type Field Description protected String_forcedCatalogForced catalogprotected boolean_validateAfterImportValidate after importstatic StringROLEAvalon Role-
Fields inherited from class org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
_catalogsManager, _cdmFrSyncExtensionPoint, _cocoonContext, _contentPrefix, _contentTypeEP, _contentWorkflowHelper, _currentUserProvider, _domParser, _importedContents, _nbError, _observationManager, _odfHelper, _odfLang, _odfRefTableHelper, _resolver, _rootOUProvider, _sccHelper, _shareableCourseHelper, _syncFieldsByContentType, _SYNCHRONIZE_WORKFLOW_ACTION_ID, _synchronizedContents, _TAG_CONTAINER, _TAG_COURSELIST, _TAG_COURSEPART, _TAG_PROGRAM, _TAG_SUBPROGRAM, _valuesExtractorFactory, _xPathProcessor
-
-
Constructor Summary
Constructors Constructor Description RemoteImportCDMFrComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadditionalParameters(Map<String,Object> parameters)Additional parameters for specific treatments.StringgetCatalogName(Element contentElement)Get the name of catalog to use for importprotected booleanignoreRights()If true, bypass the rights check during the import processprotected booleanremovalSync()When returns true, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.protected DocumenttransformDocument(Document document, Map<String,Object> parameters, org.slf4j.Logger logger)Transform the document depending of it structure.protected booleanvalidateAfterImport()True to validate the contents after import-
Methods inherited from class org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
_createContent, _editContent, _getAdditionalValuesToSynchronize, _getExpressionsList, _getInputsForContentCreation, _getNotSynchronizedRelatedContentIds, _getOrCreateContent, _initializeShareableCoursesFields, _linkTranslationsIfExist, _setOrgUnitParent, _synchronizeContent, additionalOperations, configure, contextualize, getContent, getIdField, getIdFromCDMThenCode, getLocalAndExternalFields, handleInputStream, importOrSynchronizeContent, initialize, service, validateContent
-
-
-
-
Field Detail
-
_forcedCatalog
protected String _forcedCatalog
Forced catalog
-
_validateAfterImport
protected boolean _validateAfterImport
Validate after import
-
-
Constructor Detail
-
RemoteImportCDMFrComponent
public RemoteImportCDMFrComponent()
-
-
Method Detail
-
additionalParameters
protected void additionalParameters(Map<String,Object> parameters)
Description copied from class:AbstractImportCDMFrComponentAdditional parameters for specific treatments.- Specified by:
additionalParametersin classAbstractImportCDMFrComponent- Parameters:
parameters- The parameters map to get
-
getCatalogName
public String getCatalogName(Element contentElement)
Description copied from interface:ImportCDMFrComponentGet the name of catalog to use for import- Specified by:
getCatalogNamein interfaceImportCDMFrComponent- Overrides:
getCatalogNamein classAbstractImportCDMFrComponent- Parameters:
contentElement- Element of the content- Returns:
- The catalog to used
-
transformDocument
protected Document transformDocument(Document document, Map<String,Object> parameters, org.slf4j.Logger logger) throws IOException, SAXException, ProcessingException
Description copied from class:AbstractImportCDMFrComponentTransform the document depending of it structure.- Overrides:
transformDocumentin classAbstractImportCDMFrComponent- Parameters:
document- Document to transform.parameters- Optional parameters for transformationlogger- The logger- Returns:
- The transformed document.
- Throws:
IOException- if an error occurs.SAXException- if an error occurs.ProcessingException- if an error occurs.
-
validateAfterImport
protected boolean validateAfterImport()
Description copied from class:AbstractImportCDMFrComponentTrue to validate the contents after import- Specified by:
validateAfterImportin classAbstractImportCDMFrComponent- Returns:
- True to validate the contents after import
-
removalSync
protected boolean removalSync()
Description copied from class:AbstractImportCDMFrComponentWhen returns true, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.- Specified by:
removalSyncin classAbstractImportCDMFrComponent- Returns:
- true if a content created by a previous synchro has to be removed if it does not exist anymore during the current synchro.
-
ignoreRights
protected boolean ignoreRights()
Description copied from class:AbstractImportCDMFrComponentIf true, bypass the rights check during the import process- Overrides:
ignoreRightsin classAbstractImportCDMFrComponent- Returns:
- True if the rights check are bypassed during the import process
-
-