com.apelon.dts.client.events
Class KBTypeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.apelon.dts.client.events.DataChangeEvent
          extended by com.apelon.dts.client.events.KBTypeEvent
All Implemented Interfaces:
Serializable

public class KBTypeEvent
extends DataChangeEvent

Defines the kb type event. This event will be fired when either of the following situation occurs - add/modify/delete an Authority, add/modify/ delete an Association Type, add/modify/delete a Property Type, or add/ modify/delete a Qualifier Type. There are four constructors for the four KBType.

Since:
DTS 3.4
Version:
DTS 3.4
Author:
Apelon Inc.
See Also:
Serialized Form

Field Summary
static int ASSOCIATION
          Association Type Event ID = 2001
static int AUTHORITY
          Authority Type Event ID = 2000
static int PROPERTY
          Property Type Event ID = 2002
static int QUALIFIER
          Qualifier Type Event ID = 2003
static int ROLE
          Role Type Event ID = 2004
 
Fields inherited from class com.apelon.dts.client.events.DataChangeEvent
EVENT_TYPE_DELETE, EVENT_TYPE_FIRST, EVENT_TYPE_LAST, EVENT_TYPE_MODIFY, EVENT_TYPE_NEW, INVALID_TYPE_EVENT
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
KBTypeEvent(Object source, AssociationType oldAssocType, AssociationType newAssocType)
          Constructs a KBTypeEvent object.
KBTypeEvent(Object source, Authority oldAuthority, Authority newAuthority)
          Constructs a KBTypeEvent object.
KBTypeEvent(Object source, DTSPropertyType oldPropType, DTSPropertyType newPropType)
          Constructs a KBTypeEvent object.
KBTypeEvent(Object source, DTSRoleType oldRoleType, DTSRoleType newRoleType)
          Constructs a KBTypeEvent for DTSRoleType.
KBTypeEvent(Object source, QualifierType oldQualType, QualifierType newQualType)
          Constructs a KBTypeEvent object.
 
Method Summary
 int getKBType()
          Get KB Type.
 Object getNewKBTypeObject()
          Get the new KBType object.
 Object getOldKBTypeObject()
          Get the old KBType object.
 
Methods inherited from class com.apelon.dts.client.events.DataChangeEvent
getChangedData, getEventType, getNewData, getOldData
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTHORITY

public static final int AUTHORITY
Authority Type Event ID = 2000

See Also:
ASSOCIATION, PROPERTY, QUALIFIER, Constant Field Values

ASSOCIATION

public static final int ASSOCIATION
Association Type Event ID = 2001

See Also:
AUTHORITY, PROPERTY, QUALIFIER, Constant Field Values

PROPERTY

public static final int PROPERTY
Property Type Event ID = 2002

See Also:
AUTHORITY, ASSOCIATION, QUALIFIER, Constant Field Values

QUALIFIER

public static final int QUALIFIER
Qualifier Type Event ID = 2003

See Also:
AUTHORITY, ASSOCIATION, PROPERTY, Constant Field Values

ROLE

public static final int ROLE
Role Type Event ID = 2004

Since:
DTS 3.4.2
See Also:
getKBType(), Constant Field Values
Constructor Detail

KBTypeEvent

public KBTypeEvent(Object source,
                   Authority oldAuthority,
                   Authority newAuthority)
Constructs a KBTypeEvent object. Initializes the kb type to AUTHORITY.

Parameters:
source - Should be an object that is a valid source of KBType events.
oldAuthority - If a new Authority is added, the oldAuthority should null; If a Authority is modified, the oldAuthority should be the Authority before being updated; If a Authority is deleted, the oldAuthority should be the Authority that is deleted.
newAuthority - If a new Authority is added, the newAuthority should be the Authority that is added; If a Authority is modified, the newAuthority should be the Authority after being updated; If a Authority is deleted, the newAuthority should be null.
See Also:
DataChangeEvent

KBTypeEvent

public KBTypeEvent(Object source,
                   AssociationType oldAssocType,
                   AssociationType newAssocType)
Constructs a KBTypeEvent object. Initializes the kb type to ASSOCIATION.

