|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface exposes the Alert Service Topic features. A Topic is created to group a bunch of Alerts or Sub Topics.
A typical usage example:
MetaLocator m = MetaLocator.getInstance(); ModelFactory f = m.getModelFactory(); ModelServices s = m.getModelServices(); Topic A = null; Topic B = null; // create a couple of topics and add one as a subtopic of another try { A = f.createTopic("topicA", null); A.save(); B = f.createTopic("topicB", null); B.save(); A.addSubTopic(B); } catch (Exception e) { L.e("createTopic failed :"+e.toString()); } .... To see if topic has services Use : AlertService[] as = A.getServices();
Field Summary |
Type | Field |
---|---|
static int |
TYPEID
The type id of the Topic class |
static java.lang.String |
TYPENAME
The Typename for the topic classs |
Method Summary |
Type | Method |
---|---|
void |
addService(AlertService alert)
Add an alert service to this topic |
void |
addSubTopic(Topic subTopic)
Adds the subtopic to this topic |
Group[] |
getGroups()
Returns the groups which can access this Topic |
java.lang.String |
getName()
Returns the name of the topic |
Topic |
getParent()
Returns the parent topic object |
AlertService[] |
getServices()
Returns the alert services based on the topic |
Topic[] |
getSubTopics()
Returns all the subtopics under this topic |
boolean |
isValid()
Returns true if the topic is valid |
boolean |
isVisible()
Returns if the service is visible currently its always visible. |
void |
removeService(AlertService alert)
Removes the alert service from this topic |
void |
removeSubTopic(Topic subTopic)
Removes the subtopic from this current topic |
void |
save()
Commits the changes to the database Any create/update operation must be committed with the save. |
void |
setName(java.lang.String name)
Sets the name of the topic |
void |
setValidity(boolean valid)
Sets the Topic to valid or invalid |
void |
setVisible(boolean visibility)
Sets if the topic is visible currently its always visible |
Methods inherited from interface oracle.panama.model.ModelObject |
delete, getCreatedDate, getId, getLastModifiedDate, getTypeId, getTypeName,
isSystem, setSystem, undoAll |
Methods inherited from interface oracle.panama.model.XMLObject |
setXML, toXML |
Field Detail |
public static final java.lang.String TYPENAME
public static final int TYPEID
Method Detail |
public void setName(java.lang.String name)
setName
in interface ModelObject
name
- The name of the topicpublic boolean isVisible()
public void setVisible(boolean visibility)
visibility
- boolean set to true if visiblepublic boolean isValid()
public void setValidity(boolean valid)
valid
- boolean set to true if validpublic java.lang.String getName()
getName
in interface ModelObject
public AlertService[] getServices()
public void addService(AlertService alert) throws PanamaException
alert
- the alert service objectPanamaException
- when adding service failedpublic void removeService(AlertService alert) throws PanamaException
AlertService
- The alert service objectPanamaException
- Exception thrown when the remove service failedpublic void addSubTopic(Topic subTopic) throws PanamaException
subTopic
- The subtopic objectPanamaException
- thrown when the subtopic addition failedpublic void removeSubTopic(Topic subTopic) throws PanamaException
subTopic
- The subtopic object to removePanamaException
- Exception thrown when the sub topic couldn't be removedpublic Topic getParent()
public void save() throws PanamaException
PanamaException
- when commit failedpublic Topic[] getSubTopics()
public Group[] getGroups()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |