Platform SDK Java 8.5 API Reference

com.genesyslab.platform.apptemplate.configuration
Class GApplicationConfiguration

java.lang.Object
  extended by com.genesyslab.platform.apptemplate.configuration.GApplicationConfiguration
All Implemented Interfaces:
IGApplicationConfiguration, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
GCOMApplicationConfiguration

public class GApplicationConfiguration
extends java.lang.Object
implements IGApplicationConfiguration, java.lang.Cloneable, java.io.Serializable

This class represents base Genesys CME application options, which can be loaded from configuration server (with COM AB), or initialized by some other way like custom user code or any beans management mechanisms/frameworks.

It provides detached properties from COM AB CfgApplication and CfgHost objects without COM AB specific internal XML containers and can be created and filled with or without IConfService usage.

See Also:
GCOMApplicationConfiguration, Serialized Form

Nested Class Summary
static class GApplicationConfiguration.GAppConnConfiguration
          The application connection configuration structure reflects COM AB CfgConnInfo information.
It contains reference to connected server with related connection properties.
static class GApplicationConfiguration.GHost
          Structure describing host where server is configured to run.
It reflects detached information from COM AB CfgHost.
static class GApplicationConfiguration.GPortInfo
          This structure contains properties for listening port of server type application.
static class GApplicationConfiguration.GServerInfo
          This structure represents group of server type specific application properties.
 
Nested classes/interfaces inherited from interface com.genesyslab.platform.apptemplate.configuration.IGApplicationConfiguration
IGApplicationConfiguration.IGAppConnConfiguration, IGApplicationConfiguration.IGHost, IGApplicationConfiguration.IGPortInfo, IGApplicationConfiguration.IGServerInfo
 
Constructor Summary
GApplicationConfiguration()
          Default empty constructor.
GApplicationConfiguration(IGApplicationConfiguration appConfig)
          Coping constructor.
Note: it does not clone referred structures like ServerInfo, Options, etc.
 
Method Summary
 GApplicationConfiguration clone()
           
protected  java.lang.String contentToString()
          This method is used from toString() to build string representation of the internal content (configuration properties names and values).
 java.lang.String getApplicationName()
          Returns the application name.
It represents the correspondent name in Genesys Configuration framework.
 CfgAppType getApplicationType()
          Returns type of the application in terms of Genesys Configuration framework.
 IGApplicationConfiguration.IGAppConnConfiguration getAppServer(CfgAppType type)
          Overloaded method to select single connected application with specific application type.
It searches for value in getAppServers().
 java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> getAppServers()
          Returns list of structures describing connected server applications.
 java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> getAppServers(CfgAppType type)
          Overloaded method to select subset of connected applications with specific application type.
It searches for values in getAppServers().
static java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> getAppServers(java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> allConnections, CfgAppType type)
          Utility method to select subset of connected applications with specific application type.
 java.lang.Integer getDbid()
          Returns unique application object identifier in context of Genesys Configuration Database.
 KeyValueCollection getFlexibleProperties()
          Returns pointer to the list of additional properties.
 CfgObjectState getObjectState()
          Returns actual object state in the Genesys Configuration Database.
 KeyValueCollection getOptions()
          Returns pointer to the list of application-specific configuration options.
static IGApplicationConfiguration.IGPortInfo getPortInfo(java.util.List<IGApplicationConfiguration.IGPortInfo> allPorts, java.lang.String portId)
          Utility method to select listening port configuration by specified port name (id).
 IGApplicationConfiguration.IGPortInfo getPortInfo(java.lang.String portId)
          Overloaded method to select listening port configuration by specified port name (id).
It searches for value in getPortInfos().
 java.util.List<IGApplicationConfiguration.IGPortInfo> getPortInfos()
          Returns pointer to the list of structures of type IGApplicationConfiguration.IGPortInfo containing information about listening ports for this server application.
 CfgHAType getRedundancyType()
          Returns the HA type if this application is considered as server.
 IGApplicationConfiguration.IGServerInfo getServerInfo()
          Returns structure with server type application specific properties.
 KeyValueCollection getUserProperties()
          Returns pointer to the list of user-defined properties.
It represents the "Annex" tab of the application object in CME.
 java.lang.String getVersion()
          Returns the application version.
 java.lang.Boolean isPrimary()
          Returns value meaning role of application within HA/redundancy group.
 java.lang.Boolean isServer()
          Returns indicator of whether this application can be a server to some other applications.
 void setApplicationName(java.lang.String appName)
          Sets the application name.