Parameters:
source - Should be an object that is a valid source of KBType events.
oldAssocType - If a new AssociationType is added, the oldAssocType should null; If a AssociationType is modified, the oldAssocType should be the AssociationType before being updated; If a AssociationType is deleted, the oldAssocType should be the AssociationType that is deleted.
newAssocType - If a new AssociationType is added, the newAssocType should be the AssociationType that is added; If a AssociationType is modified, the newAssocType should be the AssociationType after being updated; If a AssociationType is deleted, the newAssocType should be null.
See Also:
DataChangeEvent

KBTypeEvent

public KBTypeEvent(Object source,
                   DTSPropertyType oldPropType,
                   DTSPropertyType newPropType)
Constructs a KBTypeEvent object. Initializes the kb type to PROPERTY.

Parameters:
source - Should be an object that is a valid source of KBType events.
oldPropType - If a new DTSPropertyType is added, the oldPropType should null; If a DTSPropertyType is modified, the oldPropType should be the DTSPropertyType before being updated; If a DTSPropertyType is deleted, the oldPropType should be the DTSPropertyType that is deleted.
newPropType - If a new DTSPropertyType is added, the newPropType should be the DTSPropertyType that is added; If a DTSPropertyType is modified, the newPropType should be the DTSPropertyType after being updated; If a DTSPropertyType is deleted, the newPropType should be null.
See Also:
DataChangeEvent

KBTypeEvent

public KBTypeEvent(Object source,
                   QualifierType oldQualType,
                   QualifierType newQualType)
Constructs a KBTypeEvent object. Initializes the kb type to ASSOCIATION.

Parameters:
source - Should be an object that is a valid source of KBType events.
oldQualType - If a new QualifierType is added, the oldQualType should null; If a QualifierType is modified, the oldQualType should be the QualifierType before being updated; If a QualifierType is deleted, the oldQualType should be the QualifierType that is deleted.
newQualType - If a new QualifierType is added, the newQualType should be the QualifierType that is added; If a QualifierType is modified, the newQualType should be the QualifierType after being updated; If a QualifierType is deleted, the newQualType should be null.
See Also:
DataChangeEvent

KBTypeEvent

public KBTypeEvent(Object source,
                   DTSRoleType oldRoleType,
                   DTSRoleType newRoleType)
Constructs a KBTypeEvent for DTSRoleType. Initializes the kb type to ROLE.

Parameters:
source - Should be an object that is a valid source of KBType events.
oldRoleType - If a new DTSRoleType is added, the oldRoleType should null; If a DTSRoleType is modified, the oldRoleType should be the DTSRoleType before being updated; If a DTSRoleType is deleted, the oldRoleType should be the DTSRoleType that is deleted.
newRoleType - If a new DTSRoleType is added, the newRoleType should be the DTSRoleType that is added; If a DTSRoleType is modified, the newRoleType should be the DTSRoleType after being updated; If a DTSRoleType is deleted, the newRoleType should be null.
Since:
DTS 3.4.2
See Also:
DataChangeEvent
Method Detail

getKBType

public int getKBType()
Get KB Type. The KB Type can be AUTHORITY, ASSOCIATION, PROPERTY, QUALIFIER or ROLE

Returns:
int If an Authority is edited, return AUTHORITY; If an Association Type is edited, return ASSOCIATION; If a Property Type is edited, return PROPERTY; If a Qualifier Type is edited, return QUALIFIER. If a Role Type is edited, return ROLE.

getNewKBTypeObject

public Object getNewKBTypeObject()
Get the new KBType object. According to the getKBType() the KBType object can be casted to Authority, AssociationType, DTSPropertyType, or QualifierType.

Returns:
Object If a KBType object is added, return the new KBType object that is added; If a KBType object is updated, return the new KBType object after updating; If a KBType object is deleted, return null.

getOldKBTypeObject

public Object getOldKBTypeObject()
Get the old KBType object. According to the getKBType() the KBType object can be casted to Authority, AssociationType, DTSPropertyType, or QualifierType.

Returns:
Object If a KBType object is added, return null; If a KBType object is updated, return the old KBType object after updating; If a KBType object is deleted, return the KBType object that is deleted.


Copyright © 2011. All Rights Reserved.