Class ProjectAttachmentConfiguration

  • All Implemented Interfaces:
    java.lang.Cloneable

    @OpenApi
    public class ProjectAttachmentConfiguration
    extends AbstractProjectAttachmentConfiguration
    The configuration of project attachment. The object is used to attach and re-attach one project to another and holds additional properties defining the attachment. This class implements Cloneable interface and can make shallow copy of it self
    • Field Detail

      • mountOptions

        private java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> mountOptions
      • loadedAutomatically

        private boolean loadedAutomatically
      • preferredProjectRepositoryType

        private java.lang.String preferredProjectRepositoryType
    • Constructor Detail

      • ProjectAttachmentConfiguration

        @OpenApi
        public ProjectAttachmentConfiguration​(org.eclipse.emf.common.util.URI attachedProjectURI)
        Creates new instance of ProjectAttachmentConfiguration
        Parameters:
        attachedProjectURI - the URI of the attachment project
      • ProjectAttachmentConfiguration

        @OpenApi
        public ProjectAttachmentConfiguration​(@Nonnull
                                              IProject project)
        Creates new instance of ProjectAttachmentConfiguration with directly attached project
        Parameters:
        project - project which will be attached.
      • ProjectAttachmentConfiguration

        public ProjectAttachmentConfiguration​(org.eclipse.emf.common.util.URI attachedProjectURI,
                                              ProjectAttachmentConfiguration conf)
        Creates new instance of ProjectAttachmentConfiguration which has a new URI but inherits other options from given configuration
        Parameters:
        attachedProjectURI - the URI of the attachment project
        conf - the configuration that options are inherited from
      • ProjectAttachmentConfiguration

        @Deprecated
        public ProjectAttachmentConfiguration​(org.eclipse.emf.common.util.URI attachedProjectURI,
                                              java.lang.String preferredProjectRepositoryType,
                                              boolean readOnly,
                                              IVersionDescriptor stickyVersion,
                                              @CheckForNull
                                              org.eclipse.emf.common.util.URI alternateLocation,
                                              java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> mountOptions,
                                              boolean loadAutomatically)
        Deprecated.
        Creates new instance of ProjectAttachmentConfiguration
        Parameters:
        attachedProjectURI - the URI of the attachment project
        preferredProjectRepositoryType - the preferred repository type for the project if neither of repositories support the URI
        readOnly - mode of attachment: true if read-only
        stickyVersion - the sticky version of the attachment project
        alternateLocation - location where the data can imported from
        mountOptions - mounting options for the attached projects' share points
        loadAutomatically - load mode of the attached project, loaded automatically if true, otherwise user has to load the project manually
      • ProjectAttachmentConfiguration

        public ProjectAttachmentConfiguration​(org.eclipse.emf.common.util.URI attachedProjectURI,
                                              @CheckForNull
                                              java.lang.String preferredProjectRepositoryType,
                                              boolean readOnly,
                                              @CheckForNull
                                              IVersionDescriptor stickyVersion,
                                              @CheckForNull
                                              java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> mountOptions,
                                              boolean loadAutomatically)
        Creates new instance of ProjectAttachmentConfiguration
        Parameters:
        attachedProjectURI - the URI of the attachment project
        preferredProjectRepositoryType - the preferred repository type for the project if neither of repositories support the URI
        readOnly - mode of attachment: true if read-only
        stickyVersion - the sticky version of the attachment project
        mountOptions - mounting options for the attached projects' share points
        loadAutomatically - load mode of the attached project, loaded automatically if true, otherwise user has to load the project manually
      • ProjectAttachmentConfiguration

        public ProjectAttachmentConfiguration​(org.eclipse.emf.common.util.URI attachedProjectURI,
                                              @CheckForNull
                                              java.lang.String preferredProjectRepositoryType,
                                              boolean readOnly,
                                              @CheckForNull
                                              IVersionDescriptor stickyVersion,
                                              @CheckForNull
                                              java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> mountOptions,
                                              boolean loadAutomatically,
                                              com.nomagic.ci.persistence.spi.decomposition.AttachmentType attachmentType)
        Creates new instance of ProjectAttachmentConfiguration
        Parameters:
        attachedProjectURI - the URI of the attachment project
        preferredProjectRepositoryType - the preferred repository type for the project if neither of repositories support the URI
        readOnly - mode of attachment: true if read-only
        stickyVersion - the sticky version of the attachment project
        mountOptions - mounting options for the attached projects' share points
        loadAutomatically - load mode of the attached project, loaded automatically if true, otherwise user has to load the project manually
        attachmentType - the attachment type
    • Method Detail

      • getMountOptions

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> getMountOptions()
        Gets mount options of this configuration. Each share point of attached project, by its ID, is mapped to a map of options which is used to mount corresponding share point. The mounting options of each share point are passed to its IMountingProjectFeatureHandler during the attachment operation to resolve "mount on" objects and to create mount points. If situation occurs that mount options for a specific share point is absent in this map, i.e. the is no entry for it, then the framework passes options of the share point to IMountingProjectFeatureHandler as its mount options assuming that share point options contains default mount options
        Returns:
        map of share point IDs mapped to string to string maps
      • setMountOptions

        public void setMountOptions​(java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> mountOptions)
        Sets mount options of this configuration. See getMountOptions() for more information
        Parameters:
        mountOptions - the mount options for share points in the attached project
      • isLoadedAutomatically

        public boolean isLoadedAutomatically()
        Load mode of the attached project, loaded automatically if true, otherwise user has to load the project manually
        Returns:
        the load mode of the attached project
      • setLoadAutomatically

        public void setLoadAutomatically​(boolean loadAutomatically)
        Sets load mode for the attached project
        Parameters:
        loadAutomatically - new value
      • getPreferredProjectRepositoryType

        public java.lang.String getPreferredProjectRepositoryType()
        Gets the preferredProjectRepositoryType from ProjectAttachmentConfiguration. In case if there are several project repository types the support same URI. TODO rename to abstract or relative
        Returns:
        the preferredProjectRepositoryType value
      • setPreferredProjectRepositoryType

        public void setPreferredProjectRepositoryType​(java.lang.String preferredProjectRepositoryType)
        Sets the preferredProjectRepositoryType for the ProjectAttachmentConfiguration. In case if there are several project repository types the support same URI.
        Parameters:
        preferredProjectRepositoryType - the new preferredProjectRepositoryType value
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object