Interface ImportCDMFrComponent
-
- All Known Implementing Classes:
AbstractImportCDMFrComponent
,CoAccreditedRemoteImportCDMFrComponent
,RemoteImportCDMFrComponent
,SCCImportCDMFrComponent
public interface ImportCDMFrComponent
Interface for component to import a CDM-fr input stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContentSynchronizationResult
additionalOperations(ModifiableContent content, Map<String,Object> additionalParameters, org.slf4j.Logger logger)
Add specific fields to the content during import or synchronization.String
getCatalogName(Element contentElement)
Get the name of catalog to use for importModifiableContent
getContent(String contentType, String syncCode, ImportCDMFrContext context)
Get the content from the synchronization code, the content type and the context.String
getIdField()
Return the attribute identifier for CDM-fr synchronization.String
getIdFromCDMThenCode(String tableRefId, String cdmCode)
Get the content ID from the CDM code, if there is no match with the CDM code, then we search with the code.Set<String>
getLocalAndExternalFields(Map<String,Object> additionalParameters)
Get the path of tri-state fields (with local and external values)Map<String,Object>
handleInputStream(InputStream input, Map<String,Object> parameters, SynchronizableContentsCollection scc, org.slf4j.Logger logger)
Handle the CDM-fr input stream to import all the programs and its dependencies containing into it.ModifiableContent
importOrSynchronizeContent(Element contentElement, ContentWorkflowDescription wfDescription, String title, String syncCode, ImportCDMFrContext context)
Import or synchronize the content.
-
-
-
Method Detail
-
getIdField
String getIdField()
Return the attribute identifier for CDM-fr synchronization.- Returns:
- The attribute name (cdmfrSyncCode)
-
getLocalAndExternalFields
Set<String> getLocalAndExternalFields(Map<String,Object> additionalParameters)
Get the path of tri-state fields (with local and external values)- Parameters:
additionalParameters
- Additional parameters- Returns:
- the synchronized fields
-
handleInputStream
Map<String,Object> handleInputStream(InputStream input, Map<String,Object> parameters, SynchronizableContentsCollection scc, org.slf4j.Logger logger) throws ProcessingException
Handle the CDM-fr input stream to import all the programs and its dependencies containing into it.- Parameters:
input
- The CDM-fr input streamparameters
- The parameters useful for the operationscc
- TheSynchronizableContentsCollection
calling this componentlogger
- The logger- Returns:
- The list of imported/synchronized programs
- Throws:
ProcessingException
- If an error occurs
-
importOrSynchronizeContent
ModifiableContent importOrSynchronizeContent(Element contentElement, ContentWorkflowDescription wfDescription, String title, String syncCode, ImportCDMFrContext context)
Import or synchronize the content.- Parameters:
contentElement
- Element of the contentwfDescription
- The workflow descriptiontitle
- The titlesyncCode
- The synchronization codecontext
- the import context- Returns:
- The imported or synchronized content
-
getContent
ModifiableContent getContent(String contentType, String syncCode, ImportCDMFrContext context)
Get the content from the synchronization code, the content type and the context.- Parameters:
contentType
- The content typesyncCode
- The synchronization codecontext
- the import context- Returns:
- the retrieved content
-
getCatalogName
String getCatalogName(Element contentElement)
Get the name of catalog to use for import- Parameters:
contentElement
- Element of the content- Returns:
- The catalog to used
-
getIdFromCDMThenCode
String getIdFromCDMThenCode(String tableRefId, String cdmCode)
Get the content ID from the CDM code, if there is no match with the CDM code, then we search with the code. If nothing is found we return null.- Parameters:
tableRefId
- The reference table IDcdmCode
- The CDM code- Returns:
- A content ID or
null
-
additionalOperations
ContentSynchronizationResult additionalOperations(ModifiableContent content, Map<String,Object> additionalParameters, org.slf4j.Logger logger)
Add specific fields to the content during import or synchronization.- Parameters:
content
- Content to updateadditionalParameters
- Additional parameterslogger
- The logger- Returns:
- The synchronization result of the additional operations
-
-