com.apelon.dts.client.events
Class TermEvent
java.lang.Object
java.util.EventObject
com.apelon.dts.client.events.DataChangeEvent
com.apelon.dts.client.events.TermEvent
- All Implemented Interfaces:
- Serializable
public class TermEvent
- extends DataChangeEvent
An event which indicates that a term action occurred.
A term action is considered to occur in either of the following situation:
- add/modify/delete a Term
- add/modify/delete a Term Association
- add/modify/delete a Term Property
- Since:
- DTS 3.4
- Version:
- DTS 3.4
- Author:
- Apelon Inc.
- See Also:
- Serialized Form
TermEvent
public TermEvent(Object source,
Term term,
int eventType,
TermAttributeChange attributeChange)
- Constructs a TermEvent object. Initializes the term attribute change.
- Parameters:
source
- Should be an object that is a valid source of Term events.term
- The term which has changed. In the case of modifiy, this should be the term after change.eventType
- If adding a new term, the eventType should be DataChangeEvent.EVENT_TYPE_NEW
If modifying a term, the eventType should be DataChangeEvent.EVENT_TYPE_MODIFY
If deleting a term, the eventType should be DataChangeEvent.EVENT_TYPE_DELETE
attributeChange
- If the term is modified, attributeChange contains the attributes changes information;
If the term is added or is deleted, attributeChange should be null.- See Also:
TermListener
,
DTSEventMulticaster
,
TermAttributeChange
,
DataChangeEvent
getAttributeChange
public TermAttributeChange getAttributeChange()
- Get the Term Attribute Change when a term is modified.
- Returns:
- TermAttributeChange It contains the term attribute changes information
when a term is updated.
getTerm
public Term getTerm()
- Get the term which has changed. This Term may only contains basic term information
like name, id, and namespaceid. To get more term information you have to set
corresponding TermAttributeSetDescriptor and send a query request to server to get them.
- Returns:
- Term If a term is added, return the term which is added;
If a term is updated, return the term after updating;
If a term is deleted, return the term which is deleted.
isTermAffected
public boolean isTermAffected(Term term)
- A method to check if a term is affected by this term action.
- Parameters:
term
- the term to be checked.
- Returns:
- boolean true - if the term is affected by this term action.
false - if the term is not affected by this term action.
Copyright © 2011. All Rights Reserved.