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.AProjectDescriptor
This class represents location of the remote project.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ref.WeakReference<Project>
mProjectRef
private java.lang.String
mScheme
private java.lang.String
mTeamworkServiceID
private java.net.URI
mURI
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRemoteProjectDescriptor(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 boolean
equals(java.lang.Object obj)
java.lang.String
getLocation()
Project
getProject()
private com.nomagic.magicdraw.teamwork2.IProjectTeamworkService
getProjectTeamworkService()
java.lang.String
getRepresentationString()
Constructs human representation of the project.abstract java.lang.String
getSeparator()
com.nomagic.magicdraw.teamwork2.ITeamworkServiceInternal
getTeamworkService()
java.net.URI
getURI()
Returns project location URI.int
hashCode()
boolean
isRemote()
static void
loadRemote(AbstractRemoteProjectDescriptor descriptor, ProgressStatus status)
Load project from given remote descriptorstatic boolean
save(AbstractRemoteProjectDescriptor descriptor, ProgressStatus status, boolean silent)
WARNING status is not working properly, for this commit dialog should be refactored.protected abstract void
updateOptions(java.lang.String host, java.lang.String login, java.lang.String pass, int port, java.lang.String token)
private void
validateScheme(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:ProjectDescriptor
Returns 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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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()
-
-