Class CoAccreditedRemoteImportCDMFrComponent
- java.lang.Object
-
- org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
-
- org.ametys.plugins.odfsync.cdmfr.components.impl.RemoteImportCDMFrComponent
-
- org.ametys.plugins.odfsync.cdmfr.components.impl.CoAccreditedRemoteImportCDMFrComponent
-
- All Implemented Interfaces:
ImportCDMFrComponent
,Initializable
,Component
,Configurable
,Contextualizable
,Serviceable
public class CoAccreditedRemoteImportCDMFrComponent extends RemoteImportCDMFrComponent
Component to import a CDM-fr input stream from a remote server with co-accredited mode.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoAccreditedRemoteImportCDMFrComponent.SharedWithType
Enum to define the way to detect shared subProgram-
Nested classes/interfaces inherited from class org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
AbstractImportCDMFrComponent.ContentWorkflowDescription
-
-
Field Summary
Fields Modifier and Type Field Description protected DeleteODFContentHelper
_deleteODFContent
The delete ODF content helperprivate ContentType
_mentionContentType
private String
_mentionId
protected Set<String>
_mentionMetadataPaths
The list of metadata to copy for mention programprotected MergeMetadataForSharedProgramHelper
_mergeMetadataHelper
The merge metadata helperprotected Set<String>
_metadataPathsToMerge
The list of metadata to mergeprivate String
_programToLinkCode
private String
_sharedSubProgramType
static String
SHARED_PROGRAMS_NODE_NAME
The name of the JCR node holding the shared metadata-
Fields inherited from class org.ametys.plugins.odfsync.cdmfr.components.impl.RemoteImportCDMFrComponent
_forcedCatalog, _validateAfterImport, 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 CoAccreditedRemoteImportCDMFrComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_configureCoAccreditedParams(Configuration configuration)
Configure the co-accredited paramsprotected Program
_createMention(Document doc, Node contentNode, String mentionId, String catalog, String lang, org.slf4j.Logger logger)
Create the mentionprotected SubProgram
_getMainSharedWithSubProgram(Program mentionProgram, Node contentNode, org.slf4j.Logger logger)
Get the main subprogram shared with the program representing by the content nodeprotected Program
_getMention(String mentionId, String degreeId, String lang, String catalog)
Get the mention programprotected List<Object>
_getMultipleValuesFromContent(SubProgram sharedProgram, String logicalMetadataPath, MetadataType type, org.slf4j.Logger logger)
Get multiple values from contentprotected List<Object>
_getMultipleValuesFromDOM(Document doc, Node sharedProgramDOM, SubProgram mainProgram, MetadataDefinition metadataDefinition, String logicalMetadataPath, MetadataType type, String catalog, String lang, org.slf4j.Logger logger)
Get multiple values from DOMprivate String
_getNormalizeTitle(String title)
protected Program
_getOrCreateMention(Document doc, Node contentNode, String mentionCode, String lang, String catalog, org.slf4j.Logger logger)
Get of create the mention programprotected ModifiableCompositeMetadata
_getSharedMetadataHolder(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, org.slf4j.Logger logger)
Get the metadata composite holding shared metadata of subprogramsprotected SubProgram
_getSharedSubProgram(Program mentionProgram, String code, org.slf4j.Logger logger)
Get the shared subprogram with the given codeprotected List<String>
_getSharedWithAsString(Node contentNode, org.slf4j.Logger logger)
Get the list of "shared with" program from the remote documentprotected CoAccreditedRemoteImportCDMFrComponent.SharedWithType
_getSharedWithType()
Get the defined way to detect shared programprotected SubProgram
_getSubProgramWithSameTitle(Program mentionProgram, Node contentNode, String lang)
Get the subProgram with the same titleprotected boolean
_hasSubProgramWithSameTitle(Program mentionProgram, Node contentNode, String lang, org.slf4j.Logger logger)
True if there is a subProgram with the same title of the content nodeprotected ModifiableDefaultContent
_importOrSynchronizeContent(Document doc, Node contentNode, AbstractImportCDMFrComponent.ContentWorkflowDescription wfDescription, String title, String lang, String catalog, String syncCode, org.slf4j.Logger logger)
Import or synchronize the content.protected ModifiableDefaultContent
_importOrSynchronizeSharedSubPrograms(Document doc, Program mentionProgram, Node contentNode, AbstractImportCDMFrComponent.ContentWorkflowDescription contentWfDescription, String title, String syncCode, String lang, String catalog, org.slf4j.Logger logger)
Import or synchronized shared subProgramsprotected boolean
_isSecondarySharedSubPrograms(Program mentionProgram, Node contentNode, String lang, org.slf4j.Logger logger)
True if the subProgram node is shared with a main subProgram.protected boolean
_synchronizeAndDeleteSharedSubPrograms(Program rootProgram, SubProgram mainSubProgram, List<String> sharedWith, String catalog, String lang, org.slf4j.Logger logger)
Synchronize the shared metadata of a shared subprogram before deleting the subprogramprotected boolean
_synchronizeMentionMetadata(Document doc, Node contentNode, ModifiableDefaultContent mention, String metadataPath, String lang, String catalog, org.slf4j.Logger logger)
Synchronize metadata in the mention programboolean
_synchronizeSharedMetadata(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, Set<String> metadataToMerge, String catalog, String lang, org.slf4j.Logger logger)
Synchronize the shared program node for a main subprogram, from a secondary subprogramprotected boolean
_synchronizeSharedMultipleMetadata(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, MetadataDefinition metadataDefinition, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, String catalog, String lang, org.slf4j.Logger logger)
Synchronize a shared multiple metadata for shared programprotected boolean
_synchronizeSharedSingleMetadata(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, MetadataDefinition metadataDefinition, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, String catalog, String lang, org.slf4j.Logger logger)
Synchronize single metadata for shared programprotected void
_updateContentsAttribute(ModifiableDefaultContent content, String attributeName, List<String> contentIds, List<String> contentIdsToAdd)
For the attribute name of the content, add new contents (contentIdsToAdd) to existed contents (contentIds)protected void
_updateMentionAttributes(Program mention, SubProgram subProgram)
Update mention attributes depending on the sub programprotected 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.void
configure(Configuration configuration)
protected void
deleteSharedSubProgram(ModifiableDefaultContent sharedProgram, org.slf4j.Logger logger)
Delete a shared secondary subprogram.protected SubProgram
getMainSharedSubProgram(Program mentionProgram, Node contentNode, String lang, org.slf4j.Logger logger)
Get the main subprogram shared with the program representing by the content nodevoid
initialize()
void
service(ServiceManager manager)
protected boolean
synchronizeRepeaterMetadataFromContent(SubProgram sharedProgram, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, org.slf4j.Logger logger)
Synchronize repeater from contentprotected boolean
synchronizeRepeaterMetadataFromDOM(Document doc, Node sharedProgramNode, SubProgram mainProgram, MetadataDefinition metadataDefinition, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, String catalog, String lang, org.slf4j.Logger logger)
Synchronize repeater from DOMboolean
synchronizeSimpleMetadataFromDOM(Document doc, SubProgram subProgram, Node metadataNode, MetadataDefinition metadataDefinition, String logicalMetadataPath, ModifiableCompositeMetadata sharedMetadataHolder, String metadataName, String catalog, String lang, org.slf4j.Logger logger)
Synchronize a simple metadata from DOM-
Methods inherited from class org.ametys.plugins.odfsync.cdmfr.components.impl.RemoteImportCDMFrComponent
getCatalogName, ignoreRights, removalSync, transformDocument, validateAfterImport
-
Methods inherited from class org.ametys.plugins.odfsync.cdmfr.components.AbstractImportCDMFrComponent
_getContent, _getIdFromCDMThenCode, _getOrCreateContent, _handleBinaryMetadata, _handleBinaryMetadata, _handleFileMetadata, _handleFileMetadata, _handleGeocodeMetadata, _handleGeocodeMetadata, _handleMetadataValues, _linkTranslationsIfExist, _saveContentChanges, _setChildren, _setOrgUnitParent, _setRelations, _synchronizeContent, _synchronizeCourseList, _synchronizeMetadata, contextualize, getContainerWfDescription, getCourseListWfDescription, getCoursePartWfDescription, getCourseWfDescription, getExpressionsList, getIdField, getLocalAndExternalFields, getOrgUnitWfDescription, getPersonWfDescription, getProgramWfDescription, getSubProgramWfDescription, handleInputStream
-
-
-
-
Field Detail
-
SHARED_PROGRAMS_NODE_NAME
public static final String SHARED_PROGRAMS_NODE_NAME
The name of the JCR node holding the shared metadata- See Also:
- Constant Field Values
-
_mergeMetadataHelper
protected MergeMetadataForSharedProgramHelper _mergeMetadataHelper
The merge metadata helper
-
_deleteODFContent
protected DeleteODFContentHelper _deleteODFContent
The delete ODF content helper
-
_mentionMetadataPaths
protected Set<String> _mentionMetadataPaths
The list of metadata to copy for mention program
-
_metadataPathsToMerge
protected Set<String> _metadataPathsToMerge
The list of metadata to merge
-
_mentionContentType
private ContentType _mentionContentType
-
_mentionId
private String _mentionId
-
_programToLinkCode
private String _programToLinkCode
-
_sharedSubProgramType
private String _sharedSubProgramType
-
-
Constructor Detail
-
CoAccreditedRemoteImportCDMFrComponent
public CoAccreditedRemoteImportCDMFrComponent()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractImportCDMFrComponent
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classAbstractImportCDMFrComponent
- Throws:
Exception
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractImportCDMFrComponent
- Throws:
ConfigurationException
-
_configureCoAccreditedParams
protected void _configureCoAccreditedParams(Configuration configuration) throws ConfigurationException
Configure the co-accredited params- Parameters:
configuration
- the configuration- Throws:
ConfigurationException
- if an error occurred
-
additionalParameters
protected void additionalParameters(Map<String,Object> parameters)
Description copied from class:AbstractImportCDMFrComponent
Additional parameters for specific treatments.- Overrides:
additionalParameters
in classRemoteImportCDMFrComponent
- Parameters:
parameters
- The parameters map to get
-
_importOrSynchronizeContent
protected ModifiableDefaultContent _importOrSynchronizeContent(Document doc, Node contentNode, AbstractImportCDMFrComponent.ContentWorkflowDescription wfDescription, String title, String lang, String catalog, String syncCode, org.slf4j.Logger logger)
Description copied from class:AbstractImportCDMFrComponent
Import or synchronize the content.- Overrides:
_importOrSynchronizeContent
in classAbstractImportCDMFrComponent
- Parameters:
doc
- XML documentcontentNode
- Node of the contentwfDescription
- The workflow descriptiontitle
- The titlelang
- The langcatalog
- The catalogsyncCode
- The synchronization codelogger
- The logger- Returns:
- The imported or synchronized content
-
_updateMentionAttributes
protected void _updateMentionAttributes(Program mention, SubProgram subProgram)
Update mention attributes depending on the sub program- Parameters:
mention
- the mentionsubProgram
- the subProgram
-
_updateContentsAttribute
protected void _updateContentsAttribute(ModifiableDefaultContent content, String attributeName, List<String> contentIds, List<String> contentIdsToAdd)
For the attribute name of the content, add new contents (contentIdsToAdd) to existed contents (contentIds)- Parameters:
content
- the content to modifiedattributeName
- the attribute namecontentIds
- the content idscontentIdsToAdd
- the content ids to add
-
_importOrSynchronizeSharedSubPrograms
protected ModifiableDefaultContent _importOrSynchronizeSharedSubPrograms(Document doc, Program mentionProgram, Node contentNode, AbstractImportCDMFrComponent.ContentWorkflowDescription contentWfDescription, String title, String syncCode, String lang, String catalog, org.slf4j.Logger logger)
Import or synchronized shared subPrograms- Parameters:
doc
- the documentmentionProgram
- the mention programcontentNode
- the content nodecontentWfDescription
- the content workflow descriptiontitle
- the title of the subprogramsyncCode
- the synchronisation codelang
- the languagecatalog
- the cataloglogger
- the logger- Returns:
- the imported of synchronized content
-
_getOrCreateMention
protected Program _getOrCreateMention(Document doc, Node contentNode, String mentionCode, String lang, String catalog, org.slf4j.Logger logger)
Get of create the mention program- Parameters:
doc
- the documentcontentNode
- the content nodementionCode
- the mention codelang
- the languagecatalog
- the cataloglogger
- the logger- Returns:
- the mention program
-
_createMention
protected Program _createMention(Document doc, Node contentNode, String mentionId, String catalog, String lang, org.slf4j.Logger logger)
Create the mention- Parameters:
doc
- the documentcontentNode
- the content nodementionId
- the mention idcatalog
- the cataloglang
- the languagelogger
- the logger- Returns:
- the created mention
-
_getMention
protected Program _getMention(String mentionId, String degreeId, String lang, String catalog)
Get the mention program- Parameters:
mentionId
- the mention content iddegreeId
- the degree content idlang
- the languagecatalog
- the catalog- Returns:
- the mention program or
null
if it doesn't exist
-
_synchronizeMentionMetadata
protected boolean _synchronizeMentionMetadata(Document doc, Node contentNode, ModifiableDefaultContent mention, String metadataPath, String lang, String catalog, org.slf4j.Logger logger)
Synchronize metadata in the mention program- Parameters:
doc
- the documentcontentNode
- the content nodemention
- the mention programmetadataPath
- the metadata path to synchronizelang
- the languagecatalog
- the cataloglogger
- the logger- Returns:
- true if some changes were made
-
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.- Overrides:
additionalOperationsBeforeSave
in classRemoteImportCDMFrComponent
- Parameters:
content
- The contentlogger
- The logger- Throws:
RepositoryException
- if an error occurs
-
_getSharedWithType
protected CoAccreditedRemoteImportCDMFrComponent.SharedWithType _getSharedWithType()
Get the defined way to detect shared program- Returns:
- shared with type
-
getMainSharedSubProgram
protected SubProgram getMainSharedSubProgram(Program mentionProgram, Node contentNode, String lang, org.slf4j.Logger logger)
Get the main subprogram shared with the program representing by the content node- Parameters:
mentionProgram
- the root mention programcontentNode
- the content nodelang
- the content langlogger
- the logger- Returns:
- the main subprogram if the program is a shared subprogram or
null
otherwise
-
_isSecondarySharedSubPrograms
protected boolean _isSecondarySharedSubPrograms(Program mentionProgram, Node contentNode, String lang, org.slf4j.Logger logger)
True if the subProgram node is shared with a main subProgram. False if the subProgram node is not shared or if the main subProgram is not already imported- Parameters:
mentionProgram
- the mention programcontentNode
- the content nodelang
- the langlogger
- the logger- Returns:
- true if it's a secondary subProgram
-
_hasSubProgramWithSameTitle
protected boolean _hasSubProgramWithSameTitle(Program mentionProgram, Node contentNode, String lang, org.slf4j.Logger logger)
True if there is a subProgram with the same title of the content node- Parameters:
mentionProgram
- the mention programcontentNode
- the content nodelang
- the langlogger
- the logger- Returns:
- true if there is a subProgram with the same title of the content node
-
_getSubProgramWithSameTitle
protected SubProgram _getSubProgramWithSameTitle(Program mentionProgram, Node contentNode, String lang)
Get the subProgram with the same title- Parameters:
mentionProgram
- the mention programcontentNode
- the content nodelang
- the lang- Returns:
- the subProgram with the same title. null if there are no subProgram with same title.
-
_getNormalizeTitle
private String _getNormalizeTitle(String title)
-
_getSharedWithAsString
protected List<String> _getSharedWithAsString(Node contentNode, org.slf4j.Logger logger)
Get the list of "shared with" program from the remote document- Parameters:
contentNode
- The content nodelogger
- the logger- Returns:
- The CDM code of shared program
-
_getMainSharedWithSubProgram
protected SubProgram _getMainSharedWithSubProgram(Program mentionProgram, Node contentNode, org.slf4j.Logger logger)
Get the main subprogram shared with the program representing by the content node- Parameters:
mentionProgram
- the root mention programcontentNode
- the content nodelogger
- the logger- Returns:
- the main subprogram if the program is a shared subprogram or
null
otherwise
-
_getSharedSubProgram
protected SubProgram _getSharedSubProgram(Program mentionProgram, String code, org.slf4j.Logger logger)
Get the shared subprogram with the given code- Parameters:
mentionProgram
- The root mention programcode
- The CDMfr codelogger
- the logger- Returns:
- The shared subprogram if exist or
null
if not found
-
deleteSharedSubProgram
protected void deleteSharedSubProgram(ModifiableDefaultContent sharedProgram, org.slf4j.Logger logger)
Delete a shared secondary subprogram. This subprogram was created by a precede import before the main subprogram was imported- Parameters:
sharedProgram
- the shared programlogger
- the logger
-
_synchronizeAndDeleteSharedSubPrograms
protected boolean _synchronizeAndDeleteSharedSubPrograms(Program rootProgram, SubProgram mainSubProgram, List<String> sharedWith, String catalog, String lang, org.slf4j.Logger logger)
Synchronize the shared metadata of a shared subprogram before deleting the subprogram- Parameters:
rootProgram
- The root mentionmainSubProgram
- The main subprogramsharedWith
- The CDMfr of shared subprogramcatalog
- the cataloglang
- the languagelogger
- The logger- Returns:
true
if changes were made
-
_synchronizeSharedMetadata
public boolean _synchronizeSharedMetadata(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, Set<String> metadataToMerge, String catalog, String lang, org.slf4j.Logger logger) throws RepositoryException
Synchronize the shared program node for a main subprogram, from a secondary subprogram- Parameters:
doc
- the document. Can be null if the sharedProgram is notsharedProgramNode
- the shared program node. Can be null if the sharedProgram is notmainProgram
- the main programsharedProgram
- the shared program. Can be null if the doc and the sharedProgramNode is notmetadataToMerge
- the set of metadata to mergecatalog
- the cataloglang
- the languagelogger
- the logger- Returns:
true
if changes were made- Throws:
RepositoryException
- if an error occurred
-
_getSharedMetadataHolder
protected ModifiableCompositeMetadata _getSharedMetadataHolder(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, org.slf4j.Logger logger) throws RepositoryException
Get the metadata composite holding shared metadata of subprograms- Parameters:
doc
- the document. Can be null if the sharedProgram is notsharedProgramNode
- the shared program node. Can be null if the sharedProgram is notmainProgram
- the main programsharedProgram
- the shared program. Can be null if the doc and the sharedProgramNode is notlogger
- the logger- Returns:
- the shared metadata holder
- Throws:
RepositoryException
- if an error occurred
-
_synchronizeSharedMultipleMetadata
protected boolean _synchronizeSharedMultipleMetadata(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, MetadataDefinition metadataDefinition, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, String catalog, String lang, org.slf4j.Logger logger)
Synchronize a shared multiple metadata for shared program- Parameters:
doc
- the document. Can be null if the sharedProgram is notsharedProgramNode
- the shared program node. Can be null if the sharedProgram is notmainProgram
- the main programsharedProgram
- the shared program. Can be null if the doc and the sharedProgramNode is notmetadataDefinition
- the metadata definitionsharedMetadataHolder
- the metadata composite holding shared metadata of subprogramslogicalMetadataPath
- The logical metadata path (to retrieve the definition)catalog
- the cataloglang
- the languagelogger
- the logger- Returns:
true
if changes were made
-
_getMultipleValuesFromContent
protected List<Object> _getMultipleValuesFromContent(SubProgram sharedProgram, String logicalMetadataPath, MetadataType type, org.slf4j.Logger logger)
Get multiple values from content- Parameters:
sharedProgram
- the shared programlogicalMetadataPath
- The logical metadata path (to retrieve the definition)type
- the type of the data to retrievelogger
- the logger- Returns:
- the list of values
-
_getMultipleValuesFromDOM
protected List<Object> _getMultipleValuesFromDOM(Document doc, Node sharedProgramDOM, SubProgram mainProgram, MetadataDefinition metadataDefinition, String logicalMetadataPath, MetadataType type, String catalog, String lang, org.slf4j.Logger logger)
Get multiple values from DOM- Parameters:
doc
- the documentsharedProgramDOM
- the shared program nodemainProgram
- the main programmetadataDefinition
- the metadata definitionlogicalMetadataPath
- The logical metadata path (to retrieve the definition)type
- the type of the data to retrievecatalog
- the cataloglang
- the langlogger
- the logger- Returns:
- the list of values
-
_synchronizeSharedSingleMetadata
protected boolean _synchronizeSharedSingleMetadata(Document doc, Node sharedProgramNode, SubProgram mainProgram, SubProgram sharedProgram, MetadataDefinition metadataDefinition, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, String catalog, String lang, org.slf4j.Logger logger)
Synchronize single metadata for shared program- Parameters:
doc
- the document. Can be null if the sharedProgram is notsharedProgramNode
- the shared program node. Can be null if the sharedProgram is notmainProgram
- the main programsharedProgram
- the shared program. Can be null if the doc and the sharedProgramNode is notmetadataDefinition
- the metadata definitionsharedMetadataHolder
- the metadata composite holding shared metadata of subprogramslogicalMetadataPath
- The logical metadata path (to retrieve the definition)catalog
- the cataloglang
- the languagelogger
- the logger- Returns:
true
if changes were made
-
synchronizeRepeaterMetadataFromContent
protected boolean synchronizeRepeaterMetadataFromContent(SubProgram sharedProgram, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, org.slf4j.Logger logger)
Synchronize repeater from content- Parameters:
sharedProgram
- the shared programsharedMetadataHolder
- the metadata composite holding shared metadata of subprogramslogicalMetadataPath
- The logical metadata path (to retrieve the definition)logger
- the logger- Returns:
true
if changes were made
-
synchronizeRepeaterMetadataFromDOM
protected boolean synchronizeRepeaterMetadataFromDOM(Document doc, Node sharedProgramNode, SubProgram mainProgram, MetadataDefinition metadataDefinition, ModifiableCompositeMetadata sharedMetadataHolder, String logicalMetadataPath, String catalog, String lang, org.slf4j.Logger logger)
Synchronize repeater from DOM- Parameters:
doc
- the documentsharedProgramNode
- the shared program nodemainProgram
- the main programmetadataDefinition
- the metadata definitionsharedMetadataHolder
- the metadata composite holding shared metadata of subprogramslogicalMetadataPath
- The logical metadata path (to retrieve the definition)catalog
- the cataloglang
- the languagelogger
- the logger- Returns:
true
if changes were made
-
synchronizeSimpleMetadataFromDOM
public boolean synchronizeSimpleMetadataFromDOM(Document doc, SubProgram subProgram, Node metadataNode, MetadataDefinition metadataDefinition, String logicalMetadataPath, ModifiableCompositeMetadata sharedMetadataHolder, String metadataName, String catalog, String lang, org.slf4j.Logger logger)
Synchronize a simple metadata from DOM- Parameters:
doc
- the documentsubProgram
- the subProgram contentmetadataNode
- The metadata DOM nodemetadataDefinition
- the metadata definitionlogicalMetadataPath
- The logical metadata path (to retrieve the definition)sharedMetadataHolder
- the metadata composite holding shared metadata of subprogramsmetadataName
- the metadata namecatalog
- the cataloglang
- the languagelogger
- The logger- Returns:
true
if changes were made
-
-