Package com.sas.services.information

# Class ServerDef

java.lang.Object
com.sas.services.information.ServerDef

All Implemented Interfaces:
  `ConsumedResourceInterface`, `Serializable`, `Cloneable`

public class ServerDef extends Object implements Cloneable, ConsumedResourceInterface, Serializable
Server definition used by an Information Service configuration.

Since:
  9.2
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ATTRIBUTE_AUTOCONNECT`
  XML element attribute describing the server definition's auto-connect preference.
  `static final String`
  `ATTRIBUTE_DESCRIPTION`
  XML element attribute describing the repository definition's description.
  `static final String`
  `ATTRIBUTE_DOMAIN`
  XML element attribute describing the repository definition's domain.
  `static final String`
  `ATTRIBUTE_HOST`
  XML element attribute "host" describing the server definition's host.
  `static final String`
  `ATTRIBUTE_ISSECURE`
  XML element attribute "issecure" describing the repository definition's secure status.
  `static final String`
  `ATTRIBUTE_NAME`
  XML element attribute "name" describing the server definition's name.
  `static final String`
  `ATTRIBUTE_PORT`
  XML element attribute describing the server definition's port number.
  `static final String`
  `ATTRIBUTE_PROTOCOL`
  XML element attribute "protocol" describing the repository definition's protocol.
  `static final String`
  `ATTRIBUTE_PROXY`
  XML element attribute "proxy" describing the repository definition's proxy URL.
  `static final String`
  `ATTRIBUTE_UID`
  XML element attribute "uid" describing the server definition's unique id.
  `static final String`
  `ELEMENT_NAME`
  XML element name "ServerDef" for a server definition.
  `static final String`
  `PROPERTYNAME_AUTOCONNECT`
  PropertyChangeEvent property name signifying a change in the repository definition's auto connect preference.
  `static final String`
  `PROPERTYNAME_DESCRIPTION`
  PropertyChangeEvent property name signifying a change in the repository definition's description.
  `static final String`
  `PROPERTYNAME_DOMAIN`
  PropertyChangeEvent property name signifying a change in the repository definition's domain.
  `static final String`
  `PROPERTYNAME_HOST`
  PropertyChangeEvent property name signifying a change in the repository definition's host.
  `static final String`
  `PROPERTYNAME_ISSECURE`
  PropertyChangeEvent property name signifying a change in the definition's secure status.
  `static final String`
  `PROPERTYNAME_NAME`
  PropertyChangeEvent property name signifying a change in the repository definition's name.
  `static final String`
  `PROPERTYNAME_PORT`
  PropertyChangeEvent property name signifying a change in the repository definition's port.
  `static final String`
  `PROPERTYNAME_PROTOCOL`
  PropertyChangeEvent property name signifying a change in the repository protocol.
  `static final String`
  `PROPERTYNAME_PROXY`
  PropertyChangeEvent property name signifying a change in the repository definition's proxy string.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ServerDef()`
  `ServerDef(String name, String protocol, String host, String port)`
  Constructs a server definition using a default id.
  `ServerDef(String uid, String name, String protocol, String host, String port)`
  Constructs a server definition using the specified id.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addAdvancedOptions(String key, String value)`
  `void`
  `addBaseLocation(String newBase)`
  `Object`
  `clone()`
  Clones this ServerDef.
  `final boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `Map`
  `getAdvancedOptions()`
  Gets a copy of the advanced options map.
  `boolean`
  `getAuto()`
  Get the flag which indicates whether this definition represents a connection that should be made automatically.
  `List`
  `getBaseLocations()`
  `String`
  `getDescription()`
  Get the description for this definition.
  `String`
  `getDomain()`
  Get the authentication domain name for this server.
  `String`
  `getHost()`
  Get the IP host name where the server is running.
  `boolean`
  `getIsSecure()`
  Get the secure connection flag for this definition.
  `String`
  `getLocalizedResourceType()`
  Gets a localized value describing the resource's type.
  `String`
  `getLocalizedResourceTypeAndValue()`
  Gets a localized value describing the resource's type and value.
  `String`
  `getName()`
  Get the name for this definition.
  `String`
  `getPort()`
  Get the IP port the server is listening on.
  `String`
  `getProtocol()`
  Get the application protocol for this server.
  `String`
  `getProxy()`
  Get the proxy URL for this repository definition.
  `String`
  `getResourceID()`
  Gets the id that uniquely identifies the resource within a service's configuration.
  `String`
  `getResourceType()`
  Gets a value describing the resource's type.
  `int`
  `getResourceTypeCode()`
  Gets the code describing the resource's type.
  `String`
  `getResourceValue()`
  Gets the value used to identify the service configuration resource.
  `String`
  `getUID()`
  Gets the unique ID.
  `String`
  `getUrl()`
  Get a URL that represents this definition.
  `final int`
  `hashCode()`
  Gets a hash code based upon this object's attributes.
  `boolean`
  `isRequired()`
  Determines if this resource is required by the service's configuration.
  `void`
  `removeBaseLocation(String base)`
  `void`
  `setAdvancedOptions(Map options)`
  `void`
  `setAuto(boolean auto)`
  Set whether this definition represents a connection which should be made automatically.
  `void`
  `setBaseLocations(List baseList)`
  `void`
  `setDescription(String description)`
  Set the description for this definition.
  `void`
  `setDomain(String domain)`
  Set the authentication domain name for this server.
  `void`
  `setHost(String host)`
  Set the IP host name for the host where the server is running.
  `void`
  `setIsSecure(boolean secure)`
  Set the secure connection flag for this definition.
  `void`
  `setName(String name)`
  Set the name for this definition.
  `void`
  `setPort(String port)`
  Set the IP port the server is listening on.
  `void`
  `setProtocol(String protocol)`
  Set the application protocol for this server.
  `void`
  `setProxy(String proxy)`
  Set the proxy string for this repository definition.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ELEMENT_NAME

    public static final String ELEMENT_NAME
    XML element name "ServerDef" for a server definition.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_UID

    public static final String ATTRIBUTE_UID
    XML element attribute "uid" describing the server definition's unique id.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_NAME

    public static final String ATTRIBUTE_NAME
    XML element attribute "name" describing the server definition's name.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_HOST

    public static final String ATTRIBUTE_HOST
    XML element attribute "host" describing the server definition's host.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_PORT

    public static final String ATTRIBUTE_PORT
    XML element attribute describing the server definition's port number.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_AUTOCONNECT

    public static final String ATTRIBUTE_AUTOCONNECT
    XML element attribute describing the server definition's auto-connect preference.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_DESCRIPTION

    public static final String ATTRIBUTE_DESCRIPTION
    XML element attribute describing the repository definition's description.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_DOMAIN

    public static final String ATTRIBUTE_DOMAIN
    XML element attribute describing the repository definition's domain.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_PROTOCOL

    public static final String ATTRIBUTE_PROTOCOL
    XML element attribute "protocol" describing the repository definition's protocol.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_PROXY

    public static final String ATTRIBUTE_PROXY
    XML element attribute "proxy" describing the repository definition's proxy URL.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_ISSECURE

    public static final String ATTRIBUTE_ISSECURE
    XML element attribute "issecure" describing the repository definition's secure status.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_PROTOCOL

    public static final String PROPERTYNAME_PROTOCOL
    PropertyChangeEvent property name signifying a change in the repository protocol.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_NAME

    public static final String PROPERTYNAME_NAME
    PropertyChangeEvent property name signifying a change in the repository definition's name.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_DESCRIPTION

    public static final String PROPERTYNAME_DESCRIPTION
    PropertyChangeEvent property name signifying a change in the repository definition's description.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_HOST

    public static final String PROPERTYNAME_HOST
    PropertyChangeEvent property name signifying a change in the repository definition's host.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_PORT

    public static final String PROPERTYNAME_PORT
    PropertyChangeEvent property name signifying a change in the repository definition's port.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_DOMAIN

    public static final String PROPERTYNAME_DOMAIN
    PropertyChangeEvent property name signifying a change in the repository definition's domain.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_AUTOCONNECT

    public static final String PROPERTYNAME_AUTOCONNECT
    PropertyChangeEvent property name signifying a change in the repository definition's auto connect preference.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_PROXY

    public static final String PROPERTYNAME_PROXY
    PropertyChangeEvent property name signifying a change in the repository definition's proxy string.
    See Also:
      - Constant Field Values

  - ### PROPERTYNAME_ISSECURE

    public static final String PROPERTYNAME_ISSECURE
    PropertyChangeEvent property name signifying a change in the definition's secure status.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ServerDef

    public ServerDef()

  - ### ServerDef

    public ServerDef(String name, String protocol, String host, String port)
    Constructs a server definition using a default id.
    Parameters:
      `name` - Server definition's name.
      `protocol` - Server's protocol.
      `host` - Server's host.
      `port` - Server's port.

  - ### ServerDef

    public ServerDef(String uid, String name, String protocol, String host, String port)
    Constructs a server definition using the specified id.
    Parameters:
      `uid` - Unique identifier. If `null`, then an ID will be generated.
      `name` - Server definition's name.
      `protocol` - Server's protocol.
      `host` - Server's host.
      `port` - Server's port.