It represents the correspondent name in Genesys Configuration framework.
 void setApplicationType(CfgAppType appType)
          Sets type of the application in terms of Genesys Configuration framework.
 void setAppServers(java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> appServers)
          Sets list of structures describing connected server applications.
 void setDbid(java.lang.Integer dbid)
          Sets unique application object identifier in terms of Genesys Configuration Database.
 void setFlexibleProperties(KeyValueCollection flexibleProperties)
          Sets pointer to the list of additional properties.
 void setIsPrimary(java.lang.Boolean isPrimary)
          Sets value meaning role of application within HA/redundancy group.
 void setIsServer(java.lang.Boolean isServer)
          Sets indicator of whether this application can be a server to some other applications.
 void setObjectState(CfgObjectState objectState)
          Sets actual object state in terms of Genesys Configuration Database.
 void setOptions(KeyValueCollection options)
          Sets pointer to the list of application-specific configuration options.
 void setPortInfos(java.util.List<IGApplicationConfiguration.IGPortInfo> portInfos)
          Sets pointer to the list of structures of type IGApplicationConfiguration.IGPortInfo containing information about listening ports for this server application.
 void setRedundancyType(CfgHAType redundancyType)
          Sets the HA type if this application is considered as server.
 void setServerInfo(IGApplicationConfiguration.IGServerInfo serverInfo)
          Sets structure with server type application specific properties.
 void setUserProperties(KeyValueCollection userProperties)
          Sets pointer to the list of user-defined properties.
It represents the "Annex" tab of the application object in CME.
 void setVersion(java.lang.String version)
          Sets the application version.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GApplicationConfiguration

public GApplicationConfiguration()
Default empty constructor. Creates uninitialized configuration object.


GApplicationConfiguration

public GApplicationConfiguration(IGApplicationConfiguration appConfig)
Coping constructor.
Note: it does not clone referred structures like ServerInfo, Options, etc.

Parameters:
appConfig - original configuration
Method Detail

getApplicationName

public java.lang.String getApplicationName()
Returns the application name.
It represents the correspondent name in Genesys Configuration framework.

Specified by:
getApplicationName in interface IGApplicationConfiguration
Returns:
the application name
See Also:
CfgApplication.getName()

setApplicationName

public void setApplicationName(java.lang.String appName)
Sets the application name.
It represents the correspondent name in Genesys Configuration framework.

Parameters:
appName - application name
See Also:
CfgApplication.getName()

getApplicationType

public CfgAppType getApplicationType()
Returns type of the application in terms of Genesys Configuration framework.

Specified by:
getApplicationType in interface IGApplicationConfiguration
Returns:
the application type
See Also:
CfgApplication.getType()

setApplicationType

public void setApplicationType(CfgAppType appType)
Sets type of the application in terms of Genesys Configuration framework.

Parameters:
appType - application type
See Also:
CfgApplication.getType()

getDbid

public java.lang.Integer getDbid()
Returns unique application object identifier in context of Genesys Configuration Database.

Specified by:
getDbid in interface IGApplicationConfiguration
Returns:
the application DBID
See Also:
CfgApplication.getDBID()

setDbid

public void setDbid(java.lang.Integer dbid)
Sets unique application object identifier in terms of Genesys Configuration Database.

Parameters:
dbid - application DBID
See Also:
CfgApplication.getDBID()

getObjectState

public CfgObjectState getObjectState()
Returns actual object state in the Genesys Configuration Database.

Specified by:
getObjectState in interface IGApplicationConfiguration
Returns:
actual object state
See Also:
CfgApplication.getState()

setObjectState

public void setObjectState(CfgObjectState objectState)
Sets actual object state in terms of Genesys Configuration Database.

Parameters:
objectState - actual object state
See Also:
CfgApplication.getState()

isServer

public java.lang.Boolean isServer()
Returns indicator of whether this application can be a server to some other applications. This value depends on the application type - getApplicationType().

Specified by:
isServer in interface IGApplicationConfiguration
Returns:
property value or null
See Also:
CfgApplication.getIsServer()

setIsServer

public void setIsServer(java.lang.Boolean isServer)
Sets indicator of whether this application can be a server to some other applications.

Parameters:
isServer - the property value
See Also:
CfgApplication.getIsServer()

isPrimary

public java.lang.Boolean isPrimary()
Returns value meaning role of application within HA/redundancy group.

Specified by:
isPrimary in interface IGApplicationConfiguration
Returns:
property value or null
See Also:
CfgApplication.getIsPrimary()

setIsPrimary

public void setIsPrimary(java.lang.Boolean isPrimary)
Sets value meaning role of application within HA/redundancy group.

Parameters:
isPrimary - property value or null
See Also:
CfgApplication.getIsPrimary()

getVersion

public java.lang.String getVersion()
Returns the application version.

Specified by:
getVersion in interface IGApplicationConfiguration
Returns:
the application version
See Also:
CfgApplication.getVersion()

setVersion

public void setVersion(java.lang.String version)
Sets the application version.

Parameters:
version - application version
See Also:
CfgApplication.getVersion()

getServerInfo

public IGApplicationConfiguration.IGServerInfo getServerInfo()
Returns structure with server type application specific properties. It should be null for client type applications.

Specified by:
getServerInfo in interface IGApplicationConfiguration
Returns:
the server type specific application properties or null
See Also:
CfgApplication.getServerInfo(), CfgServer

setServerInfo

public void setServerInfo(IGApplicationConfiguration.IGServerInfo serverInfo)
Sets structure with server type application specific properties. It should be null for client type applications.

Parameters:
serverInfo - server type specific application properties or null
See Also:
CfgApplication.getServerInfo(), CfgServer

getPortInfos

