Platform SDK Java 8.5 API Reference

com.genesyslab.platform.applicationblocks.com.objects
Class CfgTimeZone

java.lang.Object
  extended by com.genesyslab.platform.applicationblocks.com.CfgBase
      extended by com.genesyslab.platform.applicationblocks.com.CfgObject
          extended by com.genesyslab.platform.applicationblocks.com.objects.CfgTimeZone
All Implemented Interfaces:
ICfgBase, ICfgObject, java.lang.Cloneable

public class CfgTimeZone
extends CfgObject

Time Zones are predefined objects that provide CTI applications with information about world time zones. Each object describes one time zone.

time_t = int or long i.e. 32 bit value at least

The time_t type logically divided into several sections, following bit-mask should be used to get an info:

Time_t Bit Mask Description
Bits Description Range Comments
0-3 Month, 0-12; DST is not Observed=0
Jan=1
Dec=12
####### Week 0-5, 7 DST is not observed or week is not specified= 0
Last week of month = 7
Note:
The day of last week of month=week will be set to 7, if the day of week does not occur on last week
The day of last week of month=week will be set to 1, if the day of week does not occur on first week
####### Day 0-31, 63 DST is not observed = 0
Last day of month = 63
If week is specified (week!=0) the range should be 1-7
Sun=1
Sat=7
13-18 Start_time, Stop_Time 0-47 in 30 minute units 1:00 am = 2
19-24 Year (shift from 2000) 0, 1-38, 39-63 Only if Time Zone is defined for specific Year. 2001 = 1
DST is not observed or year is not specified=0
Values within range 39-63 are not valid
25-30 reserved reserved reserved
####### A flag to recognize custom/6.0 time zone reserved Has to be used to distinguish custom time zones and time zones created before release 6.1:
New Style = 1
Old Style or custom time zone = 0

Definition of Time Zones for Calculation Schema
name Description offset IsDST Month Week Date Time_start Month Week Date Time_stop Year
GMT Greenwich Mean Time 0 TRUE 3 7 1 4 10 7 1 6 0
ECT European Central Time 2 TRUE 3 7 1 4 10 7 1 6 0
EET Eastern European Time 4 TRUE 3 7 1 6 10 7 1 8 0
ART (Arabic) Egypt Standard Time 4 TRUE 4 7 6 0 9 7 6 0 0
EAT Eastern African Time 6 FALSE 0 0 0 0 0 0 0 0 0
MET Middle East Time 7 TRUE 3 0 20 0 9 0 22 0 0
NET Near East Time 8 FALSE 0 0 0 0 0 0 0 0 0
PLT Pakistan Lahore Time 10 FALSE 0 0 0 0 0 0 0 0 0
IST India Standard Time 11 FALSE 0 0 0 0 0 0 0 0 0
BST Bangladesh Standard Time 12 TRUE 3 7 1 0 10 7 1 0 0
VST Vietnam Standard Time 14 FALSE 0 0 0 0 0 0 0 0 0
CTT China Taiwan Time 16 FALSE 0 0 0 0 0 0 0 0 0
JST Japan Standard Time 18 FALSE 0 0 0 0 0 0 0 0 0
KST Korea Standard Time 18 FALSE 0 0 0 0 0 0 0 0 0
ACT Australia Central Time 19 FALSE 0 0 0 0 0 0 0 0 0
AET Australia Eastern Time 20 TRUE 8 7 7 4 3 7 1 4 0
SST Solomon Standard Time 22 FALSE 0 0 0 0 0 0 0 0 0
NST New Zealand Standard Time 24 TRUE 10 1 1 4 3 3 1 6 0
MIT Midway Islands Time -22 FALSE 0 0 0 0 0 0 0 0 0
HST Hawaii Standard Time -20 FALSE 0 0 0 0 0 0 0 0 0
AST Alaska Standard Time -18 TRUE 4 1 1 4 10 7 1 4 0
PST Pacific Standard Time -16 TRUE 4 1 1 4 10 7 1 4 0
PNT Phoenix Standard Time -14 FALSE 0 0 0 0 0 0 0 0 0
MST Mountain Standard Time -14 TRUE 4 1 1 4 10 7 1 4 0
CST Central Standard Time -12 TRUE 4 1 1 4 10 7 1 4 0
EST Eastern Standard Time -10 TRUE 4 1 1 4 10 7 1 4 0
IET Indiana Eastern Standard -10 FALSE 0 0 0 0 0 0 0 0 0
PRT Puerto Rico and US Virgin Islands Time -8 FALSE 0 0 0 0 0 0 0 0 0
CNT Canada Newfoundland Time -7 TRUE 4 1 1 4 10 7 1 4 0
AGT Argentina Standard Time -6 FALSE 0 0 0 0 0 0 0 0 0
BET Brazil Eastern Time -6 TRUE 10 2 1 0 2 7 1 0 0
CAT Central African Time -2 FALSE 0 0 0 0 0 0 0 0 0
AtlST Atlantic Standard Time -8 TRUE 4 1 1 4 10 7 1 4 0