- ## Method Details

  - ### setAuto

    public void setAuto(boolean auto)
    Set whether this definition represents a connection which should be made automatically.
    Parameters:
      `auto` - A flag indicating whether the repository this definition represents should be connected to automatically.

  - ### getAuto

    public boolean getAuto()
    Get the flag which indicates whether this definition represents a connection that should be made automatically.

    Returns:
      A flag indicating if this repository should be connected to automatically when a user logs in. This flag is only meaningful when set in the InformationService configuration.

  - ### getUID

    public String getUID()
    Gets the unique ID.
    Returns:
      Unique ID.

  - ### getUrl

    public String getUrl()
    Get a URL that represents this definition.

    Returns:
      a `String` value that represents this repository definition.

  - ### setHost

    public void setHost(String host)
    Set the IP host name for the host where the server is running.

    Parameters:
      `host` - The host the repository server is running on.

  - ### getHost

    public String getHost()
    Get the IP host name where the server is running.

    Returns:
      The host name where the server is running.

  - ### setPort

    public void setPort(String port)
    Set the IP port the server is listening on.

    Parameters:
      `port` - The IP port the repository server is listening on.

  - ### getPort

    public String getPort()
    Get the IP port the server is listening on.

    Returns:
      The IP port the repository server is listening on.

  - ### setDomain

    public void setDomain(String domain)
    Set the authentication domain name for this server.

    Parameters:
      `domain` - The authentication domain the server uses to authenticate users.

  - ### getDomain

    public String getDomain()
    Get the authentication domain name for this server.

    Returns:
      The authentication domain the server uses for authenticating users.

  - ### setProtocol

    public void setProtocol(String protocol)
    Set the application protocol for this server.

    Parameters:
      `protocol` - The protocol for this server (ldap, omi, dav).

  - ### getProtocol

    public String getProtocol()
    Get the application protocol for this server.

    Returns:
      The protocol for this server (ldap, omi, dav).

  - ### setDescription

    public void setDescription(String description)
    Set the description for this definition.

    Parameters:
      `description` - A string describing the repository represented by this definition.

  - ### getDescription

    public String getDescription()
    Get the description for this definition.
    Returns:
      A string describing the repository represented by this definition.

  - ### setName

    public void setName(String name)
    Set the name for this definition.

    Parameters:
      `name` - A name for this definition. The name is really only useful for definitions contained in the InformationService configuration.

  - ### getName

    public String getName()
    Get the name for this definition.

    Returns:
      The name string for this repository.

  - ### setProxy

    public void setProxy(String proxy)
    Set the proxy string for this repository definition.
    Parameters:
      `proxy` - The proxy URL.

  - ### getProxy

    public String getProxy()
    Get the proxy URL for this repository definition.
    Returns:
      The proxy URL as a string.

  - ### setIsSecure

    public void setIsSecure(boolean secure)
    Set the secure connection flag for this definition.
    Parameters:
      `secure` - True if a secure connection is to be used for this repository.

  - ### getIsSecure

    public boolean getIsSecure()
    Get the secure connection flag for this definition.
    Returns:
      true if a secure connection should be used for this repository.

  - ### equals

    public final boolean equals(Object obj)
    Indicates whether some other object is "equal to" this one. The other object is equivalent if all of the following are equivalent:
    - base
    - domain
    - host
    - name
    - description
    - proxy
    - protocol
    - port
    - security preference
    - auto-connect preference
    Overrides:
      `equals` in class `Object`
    Parameters:
      `obj` - the reference object with which to compare.
    Returns:
      `true` if this object is the same as the obj argument; `false` otherwise.
    See Also:
      - `hashCode()`
      - `Hashtable`

  - ### hashCode

    public final int hashCode()
    Gets a hash code based upon this object's attributes.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      Hash code.

  - ### setAdvancedOptions

    public void setAdvancedOptions(Map options)

  - ### addAdvancedOptions

    public void addAdvancedOptions(String key, String value)

  - ### getAdvancedOptions

    public Map getAdvancedOptions()
    Gets a copy of the advanced options map.
    Returns:

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### setBaseLocations

    public void setBaseLocations(List baseList)

  - ### removeBaseLocation

    public void removeBaseLocation(String base)

  - ### addBaseLocation

    public void addBaseLocation(String newBase)

  - ### getBaseLocations

    public List getBaseLocations()

  - ### clone

    public Object clone() throws CloneNotSupportedException
    Clones this ServerDef.
    Specified by:
      `clone` in interface `ConsumedResourceInterface`
    Overrides:
      `clone` in class `Object`
    Returns:
      Clone of this ServerDef.
    Throws:
      `CloneNotSupportedException`

  - ### getResourceID

    public String getResourceID()
    Description copied from interface: `ConsumedResourceInterface`
    Gets the id that uniquely identifies the resource within a service's configuration.
    Specified by:
      `getResourceID` in interface `ConsumedResourceInterface`
    Returns:
      Resource's ID.

  - ### getResourceValue

    public String getResourceValue()
    Description copied from interface: `ConsumedResourceInterface`
    Gets the value used to identify the service configuration resource.
    Specified by:
      `getResourceValue` in interface `ConsumedResourceInterface`
    Returns:
      Service configuration resource's value.

  - ### getLocalizedResourceType

    public String getLocalizedResourceType()
    Description copied from interface: `ConsumedResourceInterface`
    Gets a localized value describing the resource's type.
    Specified by:
      `getLocalizedResourceType` in interface `ConsumedResourceInterface`
    Returns:
      Resource's type. For example, a Logging Service configuration's resource types would be localized values for "Context", "Output", and "Renderer".

  - ### getLocalizedResourceTypeAndValue

    public String getLocalizedResourceTypeAndValue()
    Description copied from interface: `ConsumedResourceInterface`
    Gets a localized value describing the resource's type and value.
    Specified by:
      `getLocalizedResourceTypeAndValue` in interface `ConsumedResourceInterface`
    Returns:
      Resource's type. For example, a Logging Service configuration's resource types would be localized values for
      - "Context : com.sas.services"
      - "Output : A1"
      - "Renderer: com.sas.MyRenderer"

  - ### getResourceType

    public String getResourceType()
    Description copied from interface: `ConsumedResourceInterface`
    Gets a value describing the resource's type.
    Specified by:
      `getResourceType` in interface `ConsumedResourceInterface`
    Returns:
      Resource's type. For example, a Logging Service configuration's resource types would be "Context", "Output", and "Renderer".

  - ### getResourceTypeCode

    public int getResourceTypeCode()
    Description copied from interface: `ConsumedResourceInterface`
    Gets the code describing the resource's type.
    Specified by:
      `getResourceTypeCode` in interface `ConsumedResourceInterface`
    Returns:
      Resource's type code.

  - ### isRequired

    public boolean isRequired()
    Description copied from interface: `ConsumedResourceInterface`
    Determines if this resource is required by the service's configuration.
    Specified by:
      `isRequired` in interface `ConsumedResourceInterface`
    Returns:
      `true` if this resource is required by the service's configuration.