com.ansys.ingress.client.api

## Class ConnectionDetails

- java.lang.Object
- - com.ansys.ingress.client.api.ConnectionDetails

-     public class ConnectionDetails
      extends java.lang.Object

  ConnectionDetails provides information about a connection to an EKM server.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectionDetails()` Creates a new instance of ConnectionDetails.
    `ConnectionDetails(java.lang.String name, java.net.URI location, java.lang.String workspace, java.lang.String username, java.lang.String password, boolean savedCredentials)` Creates a new instance of ConnectionDetails.
    `ConnectionDetails(java.lang.String name, java.net.URL location, java.lang.String workspace, Credentials creds, boolean savedCreds)` Creates a new instance of ConnectionDetails.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConnectionDetails` | `cloneForPersistence()` Creates a clone of this object that is safe to persist.
    `boolean` | `credentialsMatch(java.lang.String username, java.lang.String password)` Determines if the given username and password match the ones associated with this connection.
    `java.lang.String` | `getActiveUri()` The URI of the object the user is currently accessing in a browser or null if the user is not currently using a browser.
    `java.util.List<java.lang.String>` | `getAvailableWorkspaces()`
    `java.lang.String` | `getCacheServer()`
    `int` | `getCacheServerPort()`
    `java.lang.String` | `getCacheServerProtocol()`
    `java.lang.String` | `getCacheServerUrl()`
    `java.lang.String` | `getEkmSessionId()`
    `java.lang.String` | `getHttpSessionId()`
    `java.net.URI` | `getLocation()`
    `java.lang.String` | `getName()`
    `java.lang.String` | `getPassword()`
    `com.ansys.ingress.commons.model.Units` | `getUnits()`
    `java.lang.String` | `getUnitSystemName()`
    `java.lang.String` | `getUserArchiveId()`
    `java.lang.String` | `getUsername()`
    `java.lang.String` | `getUserToken()`
    `java.lang.String` | `getWorkspace()`
    `org.jdom.Document` | `getWorkspaceConfig()`
    `boolean` | `hasSavedCredentials()`
    `boolean` | `isAdminUser()`
    `boolean` | `isOpen()`
    `boolean` | `isSaved()`
    `void` | `resetCredentials()` Resets the details back to an unitialized state.
    `void` | `setActiveUri(java.lang.String activeUri)` Sets the value of the activeUri.
    `void` | `setAdminUser(boolean adminUser)` Sets the flag indicating if this is an admin user or not.
    `void` | `setCacheServer(java.lang.String cacheServer)` Sets the value of the cacheServer.
    `void` | `setCacheServerPort(int cacheServerPort)` Sets the value of the cacheServerPort.
    `void` | `setCacheServerProtocol(java.lang.String cacheServerProtocol)` Sets the protocol used by the EKM cache server.
    `void` | `setEkmSessionId(java.lang.String ekmSessionId)` Sets the ID of the EKM session associated with this connection.
    `void` | `setHttpSessionId(java.lang.String httpSessionId)` Sets the ID of the HTTP session associated with this connection.
    `void` | `setLocation(java.net.URI location)` Sets the location of the EKM server associated with a connectino.
    `void` | `setName(java.lang.String name)` Sets the name of the connection.
    `void` | `setOpen(boolean open)` Sets the flag indicating if this connection is opened or not.
    `void` | `setSaved(boolean saved)` Sets flag indicating if this is a saved connection or not.
    `void` | `setSavedCredentials(boolean savedCredentials)` Sets flag indicating this connection has saved credentials.
    `void` | `setUnits(com.ansys.ingress.commons.model.Units units)` Sets the units system for this connection.
    `void` | `setUnitSystemName(java.lang.String unitSystemName)` Sets the unit system name for the user
    `void` | `setUserArchiveId(java.lang.String userArchiveId)` Sets the unique ID of this user.
    `void` | `setUsername(java.lang.String username)` Sets the name of the user associated with a connectino.
    `void` | `setUserToken(java.lang.String authenticationToken)` Sets the token that can be used to authenticate with the EKM server.
    `void` | `setWorkspace(java.lang.String workspace)` Sets the workspace being used by this connection.
    `void` | `setWorkspaceConfig(org.jdom.Document workspaceConfig)` Sets the XML document containing workspace configuration data.
    `void` | `setWorkspaces(java.util.List<java.lang.String> workspaces)` Sets the workspaces available in this connection.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConnectionDetails

          public ConnectionDetails(java.lang.String name,
                                   java.net.URI location,
                                   java.lang.String workspace,
                                   java.lang.String username,
                                   java.lang.String password,
                                   boolean savedCredentials)

      Creates a new instance of ConnectionDetails.
      Parameters:
        `name` - the name of the connection
        `location` - the location of the EKM server associated with the connection
        `workspace` - the workspace associated with the connection
        `username` - the username associated with the connection
        `password` - the password associated with the connection
        `savedCredentials` - if the connection has saved credentials or not.

    - #### ConnectionDetails

          public ConnectionDetails(java.lang.String name,
                                   java.net.URL location,
                                   java.lang.String workspace,
                                   Credentials creds,
                                   boolean savedCreds)
                            throws java.net.URISyntaxException

      Creates a new instance of ConnectionDetails.
      Parameters:
        `name` - the name of the connection
        `location` - the location of the EKM server associated with the connection
        `workspace` - the workspace associated with the connection
        `creds` - the user's credentials
        `savedCreds` - if the connection has saved credentials or not.
      Throws:
        `java.net.URISyntaxException` - if the location has invalid syntax

    - #### ConnectionDetails

          public ConnectionDetails()

      Creates a new instance of ConnectionDetails.

  - ### Method Detail

    - #### cloneForPersistence

          public ConnectionDetails cloneForPersistence()

      Creates a clone of this object that is safe to persist.
      Returns:
        Returns the cloned object.

    - #### credentialsMatch

          public boolean credentialsMatch(java.lang.String username,
                                          java.lang.String password)

      Determines if the given username and password match the ones associated with this connection.
      Parameters:
        `username` - the username to check
        `password` - the password to check
      Returns:
        Returns true if the credentials match.

    - #### getActiveUri

          public java.lang.String getActiveUri()

      The URI of the object the user is currently accessing in a browser or null if the user is not currently using a browser.
      Returns:
        Returns the value.

    - #### getAvailableWorkspaces

          public java.util.List<java.lang.String> getAvailableWorkspaces()

      Returns:
        Returns a list of available workspaces for the connection.

    - #### getCacheServer

          public java.lang.String getCacheServer()

      Returns:
        Returns the location of the current user's cache server or null if the user does not have one assigned.

    - #### getCacheServerPort

          public int getCacheServerPort()

      Returns:
        Returns the port of the currentuser's cache server or 0 if the user does not have one assigned.

    - #### getCacheServerProtocol

          public java.lang.String getCacheServerProtocol()

      Returns:
        Returns the protocol used by the EKM Cache server.

    - #### getCacheServerUrl

          public java.lang.String getCacheServerUrl()

      Returns:
        Returns the URL to the EKM cache server or null if one is not configured for the current user.

    - #### getEkmSessionId

          public java.lang.String getEkmSessionId()

      Returns:
        Returns the ID of the user's EKM session.

    - #### getHttpSessionId

          public java.lang.String getHttpSessionId()

      Returns:
        Returns the ID of the HTTP session associated with this connection.

    - #### getLocation

          public java.net.URI getLocation()

      Returns:
        Returns the location of the EKM server associated with this connection.

    - #### getName

          public java.lang.String getName()

      Returns:
        Returns the name of the connection.

    - #### getPassword

          public java.lang.String getPassword()

      Returns:
        Returns the user's password.

    - #### getUnits

          public com.ansys.ingress.commons.model.Units getUnits()

      Returns:
        Returns the units system for this connection.

    - #### getUnitSystemName

          public java.lang.String getUnitSystemName()

      Returns:
        Returns the unit system name for the user.

    - #### getUsername

          public java.lang.String getUsername()

      Returns:
        Return's the username used to authenticate the user.

    - #### getUserArchiveId

          public java.lang.String getUserArchiveId()

      Returns:
        Returns the user's unique ID.

    - #### getUserToken

          public java.lang.String getUserToken()

      Returns:
        Returns the user's authentication token.

    - #### getWorkspace

          public java.lang.String getWorkspace()

      Returns:
        Returns the workspace associated with the connection. This may be null if the workspace was not explicitly specified.

    - #### getWorkspaceConfig

          public org.jdom.Document getWorkspaceConfig()

      Returns:
        Returns the XML document containing the workspace's configuration data.

    - #### hasSavedCredentials

          public boolean hasSavedCredentials()

      Returns:
        Returns true if the connection has saved credentials.

    - #### isAdminUser

          public boolean isAdminUser()

      Returns:
        Returns true if the user associated with the connection is an admin user.

    - #### isOpen

          public boolean isOpen()

      Returns:
        Returens true if the connection is open.

    - #### isSaved

          public boolean isSaved()

      Returns:
        Returns true if this connection is saved.

    - #### resetCredentials

          public void resetCredentials()

      Resets the details back to an unitialized state.

    - #### setActiveUri

          public void setActiveUri(java.lang.String activeUri)

      Sets the value of the activeUri.
      Parameters:
        `activeUri` - the value to set

    - #### setAdminUser

          public void setAdminUser(boolean adminUser)

      Sets the flag indicating if this is an admin user or not.
      Parameters:
        `adminUser` - the value to set

    - #### setCacheServer

          public void setCacheServer(java.lang.String cacheServer)

      Sets the value of the cacheServer.
      Parameters:
        `cacheServer` - the value to set

    - #### setCacheServerPort

          public void setCacheServerPort(int cacheServerPort)

      Sets the value of the cacheServerPort.
      Parameters:
        `cacheServerPort` - the value to set

    - #### setCacheServerProtocol

          public void setCacheServerProtocol(java.lang.String cacheServerProtocol)

      Sets the protocol used by the EKM cache server.
      Parameters:
        `cacheServerProtocol` - the protocol

    - #### setEkmSessionId

          public void setEkmSessionId(java.lang.String ekmSessionId)

      Sets the ID of the EKM session associated with this connection.
      Parameters:
        `ekmSessionId` - the value to set

    - #### setHttpSessionId

          public void setHttpSessionId(java.lang.String httpSessionId)

      Sets the ID of the HTTP session associated with this connection.
      Parameters:
        `httpSessionId` - the value to set

    - #### setLocation

          public void setLocation(java.net.URI location)

      Sets the location of the EKM server associated with a connectino.
      Parameters:
        `location` - the value to set

    - #### setName

          public void setName(java.lang.String name)

      Sets the name of the connection.
      Parameters:
        `name` - the value to set

    - #### setOpen

          public void setOpen(boolean open)

      Sets the flag indicating if this connection is opened or not.
      Parameters:
        `open` - the value to set

    - #### setSaved

          public void setSaved(boolean saved)

      Sets flag indicating if this is a saved connection or not.
      Parameters:
        `saved` - the value to set

    - #### setSavedCredentials

          public void setSavedCredentials(boolean savedCredentials)

      Sets flag indicating this connection has saved credentials.
      Parameters:
        `savedCredentials` - the value to set

    - #### setUnits

          public void setUnits(com.ansys.ingress.commons.model.Units units)

      Sets the units system for this connection.
      Parameters:
        `units` - the units system

    - #### setUnitSystemName

          public void setUnitSystemName(java.lang.String unitSystemName)

      Sets the unit system name for the user
      Parameters:
        `unitSystemName` - the value to set

    - #### setUserArchiveId

          public void setUserArchiveId(java.lang.String userArchiveId)

      Sets the unique ID of this user.
      Parameters:
        `userArchiveId` - the user's unique ID

    - #### setUsername

          public void setUsername(java.lang.String username)

      Sets the name of the user associated with a connectino.
      Parameters:
        `username` - the username to set

    - #### setUserToken

          public void setUserToken(java.lang.String authenticationToken)

      Sets the token that can be used to authenticate with the EKM server.
      Parameters:
        `authenticationToken` - the token

    - #### setWorkspace

          public void setWorkspace(java.lang.String workspace)

      Sets the workspace being used by this connection.
      Parameters:
        `workspace` - the value to set

    - #### setWorkspaces

          public void setWorkspaces(java.util.List<java.lang.String> workspaces)

      Sets the workspaces available in this connection.
      Parameters:
        `workspaces` - the workspaces

    - #### setWorkspaceConfig

          public void setWorkspaceConfig(org.jdom.Document workspaceConfig)

      Sets the XML document containing workspace configuration data.
      Parameters:
        `workspaceConfig` - the XML document