The DSTStartTime / DSTStopTime can be calculated using function ConfCalculateTimeZone().
Note:
All calculated values of DSTStartTime / DSTStopTime represent a calendar value, not a local time at any particular timezone. In order to use this calculated value one can call gmtime() function in C/C++ runtime library to get the value parsed into tm structure. Note, however, that resulted value is not a GMT time of transition, but again a calendar value, applicable for the configured timezone. In this case tm structure and gmtime() function have being reused only to parse configuration, without inheriting their meaning from runtime library. You should be careful when applying any translations, because functions of runtime library that accept a time_t value usually perform additional interpretation of that value as either local or universal time (while actual value in this case is, in fact, just a calendar item, not a time). For instance, you cannot use mktime() or even _mkgmtime() - windows to convert this value back into time_t, because first assume you have a local time that need to be recalculated to GMT by changing timezone, while second give you much closer result (because it will not count for timezone) but might add/subtract one hour from result, due to its DST-awareness. You should not attempt to convert it back and you should use content of tm structure as a configuration information (including day, month, year fields) and treat this information as applicable for a timezone for that this information is supplied.


See also:

CfgDeltaTimeZone


Field Summary
static CfgObjectType OBJECT_TYPE
           
 
Constructor Summary
CfgTimeZone(IConfService confService)
          This constructor is intended for creation of detached objects.
CfgTimeZone(IConfService confService, ConfObject objData, boolean isSaved, java.lang.Object[] additionalParameters)
          This constructor is intended for creation of objects from configuration protocol messages.
CfgTimeZone(IConfService confService, org.w3c.dom.Node xmlData, java.lang.Object[] additionalParameters)
          This constructor is intended for creation of objects from configuration protocol messages.
 
Method Summary
 java.lang.Integer getDBID()
          An identifier of this object in the Configuration Database.
 java.lang.String getDescription()
          A pointer to time zone description.
 java.lang.Integer getDSTOffset()
          The value of DST offset.
 java.util.Calendar getDSTStartDate()
          DST start date.
 java.util.Calendar getDSTStopDate()
          DST stop date.
 CfgFlag getIsDSTObserved()
           
 java.lang.String getName()
          A pointer to time zone name.
 java.lang.String getNameMSExplorer()
          A pointer to the time zone name used by Microsoft browser.
 java.lang.String getNameNetscape()
          A pointer to the time zone name used by Netscape Navigator browser.
 java.lang.Integer getOffset()
          A time zone offset.
 CfgObjectState getState()
          Current object state.
 CfgTenant getTenant()
          A unique identifier of the CfgTenant to which this time zone is allocated.
 java.lang.Integer getTenantDBID()
          Retrieves the dbid of the object that is being linked to by the Tenant property.
 KeyValueCollection getUserProperties()
          A pointer to the list of user-defined properties.Parameter userProperties has the following structure: Each key-value pair of the primary list (TKVList *userProperties) uses the key for the name of a user-defined section, and the value for a secondary list, that also has the TKVList structure and specifies the properties defined within that section.
 void save()
          Synchronizes changes in the class with Configuration Server.
 void setDBID(java.lang.Integer value)
          An identifier of this object in the Configuration Database.
 void setDescription(java.lang.String value)
          A pointer to time zone description.
 void setDSTOffset(java.lang.Integer value)
          The value of DST offset.
 void setDSTStartDate(java.util.Calendar value)
          DST start date.
 void setDSTStopDate(java.util.Calendar value)
          DST stop date.
 void setIsDSTObserved(CfgFlag value)
           
 void setName(java.lang.String value)
          A pointer to time zone name.
 void setNameMSExplorer(java.lang.String value)
          A pointer to the time zone name used by Microsoft browser.
 void setNameNetscape(java.lang.String value)
          A pointer to the time zone name used by Netscape Navigator browser.
 void setOffset(java.lang.Integer value)
          A time zone offset.
 void setState(CfgObjectState value)
          Current object state.
 void setTenant(CfgTenant value)
          A unique identifier of the CfgTenant to which this time zone is allocated.
 void setTenantDBID(int dbid)
          A unique identifier of the CfgTenant to which this time zone is allocated.
 void setUserProperties(KeyValueCollection value)
          A pointer to the list of user-defined properties.Parameter userProperties has the following structure: Each key-value pair of the primary list (TKVList *userProperties) uses the key for the name of a user-defined section, and the value for a secondary list, that also has the TKVList structure and specifies the properties defined within that section.
 
