Class AbstractRemoteProjectDescriptor
- java.lang.Object
-
- com.nomagic.magicdraw.core.project.AProjectDescriptor
-
- com.nomagic.magicdraw.core.project.AbstractRemoteProjectDescriptor
-
- All Implemented Interfaces:
ProjectDescriptor
@OpenApi public abstract class AbstractRemoteProjectDescriptor extends com.nomagic.magicdraw.core.project.AProjectDescriptorThis class represents location of the remote project.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ref.WeakReference<Project>mProjectRefprivate java.lang.StringmSchemeprivate java.lang.StringmTeamworkServiceIDprivate java.net.URImURI
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRemoteProjectDescriptor(java.lang.String scheme, java.lang.String teamworkServiceID, Project project, java.net.URI uri)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetLocation()ProjectgetProject()private com.nomagic.magicdraw.teamwork2.IProjectTeamworkServicegetProjectTeamworkService()java.lang.StringgetRepresentationString()Constructs human representation of the project.abstract java.lang.StringgetSeparator()com.nomagic.magicdraw.teamwork2.ITeamworkServiceInternalgetTeamworkService()java.net.URIgetURI()Returns project location URI.inthashCode()booleanisRemote()static voidloadRemote(AbstractRemoteProjectDescriptor descriptor, ProgressStatus status)Load project from given remote descriptorstatic booleansave(AbstractRemoteProjectDescriptor descriptor, ProgressStatus status, boolean silent)WARNING status is not working properly, for this commit dialog should be refactored.protected abstract voidupdateOptions(java.lang.String host, java.lang.String login, java.lang.String pass, int port, java.lang.String token)private voidvalidateScheme(java.net.URI uri)
-
-
-
Field Detail
-
mScheme
private final java.lang.String mScheme
-
mTeamworkServiceID
private final java.lang.String mTeamworkServiceID
-
mProjectRef
private final java.lang.ref.WeakReference<Project> mProjectRef
-
mURI
private final java.net.URI mURI
-
-
Constructor Detail
-
AbstractRemoteProjectDescriptor
protected AbstractRemoteProjectDescriptor(java.lang.String scheme, java.lang.String teamworkServiceID, @CheckForNull Project project, @CheckForNull java.net.URI uri) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
getLocation
public java.lang.String getLocation()
-
getRepresentationString
@OpenApi public java.lang.String getRepresentationString()
Constructs human representation of the project.- Returns:
- project's representation as String.
- Throws:
java.lang.IllegalStateException- if project isn't specified or loaded.
-
save
public static boolean save(AbstractRemoteProjectDescriptor descriptor, ProgressStatus status, boolean silent)
WARNING status is not working properly, for this commit dialog should be refactored. WARNING on not silent mode result is always true.- Parameters:
silent-
-
loadRemote
public static void loadRemote(AbstractRemoteProjectDescriptor descriptor, @CheckForNull ProgressStatus status)
Load project from given remote descriptor- Parameters:
descriptor- remote project descriptorstatus- progress status
-
isRemote
public boolean isRemote()
- Returns:
- true if descriptor points to remote project location.
-
getURI
public java.net.URI getURI()
Description copied from interface:ProjectDescriptorReturns project location URI. Used only for persistence, not for human representation. This location can be used for new descriptors creating in ProjectDescriptorsFactory.- Returns:
- project URI.
-
getProject
@CheckForNull public Project getProject()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
updateOptions
protected abstract void updateOptions(java.lang.String host, java.lang.String login, java.lang.String pass, int port, @CheckForNull java.lang.String token)
-
getTeamworkService
public com.nomagic.magicdraw.teamwork2.ITeamworkServiceInternal getTeamworkService()
-
getProjectTeamworkService
private com.nomagic.magicdraw.teamwork2.IProjectTeamworkService getProjectTeamworkService()
-
validateScheme
private void validateScheme(java.net.URI uri) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getSeparator
public abstract java.lang.String getSeparator()
-
-