Class CMSModelCloningContext

  • All Implemented Interfaces:
    ModelCloningContext

    public class CMSModelCloningContext
    extends java.lang.Object
    implements ModelCloningContext
    Defines the ModelCloningContext to use for deep cloning components that are supported by SmartEdit. The cloning context specifies if a given attribute should be treated as partOf, should be skipped or should use a preset value.
    • Constructor Detail

      • CMSModelCloningContext

        public CMSModelCloningContext()
    • Method Detail

      • treatAsPartOf

        public boolean treatAsPartOf​(java.lang.Object component,
                                     java.lang.String qualifier)
        Description copied from interface: ModelCloningContext
        If true that particular attribute is treated as partOf which results in deep-cloning each attribute value too before assigning them as value to the cloned model.

        This applies to model reference attributes only!

        Specified by:
        treatAsPartOf in interface ModelCloningContext
      • skipAttribute

        public boolean skipAttribute​(java.lang.Object component,
                                     java.lang.String qualifier)
        Description copied from interface: ModelCloningContext
        If true that particular attribute will not be included in the cloning process. As a result the cloned model will not have any value for that attribute.
        Specified by:
        skipAttribute in interface ModelCloningContext
      • getTreatAsPartOfPredicates

        protected java.util.List<java.util.function.BiPredicate<ItemModel,​java.lang.String>> getTreatAsPartOfPredicates()
      • setTreatAsPartOfPredicates

        public void setTreatAsPartOfPredicates​(java.util.List<java.util.function.BiPredicate<ItemModel,​java.lang.String>> treatAsPartOfPredicates)
      • getPresetValuePredicates

        @Deprecated(since="2105",
                    forRemoval=true)
        protected java.util.List<java.util.function.BiPredicate<ItemModel,​java.lang.String>> getPresetValuePredicates()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 2105, please use getPresetValueHandlers() instead.
      • setPresetValuePredicates

        @Deprecated(since="2105",
                    forRemoval=true)
        public void setPresetValuePredicates​(java.util.List<java.util.function.BiPredicate<ItemModel,​java.lang.String>> presetValuePredicates)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 2105, please use getPresetValueHandlers() instead.
      • getPresetValueHandlers

        protected java.util.List<AttributePresetHandler<java.lang.Object>> getPresetValueHandlers()
      • setPresetValueHandlers

        public void setPresetValueHandlers​(java.util.List<AttributePresetHandler<java.lang.Object>> presetValueHandlers)