Class VcsRootImpl

    • Constructor Detail

      • VcsRootImpl

        public VcsRootImpl​(long id,
                           @NotNull
                           String vcsName,
                           @NotNull
                           Map<String,​String> properties)
        Create VcsRootImpl object, the most generic constructor
      • VcsRootImpl

        public VcsRootImpl​(long id,
                           String vcsName)
        Creates new settings object on id and associated version control name. The resulting VCSRoot will have unset name.
        Parameters:
        id - vcs root id.
        vcsName - version control name.
      • VcsRootImpl

        public VcsRootImpl​(long id,
                           Map<String,​String> properties)
        Creates new settings on id and properties set.
        Parameters:
        id - vcs root id.
        properties - settings parameters.
    • Method Detail

      • getName

        @NotNull
        public String getName()
        Description copied from interface: VcsRoot
        returns descriptive name of the vcs root
        Specified by:
        getName in interface VcsRoot
        Returns:
        see above
      • getId

        public long getId()
        Description copied from interface: VcsRoot
        returns root internal id
        Specified by:
        getId in interface VcsRoot
        Returns:
        see above
      • addProperty

        public void addProperty​(String propertyName,
                                String propertyValue)
        Adds new property.
        Parameters:
        propertyName - property name.
        propertyValue - property value.
      • setProperties

        public void setProperties​(@NotNull
                                  Map<String,​String> map)
        Adds number of properties.
        Parameters:
        map - properties map.
      • getVcsName

        @NotNull
        public String getVcsName()
        Description copied from interface: VcsRoot
        Returns name of the corresponding version control.
        Specified by:
        getVcsName in interface VcsRoot
        Returns:
        name of the corresponding version control
      • getProperty

        public String getProperty​(@NotNull
                                  String propertyName)
        Description copied from interface: VcsRoot
        Provides specified property value
        Specified by:
        getProperty in interface VcsRoot
        Parameters:
        propertyName - name of the property whose value is requested
        Returns:
        value of a specified property
      • getProperty

        public String getProperty​(@NotNull
                                  String propertyName,
                                  String defaultValue)
        Description copied from interface: VcsRoot
        Provides specified property value or default value if property is not defined
        Specified by:
        getProperty in interface VcsRoot
        Parameters:
        propertyName - name of the property whose value is requested
        defaultValue - default value which is returned if property value was not specified explicitly
        Returns:
        - value of a specified property or 'defaultValue' if it is not defined
      • getProperties

        @NotNull
        public Map<String,​String> getProperties()
        Description copied from interface: VcsRoot
        Returns mapping from a property name to its value
        Specified by:
        getProperties in interface VcsRoot
        Returns:
        map of all defined properties
      • describe

        @NotNull
        public String describe​(boolean verbose)
        Specified by:
        describe in interface Loggable
        Parameters:
        verbose - verbosity of object description
        Returns:
        description of this object. If verbose is true, description should have mode details.
      • setName

        public void setName​(@NotNull
                            String name)
        Changes VCS root name.
        Parameters:
        name - new VCS root name.
      • setVcsName

        public void setVcsName​(@NotNull
                               String vcsName)
        Sets new version control name (name of version control plugin)
        Parameters:
        vcsName - new version control name
      • setExternalId

        public void setExternalId​(@NotNull
                                  String externalId)
        Parameters:
        externalId - External ID for this VCS Root
        Since:
        2021.2
      • getExternalId

        @NotNull
        public String getExternalId()
        Specified by:
        getExternalId in interface VcsRoot
        Returns:
        externalID for this VCS Root, if it was set.
        Since:
        2021.2
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object