Methods inherited from class com.genesyslab.platform.applicationblocks.com.CfgObject
clone, delete, doSetFolderId, ensureDataBackup, getFolderId, getObjectDbid, getObjectPath, getObjectType, refresh, reloadObjectWithNewData, reloadObjectWithNewData, removeAccount, resetDataBackup, retrieveAccountPermissions, retrieveACL, retrievePermissions, setAccountPermissions, setAccountPermissions, setFolderId, update, updateACL
 
Methods inherited from class com.genesyslab.platform.applicationblocks.com.CfgBase
equals, flushChildrenContent, getConfigurationService, getData, getEndpoint, getLinkListCollection, getLinkValue, getLogger, getMetaData, getParent, getProperty, getProperty, getProperty, getRawObjectData, hashCode, initStruct, isSaved, lockObject, resolveLink, setProperty, toString, toStringProperties, toXml, updateChildrenSavedState
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.applicationblocks.com.ICfgBase
getEndpoint, getProperty, getRawObjectData, setProperty, toXml
 

Field Detail

OBJECT_TYPE

public static final CfgObjectType OBJECT_TYPE
Constructor Detail

CfgTimeZone

public CfgTimeZone(IConfService confService,
                   ConfObject objData,
                   boolean isSaved,
                   java.lang.Object[] additionalParameters)
This constructor is intended for creation of objects from configuration protocol messages. It is internally used by COM AB for objects deserialization.

Parameters:
confService - configuration service instance
objData - configuration protocol object data structure
isSaved - indicator of the object saved state
additionalParameters - additional parameters from configuration protocol message

CfgTimeZone

public CfgTimeZone(IConfService confService,
                   org.w3c.dom.Node xmlData,
                   java.lang.Object[] additionalParameters)
This constructor is intended for creation of objects from configuration protocol messages. It is internally used by COM AB for objects deserialization.

Parameters:
confService - configuration service instance
xmlData - XML object containing object data
additionalParameters - additional parameters from configuration protocol message

CfgTimeZone

public CfgTimeZone(IConfService confService)
This constructor is intended for creation of detached objects.

Parameters:
confService - configuration service instance
Method Detail

save

public void save()
          throws ConfigException
Synchronizes changes in the class with Configuration Server.

Specified by:
save in interface ICfgObject
Overrides:
save in class CfgObject
Throws:
ConfigException - in case of protocol level exception, data transformation, or server side constraints

getDBID

public final java.lang.Integer getDBID()
An identifier of this object in the Configuration Database. Generated by Configuration Server and is unique within an object type. Identifiers of deleted objects are not used again. Read-only.

Returns:
property value or null

setDBID

public final void setDBID(java.lang.Integer value)
An identifier of this object in the Configuration Database. Generated by Configuration Server and is unique within an object type. Identifiers of deleted objects are not used again. Read-only.

Parameters:
value - new property value
See Also:
getDBID()

getTenant

public final CfgTenant getTenant()
A unique identifier of the CfgTenant to which this time zone is allocated. Mandatory. Once specified, cannot be changed.

Returns:
instance of referred object or null

setTenant

public final void setTenant(CfgTenant value)
A unique identifier of the CfgTenant to which this time zone is allocated. Mandatory. Once specified, cannot be changed.

Parameters:
value - new property value
See Also:
getTenant()

setTenantDBID

public final void setTenantDBID(int dbid)
A unique identifier of the CfgTenant to which this time zone is allocated. Mandatory. Once specified, cannot be changed.

Parameters:
dbid - DBID identifier of referred object
See Also:
getTenant()

getTenantDBID

public final java.lang.Integer getTenantDBID()
Retrieves the dbid of the object that is being linked to by the Tenant property.

Returns:
DBID identifier of referred object or null

getName