public java.util.List<IGApplicationConfiguration.IGPortInfo> getPortInfos()
Returns pointer to the list of structures of type IGApplicationConfiguration.IGPortInfo containing information about listening ports for this server application.

Specified by:
getPortInfos in interface IGApplicationConfiguration
Returns:
list of structures or null
See Also:
CfgApplication.getPortInfos()

getPortInfo

public IGApplicationConfiguration.IGPortInfo getPortInfo(java.lang.String portId)
Overloaded method to select listening port configuration by specified port name (id).
It searches for value in getPortInfos().

Parameters:
portId - listening port name (id) to look for
Returns:
listening port configuration or null
See Also:
getPortInfos(), getPortInfo(List, String)

getPortInfo

public static IGApplicationConfiguration.IGPortInfo getPortInfo(java.util.List<IGApplicationConfiguration.IGPortInfo> allPorts,
                                                                java.lang.String portId)
Utility method to select listening port configuration by specified port name (id).

Parameters:
allPorts - list of port descriptions to select from
portId - listening port name (id) to look for
Returns:
listening port configuration or null

setPortInfos

public void setPortInfos(java.util.List<IGApplicationConfiguration.IGPortInfo> portInfos)
Sets pointer to the list of structures of type IGApplicationConfiguration.IGPortInfo containing information about listening ports for this server application.

Parameters:
portInfos - list of structures or null
See Also:
CfgApplication.getPortInfos()

getRedundancyType

public CfgHAType getRedundancyType()
Returns the HA type if this application is considered as server.

Specified by:
getRedundancyType in interface IGApplicationConfiguration
Returns:
the application HA type or null
See Also:
CfgApplication.getRedundancyType()

setRedundancyType

public void setRedundancyType(CfgHAType redundancyType)
Sets the HA type if this application is considered as server.

Parameters:
redundancyType - application HA type or null
See Also:
CfgApplication.getRedundancyType()

getAppServers

public java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> getAppServers()
Returns list of structures describing connected server applications.

Specified by:
getAppServers in interface IGApplicationConfiguration
Returns:
list of structures or null
See Also:
IGApplicationConfiguration.IGAppConnConfiguration, CfgApplication.getAppServers(), CfgConnInfo

getAppServers

public java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> getAppServers(CfgAppType type)
Overloaded method to select subset of connected applications with specific application type.
It searches for values in getAppServers().

Parameters:
type - application type to look for
Returns:
list of connected applications with specific type or null
See Also:
getAppServers()

getAppServer

public IGApplicationConfiguration.IGAppConnConfiguration getAppServer(CfgAppType type)
Overloaded method to select single connected application with specific application type.
It searches for value in getAppServers().

Parameters:
type - application type to look for
Returns:
application connection configuration for specified application type or null
See Also:
getAppServers()

getAppServers

public static java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> getAppServers(java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> allConnections,
                                                                                              CfgAppType type)
Utility method to select subset of connected applications with specific application type.

Parameters:
allConnections - list of applications connections to select from
type - application type to look for
Returns:
list of connected applications with specific type or null

setAppServers

public void setAppServers(java.util.List<IGApplicationConfiguration.IGAppConnConfiguration> appServers)
Sets list of structures describing connected server applications.

Parameters:
appServers - list of structures or null
See Also:
IGApplicationConfiguration.IGAppConnConfiguration, CfgApplication.getAppServers(), CfgConnInfo

getOptions

public KeyValueCollection getOptions()
Returns pointer to the list of application-specific configuration options.

Specified by:
getOptions in interface IGApplicationConfiguration
Returns:
collection of options' sections or null
See Also:
CfgApplication.getOptions()

setOptions

public void setOptions(KeyValueCollection options)
Sets pointer to the list of application-specific configuration options.

Parameters:
options - collection of options' sections or null
See Also:
CfgApplication.getOptions()

getUserProperties

public KeyValueCollection getUserProperties()
Returns pointer to the list of user-defined properties.
It represents the "Annex" tab of the application object in CME.

Specified by:
getUserProperties in interface IGApplicationConfiguration
Returns:
collection of properties sections or null
See Also:
CfgApplication.getUserProperties()

setUserProperties

public void setUserProperties(KeyValueCollection userProperties)
Sets pointer to the list of user-defined properties.
It represents the "Annex" tab of the application object in CME.

Parameters:
userProperties - collection of properties sections or null
See Also:
CfgApplication.getUserProperties()

getFlexibleProperties

public KeyValueCollection getFlexibleProperties()
Returns pointer to the list of additional properties.

Specified by:
getFlexibleProperties in interface IGApplicationConfiguration
Returns:
collection of additional properties or null
See Also:
CfgApplication.getFlexibleProperties()

setFlexibleProperties

public void setFlexibleProperties(KeyValueCollection flexibleProperties)
Sets pointer to the list of additional properties.

Parameters:
flexibleProperties - collection of additional properties or null
See Also:
CfgApplication.getFlexibleProperties()

clone

public GApplicationConfiguration clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

contentToString

protected java.lang.String contentToString()
This method is used from toString() to build string representation of the internal content (configuration properties names and values).

Returns:
string representation of the configuration content
See Also:
toString()

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.