Package com.uc4.api.objects
Class LoginDefinition
java.lang.Object
com.uc4.api.objects.LoginDefinition
This class represents a single entry a Login object.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionLoginDefinition
(UC4HostName host, String hostType, String loginInfo) Constructs a newLoginDefinition
using the specified values.LoginDefinition
(UC4HostName host, String hostType, String loginInfo, boolean makeHostTypeUpperCase) Constructs a newLoginDefinition
using the specified values.protected
LoginDefinition
(Element row) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getHost()
Returns the name of the Agent or a generic host name.Returns the host type.Returns the login information.getVault()
Returns the External vault.int
hashCode()
void
setHost
(UC4HostName host) Sets the name of the Agent or a generic host name.void
setHostType
(String hostType) Sets the host type.void
setHostType
(String hostType, boolean makeUpperCase) Sets the host type.void
setLoginInfo
(String loginInfo) Sets the login information.void
setPassword
(String passw) Sets the password.void
setPasswords
(String password1, String password2, String password3) Sets up to 3 passwords.void
Sets External vault.protected void
store
(com.uc4.util.XMLDocument doc, Element logins, ConnectionAttributes sessionInfo)
-
Constructor Details
-
LoginDefinition
-
LoginDefinition
Constructs a newLoginDefinition
using the specified values.- Parameters:
host
- Host name, use an empty UC4HostName to add the login definition for all host of this host typehostType
- Host typeloginInfo
- Login information
-
LoginDefinition
public LoginDefinition(UC4HostName host, String hostType, String loginInfo, boolean makeHostTypeUpperCase) Constructs a newLoginDefinition
using the specified values.- Parameters:
host
- Host name, use an empty UC4HostName to add the login definition for all host of this host typehostType
- Host typeloginInfo
- Login informationmakeHostTypeUpperCase
- flag for making the host type string upper case
-
-
Method Details
-
setPassword
Sets the password. This method must be called aftersetHost
- Parameters:
passw
- Password
-
setPasswords
Sets up to 3 passwords. This is used for JMX only. The parameterpassword1
is required, other parameters are optional and can be set tonull
.- Parameters:
password1
- Password1password2
- Password2password3
- Password3
-
getHost
Returns the name of the Agent or a generic host name.- Returns:
- Name of the Agent
-
setHost
Sets the name of the Agent or a generic host name. This method resets a stored password. After this method is called usesetPassword
orsetPasswords
to set the password(s) again.- Parameters:
host
- Name of the Agent
-
getHostType
Returns the host type.- Returns:
- Host type
-
setHostType
Sets the host type. Throws IllegalArgumentException if hostType is a String with zero length.- Parameters:
hostType
- Host type
-
setHostType
Sets the host type. Throws IllegalArgumentException if hostType is a String with zero length.- Parameters:
hostType
- Host typemakeUpperCase
- flag for making the host type string upper case.
-
setVault
Sets External vault.- Parameters:
vault
- String
-
getVault
Returns the External vault.- Returns:
- vault
-
getLoginInfo
Returns the login information.- Returns:
- Login information
-
setLoginInfo
Sets the login information.- Parameters:
loginInfo
- Login information
-
store
protected void store(com.uc4.util.XMLDocument doc, Element logins, ConnectionAttributes sessionInfo) -
hashCode
public int hashCode() -
equals
-