Class LoginDefinition


  • public class LoginDefinition
    extends java.lang.Object
    This class represents a single entry a Login object.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        LoginDefinition​(UC4HostName host, java.lang.String hostType, java.lang.String loginInfo)
      Constructs a new LoginDefinition using the specified values.
        LoginDefinition​(UC4HostName host, java.lang.String hostType, java.lang.String loginInfo, boolean makeHostTypeUpperCase)
      Constructs a new LoginDefinition using the specified values.
      protected LoginDefinition​(org.w3c.dom.Element row)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      UC4HostName getHost()
      Returns the name of the Agent or a generic host name.
      java.lang.String getHostType()
      Returns the host type.
      java.lang.String getLoginInfo()
      Returns the login information.
      java.lang.String getVault()
      Returns the External vault.
      int hashCode()  
      void setHost​(UC4HostName host)
      Sets the name of the Agent or a generic host name.
      void setHostType​(java.lang.String hostType)
      Sets the host type.
      void setHostType​(java.lang.String hostType, boolean makeUpperCase)
      Sets the host type.
      void setLoginInfo​(java.lang.String loginInfo)
      Sets the login information.
      void setPassword​(java.lang.String passw)
      Sets the password.
      void setPasswords​(java.lang.String password1, java.lang.String password2, java.lang.String password3)
      Sets up to 3 passwords.
      void setVault​(java.lang.String vault)
      Sets External vault.
      protected void store​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element logins, ConnectionAttributes sessionInfo)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoginDefinition

        protected LoginDefinition​(org.w3c.dom.Element row)
      • LoginDefinition

        public LoginDefinition​(UC4HostName host,
                               java.lang.String hostType,
                               java.lang.String loginInfo)
        Constructs a new LoginDefinition using the specified values.
        Parameters:
        host - Host name, use an empty UC4HostName to add the login definition for all host of this host type
        hostType - Host type
        loginInfo - Login information
      • LoginDefinition

        public LoginDefinition​(UC4HostName host,
                               java.lang.String hostType,
                               java.lang.String loginInfo,
                               boolean makeHostTypeUpperCase)
        Constructs a new LoginDefinition using the specified values.
        Parameters:
        host - Host name, use an empty UC4HostName to add the login definition for all host of this host type
        hostType - Host type
        loginInfo - Login information
        makeHostTypeUpperCase - flag for making the host type string upper case
    • Method Detail

      • setPassword

        public void setPassword​(java.lang.String passw)
        Sets the password. This method must be called after setHost
        Parameters:
        passw - Password
      • setPasswords

        public void setPasswords​(java.lang.String password1,
                                 java.lang.String password2,
                                 java.lang.String password3)
        Sets up to 3 passwords. This is used for JMX only. The parameter password1 is required, other parameters are optional and can be set to null.
        Parameters:
        password1 - Password1
        password2 - Password2
        password3 - Password3
      • getHost

        public UC4HostName getHost()
        Returns the name of the Agent or a generic host name.
        Returns:
        Name of the Agent
      • setHost

        public void setHost​(UC4HostName host)
        Sets the name of the Agent or a generic host name. This method resets a stored password. After this method is called use setPassword or setPasswords to set the password(s) again.
        Parameters:
        host - Name of the Agent
      • getHostType

        public java.lang.String getHostType()
        Returns the host type.
        Returns:
        Host type
      • setHostType

        public void setHostType​(java.lang.String hostType)
        Sets the host type. Throws IllegalArgumentException if hostType is a String with zero length.
        Parameters:
        hostType - Host type
      • setHostType

        public void setHostType​(java.lang.String hostType,
                                boolean makeUpperCase)
        Sets the host type. Throws IllegalArgumentException if hostType is a String with zero length.
        Parameters:
        hostType - Host type
        makeUpperCase - flag for making the host type string upper case.
      • setVault

        public void setVault​(java.lang.String vault)
        Sets External vault.
        Parameters:
        vault - String
      • getVault

        public java.lang.String getVault()
        Returns the External vault.
        Returns:
        vault
      • getLoginInfo

        public java.lang.String getLoginInfo()
        Returns the login information.
        Returns:
        Login information
      • setLoginInfo

        public void setLoginInfo​(java.lang.String loginInfo)
        Sets the login information.
        Parameters:
        loginInfo - Login information
      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element logins,
                             ConnectionAttributes sessionInfo)
      • 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