Class CopyOptions

    • Constructor Detail

      • CopyOptions

        public CopyOptions()
        Creates an empty set of options.
      • CopyOptions

        public CopyOptions​(@NotNull
                           CopyOptions opts)
        Creates a copy of given options.
        Parameters:
        opts - options to copy.
    • Method Detail

      • setNewProjectName

        public void setNewProjectName​(@Nullable
                                      java.lang.String newProjectName)
        Sets the new project name. This name is applicable to the new project only (without subprojects).
        Parameters:
        newProjectName - new project name. If null, the current name will be used (it can be a bit modified to ensure uniqueness).
        See Also:
        getNewProjectName()
      • addProjectExternalIdMapping

        public void addProjectExternalIdMapping​(@NotNull
                                                java.util.Map<java.lang.String,​java.lang.String> map)
        Adds a set of mappings for the external id of the copying project or subprojects.

        This mapping is optional. When some projects have no associated mappings, new external ids will be generated based on their names and parent projects external ids.

        The copying project's external identifier is also applicable to this map.

        The specified mapping will be added to the previous added mapping.

        Parameters:
        map - identifiers map
        Since:
        8.0
        See Also:
        getProjectExternalIdentifiersMap()
      • addVcsRootExternalIdMapping

        public void addVcsRootExternalIdMapping​(@NotNull
                                                java.util.Map<java.lang.String,​java.lang.String> map)
        Adds a set of mappings for external id of VCS roots.

        This mapping is optional. When some VCS roots have no associated mappings, new external ids will be generated based on their names and projects external ids.

        The specified mapping will be added to the previous added mapping.

        Parameters:
        map - map of the existent VCS root id to the VCS root id for the copy.
        Since:
        8.0
        See Also:
        addProjectExternalIdMapping(java.util.Map), getBuildTypeAndTemplateExternalIdentifiersMap()
      • addBuildTypeAndTemplateExternalIdMapping

        public void addBuildTypeAndTemplateExternalIdMapping​(@NotNull
                                                             java.util.Map<java.lang.String,​java.lang.String> map)
        Adds a set of mappings for external id of build configurations and templates.

        This mapping is optional. When some build configurations ore templates have no associated mappings, new external ids will be generated based on their names and projects external ids.

        The specified mapping will be added to the previous added mapping.

        Parameters:
        map - map of the existent entity id to the entity id for the copy.
        Since:
        8.0
        See Also:
        addProjectExternalIdMapping(java.util.Map), getBuildTypeAndTemplateExternalIdentifiersMap()
      • getProjectExternalIdentifiersMap

        @NotNull
        public java.util.Map<java.lang.String,​java.lang.String> getProjectExternalIdentifiersMap()
        Returns the project external ids mapping.
        Returns:
        project external ids mapping (as a map of existent project external id to the external id for the related project copy).
        Since:
        8.0
        See Also:
        addProjectExternalIdMapping(java.util.Map)
      • getVcsRootExternalIdentifiersMap

        @NotNull
        public java.util.Map<java.lang.String,​java.lang.String> getVcsRootExternalIdentifiersMap()
        Returns the build configurations and templates external ids mapping.
        Returns:
        build configurations and templates external ids mapping (as a map of existent build configuration or template external id to the external id for the related copy).
        Since:
        8.0
        See Also:
        addBuildTypeAndTemplateExternalIdMapping(java.util.Map)
      • getBuildTypeAndTemplateExternalIdentifiersMap

        @NotNull
        public java.util.Map<java.lang.String,​java.lang.String> getBuildTypeAndTemplateExternalIdentifiersMap()
        Returns the build configurations and templates external ids mapping.
        Returns:
        build configurations and templates external ids mapping (as a map of existent build configuration or template external id to the external id for the related copy).
        Since:
        8.0
        See Also:
        addBuildTypeAndTemplateExternalIdMapping(java.util.Map)
      • isGenerateExternalIdsBasedOnOriginalExternalIds

        public boolean isGenerateExternalIdsBasedOnOriginalExternalIds()
        Determines how external ids for new entities will be generated if there are no related pairs in the external ids maps.
        Returns:
        false means use entity name for generating new external id, true means try to use ids similar external ids of original entities.
        Since:
        8.0
        See Also:
        setGenerateExternalIdsBasedOnOriginalExternalIds(boolean)
      • setGenerateExternalIdsBasedOnOriginalExternalIds

        public void setGenerateExternalIdsBasedOnOriginalExternalIds​(boolean generateExternalIdsBasedOnOriginalExternalIds)
        Specify how external ids for new entities will be generated if there are no related pairs in the external ids maps.
        Parameters:
        generateExternalIdsBasedOnOriginalExternalIds - false means use entity name for generating new external id, true means try to use ids similar external ids of original entities.
        Since:
        8.0
        See Also:
        isGenerateExternalIdsBasedOnOriginalExternalIds()