Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons
Class PsdkCustomization

java.lang.Object
  extended by com.genesyslab.platform.commons.PsdkCustomization

public final class PsdkCustomization
extends java.lang.Object

Platform SDK Core Functionality customization options modification interface.

Important note: PSDK Core options are supposed for experts usage. Do not use it if you have no clear vision what is the option is responsible for and how does the change affect PSDK and application behavior.

Java System properties may be used for tuning of special Platform SDK options. Supported options are described in the enumeration PsdkCustomization.PsdkOption.

The properties values may be defined in:

Some customization options have ability of "branching". For example, if some option is applicable for all protocol types, this option allows overriding of its value for particular protocol.
For instance, Platform SDK 8.5 provides new feature of delivery of "protocol unknown" incoming messages to user application. In some cases it may lead to backward compatibility issues.
So, PSDK provides ability to switch off this feature:

PsdkCustomization.setOption(PsdkOption.DisableUnknownProtocolMessageDelivery, "true");
At the same time it is possible to make "branch" of the option for particular protocol and override it:
PsdkCustomization.setOption(PsdkOption.DisableUnknownProtocolMessageDelivery,
        SolutionControlServerProtocolFactory.PROTOCOL_DESCRIPTION.toString(), "false");
From the jvm system properties point of view, "branching" means setting of property with specific name:
 // Property PsdkOption.DisableUnknownProtocolMessageDelivery:
 // system property is "com.genesyslab.platform.disable-unknown-incoming-messages" ("<option-namespace>.<option-name>")
 // Then branching of the option will look like:

 String optBranch = SolutionControlServerProtocolFactory.PROTOCOL_DESCRIPTION.toString();
 PsdkCustomization.setOption(PsdkOption.DisableUnknownProtocolMessageDelivery, optBranch, "true");
 // - It makes option branch for specific protocol: "<option-namespace>.<branch-name>.<option-name>"
 // so, the system property will be "com.genesyslab.platform.Management.SolutionControlServer.disable-unknown-incoming-messages"
Each "brancheable" option has own range of "valid" branch names. Branch name is not been validated, so, usage of wrong branch name leads to wrongly named option setting and has no effect on PSDK behavior.
See documentation on particular option for its possible branches and specifics.

Note: These options are not supposed to be changed dynamically in runtime.
Required initialization should be done in the configuration file, jvm system properties ("-D???"), or with System.setProperty(String, String) at initialization phase of the application (before creation or calling to Platform SDK protocol connections or other components classes).


Nested Class Summary
static class PsdkCustomization.PsdkOption
          Enumeration with declarations of supported Platform SDK core properties names.
 
Method Summary
static java.lang.Boolean getBoolOption(PsdkCustomization.PsdkOption option, java.lang.Boolean defaultValue)
          Returns value of given Platform SDK Core Customization option.
static java.lang.Boolean getBoolOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.Boolean defaultValue)
          Returns value of given Platform SDK Core Customization option.
static java.lang.Integer getIntOption(PsdkCustomization.PsdkOption option, java.lang.Integer defaultValue)
          Returns value of given Platform SDK Core Customization option.
static java.lang.Integer getIntOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.Integer defaultValue)
          Returns value of given Platform SDK Core Customization option.
static java.lang.String getOption(PsdkCustomization.PsdkOption option)
          Returns value of given Platform SDK Core Customization option.
static java.lang.String getOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.String defaultValue)
          Returns value of given Platform SDK Core Customization option.
static void setOption(PsdkCustomization.PsdkOption option, java.lang.String optionValue)
          Sets Platform SDK Core Customization option value.
static void setOption(PsdkCustomization.PsdkOption option, java.lang.String branch, java.lang.String optionValue)
          Sets Platform SDK Core Customization option value.
static java.lang.String toStringDump()
          Generates string representation of the customization options for logging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOption

public static java.lang.String getOption(PsdkCustomization.PsdkOption option)
Returns value of given Platform SDK Core Customization option.

Parameters:
option - customization option.
Returns:
Option value or null.

getOption

public static java.lang.String getOption(PsdkCustomization.PsdkOption option,
                                         java.lang.String branch,
                                         java.lang.String defaultValue)
Returns value of given Platform SDK Core Customization option.

Parameters:
option - customization option.
branch - option branch name or null for default.
defaultValue - default value to be used if option is not defined.
Returns:
Option value or given default.

getIntOption

public static java.lang.Integer getIntOption(PsdkCustomization.PsdkOption option,
                                             java.lang.Integer defaultValue)
Returns value of given Platform SDK Core Customization option.

Parameters:
option - customization option.
defaultValue - default value to be used if option is not defined.
Returns:
Option value or given default.

getIntOption

public static java.lang.Integer getIntOption(PsdkCustomization.PsdkOption option,
                                             java.lang.String branch,
                                             java.lang.Integer defaultValue)
Returns value of given Platform SDK Core Customization option.

Parameters:
option - customization option.
branch - option branch name or null for default.
defaultValue - default value to be used if option is not defined.
Returns:
Option value or given default.

getBoolOption

public static java.lang.Boolean getBoolOption(PsdkCustomization.PsdkOption option,
                                              java.lang.Boolean defaultValue)
Returns value of given Platform SDK Core Customization option.

Parameters:
option - customization option.
defaultValue - default value to be used if option is not defined.
Returns:
Option value or given default.

getBoolOption

public static java.lang.Boolean getBoolOption(PsdkCustomization.PsdkOption option,
                                              java.lang.String branch,
                                              java.lang.Boolean defaultValue)
Returns value of given Platform SDK Core Customization option.

Parameters:
option - customization option.
branch - option branch name or null for default.
defaultValue - default value to be used if option is not defined.
Returns:
Option value or given default.

setOption

public static void setOption(PsdkCustomization.PsdkOption option,
                             java.lang.String optionValue)
Sets Platform SDK Core Customization option value.

Note: It should be called before creation of or access to PSDK connections or other kind of PSDK components or their classes.

Parameters:
option - customization option.
optionValue - new value for the customization option or null to clear this option.

setOption

public static void setOption(PsdkCustomization.PsdkOption option,
                             java.lang.String branch,
                             java.lang.String optionValue)
Sets Platform SDK Core Customization option value.

Note: It should be called before creation of or access to PSDK connections or other kind of PSDK components or their classes.

Parameters:
option - customization option.
branch - option branch name or null for default.
optionValue - new value for the customization option or null to clear this option.

toStringDump

public static java.lang.String toStringDump()
Generates string representation of the customization options for logging purposes.

Returns:
String with initialized customization options and their values.

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.