Class DMNDeepCloneProcess

  • All Implemented Interfaces:
    org.kie.workbench.common.stunner.core.definition.clone.CloneProcess, org.kie.workbench.common.stunner.core.definition.clone.IDeepCloneProcess

    @Alternative
    public class DMNDeepCloneProcess
    extends org.kie.workbench.common.stunner.core.definition.clone.DeepCloneProcess
    implements org.kie.workbench.common.stunner.core.definition.clone.IDeepCloneProcess

    It represents the custom implementation of cloning process for DMN nodes.

    It is extending the cloning mechanism provided by DeepCloneProcess, including additional fields and expressions

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DMNDeepCloneProcess()  
        DMNDeepCloneProcess​(org.kie.workbench.common.stunner.core.api.FactoryManager factoryManager, org.kie.workbench.common.stunner.core.definition.adapter.AdapterManager adapterManager, org.kie.workbench.common.stunner.core.util.ClassUtils classUtils, org.kie.workbench.common.stunner.core.client.api.SessionManager sessionManager)  
    • Constructor Detail

      • DMNDeepCloneProcess

        protected DMNDeepCloneProcess()
      • DMNDeepCloneProcess

        @Inject
        public DMNDeepCloneProcess​(org.kie.workbench.common.stunner.core.api.FactoryManager factoryManager,
                                   org.kie.workbench.common.stunner.core.definition.adapter.AdapterManager adapterManager,
                                   org.kie.workbench.common.stunner.core.util.ClassUtils classUtils,
                                   org.kie.workbench.common.stunner.core.client.api.SessionManager sessionManager)
    • Method Detail

      • clone

        public <S,​T> T clone​(S source,
                                   T target)

        It defines additive fields, specific to DMN domain, to be included in the target

        Then, the "classic" clone operation, defined in DeepCloneProcess will be executed

        Note that DeepCloneProcess is already taking care of aspects related to look&feel, such as background color, font, etc.

        Every time we copy a node, in order to respect the name uniqueness logic, a new node will be created with a suffix -X, where X it is an incremental numeric value

        Specified by:
        clone in interface org.kie.workbench.common.stunner.core.definition.clone.CloneProcess
        Overrides:
        clone in class org.kie.workbench.common.stunner.core.definition.clone.DeepCloneProcess
        Parameters:
        source - node to be cloned
        target - destination of the cloning operation
        Returns:
        cloned instance, i.e. target element
      • composeUniqueNodeName

        protected String composeUniqueNodeName​(String name)