Class ProjectAttachmentConfiguration
- java.lang.Object
-
- com.nomagic.ci.persistence.spi.decomposition.AbstractProjectAttachmentConfiguration
-
- com.nomagic.ci.persistence.decomposition.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 implementsCloneable
interface and can make shallow copy of it self
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
loadedAutomatically
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>
mountOptions
private java.lang.String
preferredProjectRepositoryType
-
Fields inherited from class com.nomagic.ci.persistence.spi.decomposition.AbstractProjectAttachmentConfiguration
attachedProject, attachedProjectURI, attachmentType, customOptions, readOnly, stickyVersion
-
-
Constructor Summary
Constructors Constructor Description ProjectAttachmentConfiguration(IProject project)
Creates new instance ofProjectAttachmentConfiguration
with directly attached projectProjectAttachmentConfiguration(org.eclipse.emf.common.util.URI attachedProjectURI)
Creates new instance ofProjectAttachmentConfiguration
ProjectAttachmentConfiguration(org.eclipse.emf.common.util.URI attachedProjectURI, ProjectAttachmentConfiguration conf)
Creates new instance ofProjectAttachmentConfiguration
which has a new URI but inherits other options from given configurationProjectAttachmentConfiguration(org.eclipse.emf.common.util.URI attachedProjectURI, java.lang.String preferredProjectRepositoryType, boolean readOnly, IVersionDescriptor stickyVersion, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> mountOptions, boolean loadAutomatically)
Creates new instance ofProjectAttachmentConfiguration
ProjectAttachmentConfiguration(org.eclipse.emf.common.util.URI attachedProjectURI, java.lang.String preferredProjectRepositoryType, boolean readOnly, IVersionDescriptor stickyVersion, 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 ofProjectAttachmentConfiguration
ProjectAttachmentConfiguration(org.eclipse.emf.common.util.URI attachedProjectURI, java.lang.String preferredProjectRepositoryType, boolean readOnly, IVersionDescriptor stickyVersion, 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>
getMountOptions()
Gets mount options of this configuration.java.lang.String
getPreferredProjectRepositoryType()
Gets the preferredProjectRepositoryType from ProjectAttachmentConfiguration.boolean
isLoadedAutomatically()
Load mode of the attached project, loaded automatically iftrue
, otherwise user has to load the project manuallyvoid
setLoadAutomatically(boolean loadAutomatically)
Sets load mode for the attached projectvoid
setMountOptions(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> mountOptions)
Sets mount options of this configuration.void
setPreferredProjectRepositoryType(java.lang.String preferredProjectRepositoryType)
Sets the preferredProjectRepositoryType for the ProjectAttachmentConfiguration.-
Methods inherited from class com.nomagic.ci.persistence.spi.decomposition.AbstractProjectAttachmentConfiguration
getAttachedProject, getAttachedProjectURI, getAttachmentType, getCustomOptionNames, getCustomOptionValue, getStickyVersion, isReadOnly, setAttachmentType, setCustomOptionValue, setReadOnly, setStickyVersion
-
-
-
-
Constructor Detail
-
ProjectAttachmentConfiguration
@OpenApi public ProjectAttachmentConfiguration(org.eclipse.emf.common.util.URI attachedProjectURI)
Creates new instance ofProjectAttachmentConfiguration
- Parameters:
attachedProjectURI
- theURI
of the attachment project
-
ProjectAttachmentConfiguration
@OpenApi public ProjectAttachmentConfiguration(@Nonnull IProject project)
Creates new instance ofProjectAttachmentConfiguration
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 ofProjectAttachmentConfiguration
which has a new URI but inherits other options from given configuration- Parameters:
attachedProjectURI
- theURI
of the attachment projectconf
- 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 ofProjectAttachmentConfiguration
- Parameters:
attachedProjectURI
- theURI
of the attachment projectpreferredProjectRepositoryType
- the preferred repository type for the project if neither of repositories support the URIreadOnly
- mode of attachment: true if read-onlystickyVersion
- the sticky version of the attachment projectalternateLocation
- location where the data can imported frommountOptions
- mounting options for the attached projects' share pointsloadAutomatically
- load mode of the attached project, loaded automatically iftrue
, 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 ofProjectAttachmentConfiguration
- Parameters:
attachedProjectURI
- theURI
of the attachment projectpreferredProjectRepositoryType
- the preferred repository type for the project if neither of repositories support the URIreadOnly
- mode of attachment: true if read-onlystickyVersion
- the sticky version of the attachment projectmountOptions
- mounting options for the attached projects' share pointsloadAutomatically
- load mode of the attached project, loaded automatically iftrue
, 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 ofProjectAttachmentConfiguration
- Parameters:
attachedProjectURI
- theURI
of the attachment projectpreferredProjectRepositoryType
- the preferred repository type for the project if neither of repositories support the URIreadOnly
- mode of attachment: true if read-onlystickyVersion
- the sticky version of the attachment projectmountOptions
- mounting options for the attached projects' share pointsloadAutomatically
- load mode of the attached project, loaded automatically iftrue
, otherwise user has to load the project manuallyattachmentType
- 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 iftrue
, 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 final java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
-