Package org.ametys.odf.catalog
Class SkillsCopyUpdater
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.catalog.AbstractProgramItemAttributeCopyUpdater
org.ametys.odf.catalog.SkillsCopyUpdater
- All Implemented Interfaces:
CopyCatalogUpdater,CopyODFUpdater,LogEnabled,Serviceable
public class SkillsCopyUpdater
extends AbstractProgramItemAttributeCopyUpdater
implements Serviceable
Copy updater to update the micro skills on a macro skill and the macro skills on a
Program and (@link Course}.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentTypesHelperThe content types helperprotected AmetysObjectResolverThe ametys object resolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyAdditionalContents(String initialCatalogName, String newCatalogName) Copy additional contents from the initial to the new cataloggetAdditionalContents(String catalogName) Get the additional contents of the catalogvoidservice(ServiceManager manager) voidupdateContents(String initialCatalogName, String newCatalogName, Map<Content, Content> copiedContents, Content targetParentContent) Update contents after the full copy of an ODF content.Methods inherited from class org.ametys.odf.catalog.AbstractProgramItemAttributeCopyUpdater
_updateContentAttribute, _updateMultipleContentAttribute, _updateSingleContentAttributeMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_resolver
The ametys object resolver -
_contentTypesHelper
The content types helper
-
-
Constructor Details
-
SkillsCopyUpdater
public SkillsCopyUpdater()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getAdditionalContents
Description copied from interface:CopyCatalogUpdaterGet the additional contents of the catalog- Specified by:
getAdditionalContentsin interfaceCopyCatalogUpdater- Parameters:
catalogName- the catalog name- Returns:
- additional contents managed by the updater
-
copyAdditionalContents
public Map<Content,Content> copyAdditionalContents(String initialCatalogName, String newCatalogName) Description copied from interface:CopyCatalogUpdaterCopy additional contents from the initial to the new catalog- Specified by:
copyAdditionalContentsin interfaceCopyCatalogUpdater- Parameters:
initialCatalogName- the name of initial catalognewCatalogName- the name of new catalog- Returns:
- a map of copied contents (key: original content, value: copied content)
-
updateContents
public void updateContents(String initialCatalogName, String newCatalogName, Map<Content, Content> copiedContents, Content targetParentContent) Description copied from interface:CopyODFUpdaterUpdate contents after the full copy of an ODF content. Implements this method when you need to do some stuff when all contents have been copied.- Specified by:
updateContentsin interfaceCopyODFUpdater- Parameters:
initialCatalogName- the name of initial catalognewCatalogName- the name of new catalogcopiedContents- the initial contents with their copied contenttargetParentContent- the target parent content where the contents are copied. Can be null.
-