Class 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 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 descriptor
        status - 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.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()