Class Server

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Server
    extends IdentifiableBase
    implements java.io.Serializable, java.lang.Cloneable
    The <server> element contains informations required to a server settings.
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Server()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAlias​(java.lang.String string)
      Method addAlias.
      void addRepositoryOrigin​(java.lang.String string)
      Method addRepositoryOrigin.
      Server clone()
      Method clone.
      java.util.List<java.lang.String> getAliases()
      Method getAliases.
      java.lang.Object getConfiguration()
      Get extra configuration for the transport layer.
      java.lang.String getDirectoryPermissions()
      Get the permissions for directories when they are created.
      java.lang.String getFilePermissions()
      Get the permissions for files when they are created.
      java.lang.String getPassphrase()
      Get the passphrase used in conjunction with the privateKey to authenticate.
      java.lang.String getPassword()
      Get the password used in conjunction with the username to authenticate.
      java.lang.String getPrivateKey()
      Get the private key location used to authenticate.
      java.util.List<java.lang.String> getRepositoryOrigins()
      Method getRepositoryOrigins.
      java.lang.String getUsername()
      Get the username used to authenticate.
      void removeAlias​(java.lang.String string)
      Method removeAlias.
      void removeRepositoryOrigin​(java.lang.String string)
      Method removeRepositoryOrigin.
      void setAliases​(java.util.List<java.lang.String> aliases)
      Set list of additional server aliases.
      void setConfiguration​(java.lang.Object configuration)
      Set extra configuration for the transport layer.
      void setDirectoryPermissions​(java.lang.String directoryPermissions)
      Set the permissions for directories when they are created.
      void setFilePermissions​(java.lang.String filePermissions)
      Set the permissions for files when they are created.
      void setPassphrase​(java.lang.String passphrase)
      Set the passphrase used in conjunction with the privateKey to authenticate.
      void setPassword​(java.lang.String password)
      Set the password used in conjunction with the username to authenticate.
      void setPrivateKey​(java.lang.String privateKey)
      Set the private key location used to authenticate.
      void setRepositoryOrigins​(java.util.List<java.lang.String> repositoryOrigins)
      Set list of repository origins these credentials may be used with, each written as scheme://host or scheme://host:port, for example https://repo.example.org or https://mirror.example.org:8443 - an origin, not a full repository URL.
      void setUsername​(java.lang.String username)
      Set the username used to authenticate.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Server

        public Server()
    • Method Detail

      • addAlias

        public void addAlias​(java.lang.String string)
        Method addAlias.
        Parameters:
        string - a string object.
      • addRepositoryOrigin

        public void addRepositoryOrigin​(java.lang.String string)
        Method addRepositoryOrigin.
        Parameters:
        string - a string object.
      • getAliases

        public java.util.List<java.lang.String> getAliases()
        Method getAliases.
        Returns:
        List
      • getConfiguration

        public java.lang.Object getConfiguration()
        Get extra configuration for the transport layer.
        Returns:
        Object
      • getDirectoryPermissions

        public java.lang.String getDirectoryPermissions()
        Get the permissions for directories when they are created.
        Returns:
        String
      • getFilePermissions

        public java.lang.String getFilePermissions()
        Get the permissions for files when they are created.
        Returns:
        String
      • getPassphrase

        public java.lang.String getPassphrase()
        Get the passphrase used in conjunction with the privateKey to authenticate.
        Returns:
        String
      • getPassword

        public java.lang.String getPassword()
        Get the password used in conjunction with the username to authenticate.
        Returns:
        String
      • getPrivateKey

        public java.lang.String getPrivateKey()
        Get the private key location used to authenticate.
        Returns:
        String
      • getRepositoryOrigins

        public java.util.List<java.lang.String> getRepositoryOrigins()
        Method getRepositoryOrigins.
        Returns:
        List
      • getUsername

        public java.lang.String getUsername()
        Get the username used to authenticate.
        Returns:
        String
      • removeAlias

        public void removeAlias​(java.lang.String string)
        Method removeAlias.
        Parameters:
        string - a string object.
      • removeRepositoryOrigin

        public void removeRepositoryOrigin​(java.lang.String string)
        Method removeRepositoryOrigin.
        Parameters:
        string - a string object.
      • setAliases

        public void setAliases​(java.util.List<java.lang.String> aliases)
        Set list of additional server aliases. For each alias, an additional server entry will be generated with the same configuration as the original one, but with the ID replaced by the alias and with an empty aliases list. This is useful when the same credentials should be used for multiple servers.
        Parameters:
        aliases - a aliases object.
      • setConfiguration

        public void setConfiguration​(java.lang.Object configuration)
        Set extra configuration for the transport layer.
        Parameters:
        configuration - a configuration object.
      • setDirectoryPermissions

        public void setDirectoryPermissions​(java.lang.String directoryPermissions)
        Set the permissions for directories when they are created.
        Parameters:
        directoryPermissions - a directoryPermissions object.
      • setFilePermissions

        public void setFilePermissions​(java.lang.String filePermissions)
        Set the permissions for files when they are created.
        Parameters:
        filePermissions - a filePermissions object.
      • setPassphrase

        public void setPassphrase​(java.lang.String passphrase)
        Set the passphrase used in conjunction with the privateKey to authenticate.
        Parameters:
        passphrase - a passphrase object.
      • setPassword

        public void setPassword​(java.lang.String password)
        Set the password used in conjunction with the username to authenticate.
        Parameters:
        password - a password object.
      • setPrivateKey

        public void setPrivateKey​(java.lang.String privateKey)
        Set the private key location used to authenticate.
        Parameters:
        privateKey - a privateKey object.
      • setRepositoryOrigins

        public void setRepositoryOrigins​(java.util.List<java.lang.String> repositoryOrigins)
        Set list of repository origins these credentials may be used with, each written as scheme://host or scheme://host:port, for example https://repo.example.org or https://mirror.example.org:8443 - an origin, not a full repository URL. Maven binds the credentials of a server to the origins of the repositories and mirrors declared with the same id, see the maven.repository.credentialScope user property. The origins listed here are added to those; nothing is replaced. Declaring them is needed when the repository using these credentials is not known when the session is created, for example a repository declared in a settings.xml profile that is not listed in <activeProfiles> but activated through <activation> or -P. Comparison is case insensitive and the default ports 80 (http) and 443 (https) are equivalent to no port.
        Parameters:
        repositoryOrigins - a repositoryOrigins object.
      • setUsername

        public void setUsername​(java.lang.String username)
        Set the username used to authenticate.
        Parameters:
        username - a username object.