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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
AbstractImportCDMFrComponent.ContentWorkflowDescription
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_forcedCatalog
Forced catalogprotected boolean
_validateAfterImport
Validate after importstatic String
ROLE
Avalon Role-
Fields inherited from class org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
_catalogsManager, _cdmFrSyncExtensionPoint, _cocoonContext, _contentPrefix, _contentTypeEP, _currentUserProvider, _domParser, _importedContents, _nbCreatedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, _odfLang, _odfRefTableHelper, _resolver, _rootOUProvider, _shareableCourseHelper, _syncFieldsByContentType, _synchroComponent, _synchronizedContents, _TAG_CONTAINER, _TAG_COURSELIST, _TAG_COURSEPART, _TAG_PROGRAM, _TAG_SUBPROGRAM, _updatedContents, _xPathProcessor
-
-
Constructor Summary
Constructors Constructor Description RemoteImportCDMFrComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
additionalOperationsBeforeSave(ModifiableDefaultContent content, org.slf4j.Logger logger)
Additional operation to do on the content before saving it.protected void
additionalParameters(Map<String,Object> parameters)
Additional parameters for specific treatments.protected String
getCatalogName(Node contentNode)
Get the name of catalog to use for importprotected boolean
ignoreRights()
If true, bypass the rights check during the import processprotected boolean
removalSync()
When returns true, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.protected Document
transformDocument(Document document, Map<String,Object> parameters, org.slf4j.Logger logger)
Transform the document depending of it structure.protected boolean
validateAfterImport()
True to validate the contents after import-
Methods inherited from class org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
_getContent, _getIdFromCDMThenCode, _getOrCreateContent, _handleBinaryMetadata, _handleBinaryMetadata, _handleFileMetadata, _handleFileMetadata, _handleGeocodeMetadata, _handleGeocodeMetadata, _handleMetadataValues, _importOrSynchronizeContent, _linkTranslationsIfExist, _saveContentChanges, _setChildren, _setOrgUnitParent, _setRelations, _synchronizeContent, _synchronizeCourseList, _synchronizeMetadata, configure, contextualize, getContainerWfDescription, getCourseListWfDescription, getCoursePartWfDescription, getCourseWfDescription, getExpressionsList, getIdField, getLocalAndExternalFields, getOrgUnitWfDescription, getPersonWfDescription, getProgramWfDescription, getSubProgramWfDescription, handleInputStream, initialize, service
-
-
-
-
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:AbstractImportCDMFrComponent
Additional parameters for specific treatments.- Specified by:
additionalParameters
in classAbstractImportCDMFrComponent
- Parameters:
parameters
- The parameters map to get
-
additionalOperationsBeforeSave
protected void additionalOperationsBeforeSave(ModifiableDefaultContent content, org.slf4j.Logger logger) throws RepositoryException
Description copied from class:AbstractImportCDMFrComponent
Additional operation to do on the content before saving it.- Specified by:
additionalOperationsBeforeSave
in classAbstractImportCDMFrComponent
- Parameters:
content
- The contentlogger
- The logger- Throws:
RepositoryException
- if an error occurs
-
getCatalogName
protected String getCatalogName(Node contentNode)
Description copied from class:AbstractImportCDMFrComponent
Get the name of catalog to use for import- Overrides:
getCatalogName
in classAbstractImportCDMFrComponent
- Parameters:
contentNode
- The node of program- 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:AbstractImportCDMFrComponent
Transform the document depending of it structure.- Overrides:
transformDocument
in 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:AbstractImportCDMFrComponent
True to validate the contents after import- Specified by:
validateAfterImport
in classAbstractImportCDMFrComponent
- Returns:
- True to validate the contents after import
-
removalSync
protected boolean removalSync()
Description copied from class:AbstractImportCDMFrComponent
When returns true, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.- Specified by:
removalSync
in 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:AbstractImportCDMFrComponent
If true, bypass the rights check during the import process- Overrides:
ignoreRights
in classAbstractImportCDMFrComponent
- Returns:
- True if the rights check are bypassed during the import process
-
-