public final java.lang.String getName()
A pointer to time zone name. Mandatory. Must be unique within tenant environment.

Returns:
property value or null

setName

public final void setName(java.lang.String value)
A pointer to time zone name. Mandatory. Must be unique within tenant environment.

Parameters:
value - new property value
See Also:
getName()

getDescription

public final java.lang.String getDescription()
A pointer to time zone description.

Returns:
property value or null

setDescription

public final void setDescription(java.lang.String value)
A pointer to time zone description.

Parameters:
value - new property value
See Also:
getDescription()

getOffset

public final java.lang.Integer getOffset()
A time zone offset. Any integer value from -24 to 24. Must be considered as value -12 to 12 with 0.5 hour step.

Returns:
property value or null

setOffset

public final void setOffset(java.lang.Integer value)
A time zone offset. Any integer value from -24 to 24. Must be considered as value -12 to 12 with 0.5 hour step.

Parameters:
value - new property value
See Also:
getOffset()

getIsDSTObserved

public final CfgFlag getIsDSTObserved()

setIsDSTObserved

public final void setIsDSTObserved(CfgFlag value)

getDSTStartDate

public final java.util.Calendar getDSTStartDate()
DST start date. The value is: measured in seconds if 6.0 definition schema is uses. Refer to time_t from time.h of ANSI C library. Year value range 0-2038; performed based on calculation schema. (See comments.)

Returns:
property value or null

setDSTStartDate

public final void setDSTStartDate(java.util.Calendar value)
DST start date. The value is: measured in seconds if 6.0 definition schema is uses. Refer to time_t from time.h of ANSI C library. Year value range 0-2038; performed based on calculation schema. (See comments.)

Parameters:
value - new property value
See Also:
getDSTStartDate()

getDSTStopDate

public final java.util.Calendar getDSTStopDate()
DST stop date. The value is: measured in seconds if 6.0 definition schema is uses. Refer to time_t from time.h of ANSI C library. Year value range 0-2038; performed based on calculation schema. (See comments.)

Returns:
property value or null

setDSTStopDate

public final void setDSTStopDate(java.util.Calendar value)
DST stop date. The value is: measured in seconds if 6.0 definition schema is uses. Refer to time_t from time.h of ANSI C library. Year value range 0-2038; performed based on calculation schema. (See comments.)

Parameters:
value - new property value
See Also:
getDSTStopDate()

getNameNetscape

public final java.lang.String getNameNetscape()
A pointer to the time zone name used by Netscape Navigator browser. Mandatory.

Returns:
property value or null

setNameNetscape

public final void setNameNetscape(java.lang.String value)
A pointer to the time zone name used by Netscape Navigator browser. Mandatory.

Parameters:
value - new property value
See Also:
getNameNetscape()

getNameMSExplorer

public final java.lang.String getNameMSExplorer()
A pointer to the time zone name used by Microsoft browser. Mandatory

Returns:
property value or null

setNameMSExplorer

public final void setNameMSExplorer(java.lang.String value)
A pointer to the time zone name used by Microsoft browser. Mandatory

Parameters:
value - new property value
See Also:
getNameMSExplorer()

getState

public final CfgObjectState getState()
Current object state. Mandatory. Refer to CfgObjectState

Returns:
property value or null

setState

public final void setState(CfgObjectState value)
Current object state. Mandatory. Refer to CfgObjectState

Parameters:
value - new property value
See Also:
getState()

getUserProperties

public final KeyValueCollection getUserProperties()
A pointer to the list of user-defined properties.Parameter userProperties has the following structure: Each key-value pair of the primary list (TKVList *userProperties) uses the key for the name of a user-defined section, and the value for a secondary list, that also has the TKVList structure and specifies the properties defined within that section.

Returns:
property value or null

setUserProperties

public final void setUserProperties(KeyValueCollection value)
A pointer to the list of user-defined properties.Parameter userProperties has the following structure: Each key-value pair of the primary list (TKVList *userProperties) uses the key for the name of a user-defined section, and the value for a secondary list, that also has the TKVList structure and specifies the properties defined within that section.

Parameters:
value - new property value
See Also:
getUserProperties()

getDSTOffset

public final java.lang.Integer getDSTOffset()
The value of DST offset. Default is 60 (minutes).

Returns:
property value or null

setDSTOffset

public final void setDSTOffset(java.lang.Integer value)
The value of DST offset. Default is 60 (minutes).

Parameters:
value - new property value
See Also:
getDSTOffset()

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.