| Business Objects and Data Sources > Introducing Business Objects and Data Sources > Predefined Business Classes |
Predefined Business Classes |
INDEX
PREVIOUS
NEXT
|
Predefined business objects include telecommunication network managed objects such as:
IltNetworkElement
IltLink
IltLinkBundle, IltLinkSet
IltGroup
IltShelf, IltCard, IltPort and IltLed
IltBTS and IltBTSAntenna
IltOffPageConnector
Figure 1.28 provides the complete hierarchy for business object classes. For a detailed description of each of these object classes, see the subsequent sections in this documentation.
Predefined business object classes are subclasses of IltObject, which is itself a subclass of IlpDefaultObject. For each class deriving from IltObject, there is an instance of IltObjectInfo that is a subclass of IlpDefaultClass.
The following diagram shows the relationship between these classes.
For details on IlpDefaultObject and IlpDefaultClass, see Business Model API.
The following figure shows the inheritance tree of predefined business classes.
All predefined business object classes can be retrieved using the method GetIlpClass, which is declared in each one of these classes; for example, IltNetworkElement.GetIlpClass. Every business class contains specific attributes that you can set using their particular API, for example, IltNetworkElement.setFamily(value), or the generic IlpObject API, for example, setAttributeValue(IltNetworkElement.FamilyAttribute,value). See Business Model API.
Instances of predefined business classes hold two types of data: structural data and states and alarms.
By default, the IltObject class defines several attributes that are present in all its subclasses. These attributes are the following:
Name indicates the name of the business object and is represented graphically by a label.
Graphic Representation is a computed attribute used to make it possible to display the entire business object in one column of a table. This attribute is computed from all the other attributes attached to the object and cannot be set to a value directly.
graphicRepresentation
ilog.tgo.model.attribute.IltGraphicRepresentationAttributeType
IltObject.GraphicRepresentationAttribute
Object State defines the state of the business object. See section States for a complete description of object states. By default, the object state is not displayed in the table. This attribute is used as a base for all computed attributes that display the state of the telecom object. For more information, see Computed Attributes Based on the Object State.
objectState
ilog.tgo.model.IltObjectState
IltObject.ObjectStateAttribute
Position indicates the geometric position or the shape of the business object in the network and equipment components. See Positioning for more information. By default, the object position is not displayed in the table.
New Alarm Count indicates the number of new raw alarms or traps of the business object. This string is displayed in the alarm balloon of the object. This count is computed from the object state and should not be set to a value directly.
newAlarmCount
ilog.tgo.model.IltAlarmCountAttributeType
IltObject.NewAlarmCountAttribute
New Alarm Count Number indicates the number of new raw alarms or traps of the business object. This alarm count is computed from the object state and should not be set to a value directly.
newAlarmCountNumber
java.lang.Integer
IltObject.NewAlarmCountNumberAttribute
Alarm Count indicates the number of outstanding raw alarms or traps of the business object. Outstanding refers to both ackowledged and new alarms or traps. This string displays on the object base. The count is computed from the object state and should not be set to a value directly.
alarmCount
ilog.tgo.model.IltAlarmCountAttributeType
IltObject.AlarmCountAttribute
Alarm Count Number indicates the number of outstanding raw alarms or traps of the business object. Outstanding refers to both ackowledged and new alarms or traps. This integer represents the number of outstanding raw alarms or traps. The count is computed from the object state and should not be set to a value directly.
alarmCountNumber
java.lang.Integer
IltObject.AlarmCountNumberAttribute
New Alarm Highest Severity indicates the highest severity of the new raw alarms or traps raised on the business object. This attribute determines the color of the alarm balloon. It is computed from the object state and should not be set to a value directly.
newAlarmHighestSeverity
ilog.tgo.model.IltAlarmSeverity
IltObject.NewAlarmHighestSeverityAttribute
Alarm Highest Severity indicates the highest severity of the outstanding raw alarms or traps raised on the business object. Outstanding refers to both ackowledged and new alarms or traps. This attribute determines the color of the alarm border. It is computed from the object state and should not be set to a value directly.
alarmHighestSeverity
ilog.tgo.model.IltAlarmSeverity
IltObject.AlarmHighestSeverityAttribute
Ack Alarm Highest Severity indicates the highest severity of the acknowledged raw alarms or traps of the business object. By default, this attribute is not displayed in the table. It is computed from the object state and should not be set to a value directly.
ackAlarmHighestSeverity
ilog.tgo.model.IltAlarmSeverity
IltObject.AckAlarmHighestSeverityAttribute
New Impact Alarm Count indicates the number of new impact alarms of the business object. This string is displayed in the alarm balloon of the object. The new impact alarm count is computed from the object state and should not be set to a value directly.
newImpactAlarmCount
ilog.tgo.model.IltAlarmCountAttributeType
IltObject.NewImpactAlarmCountAttribute
New Impact Alarm Count Number indicates the number of new impact alarms of the business object. This integer represents the number of new impact alarms. The new impact alarm count is computed from the object state and should not be set to a value directly.
newImpactAlarmCountNumber
java.lang.Integer
IltObject.NewImpactAlarmCountNumberAttribute
Impact Alarm Count indicates the number of outstanding impact alarms of the business object. Outstanding refers to both ackowledged and new alarms. This string displays on the object base. The impact alarm count is computed from the object state and should not be set to a value directly.
impactAlarmCount
ilog.tgo.model.IltAlarmCountAttributeType
IltObject.ImpactAlarmCountAttribute
Impact Alarm Count Number indicates the number of outstanding impact alarms of the business object. Outstanding refers to both ackowledged and new alarms. This integer represents the number of outstanding impact alarms. The impact alarm count is computed from the object state and should not be set to a value directly.
impactAlarmCountNumber
java.lang.Integer
IltObject.ImpactAlarmCountNumberAttribute
New Impact Alarm Highest Severity indicates the highest severity of the new impact alarms raised on the business object. This attribute determines the color of the alarm balloon. It is computed from the object state and should not be set to a value directly.
newImpactAlarmHighestSeverity
ilog.tgo.model.IltAlarmSeverity
IltObject.NewImpactAlarmHighestSeverityAttribute
Impact Alarm Highest Severity indicates the highest severity of the outstanding impact alarms raised on the business object. Outstanding refers to both ackowledged and new alarms. This attribute determines the color of the alarm border. It is computed from the object state and should not be set to a value directly.
impactAlarmHighestSeverity
ilog.tgo.model.IltAlarmSeverity
IltObject.ImpactAlarmHighestSeverityAttribute
Ack Impact Alarm Highest Severity indicates the highest severity of the acknowledged impact alarms of the business object. By default, this attribute is not displayed in the table. It is computed from the object state and should not be set to a value directly.
ackImpactAlarmHighestSeverity
ilog.tgo.model.IltAlarmSeverity
IltObject.AckImpactAlarmHighestSeverityAttribute
Primary State indicates the primary state of the business object. This attribute determines the base style. It is computed from the object state and should not be set to a value directly.
Secondary States indicates the secondary states or statuses of the business object. This attribute determines the small icons displayed at the top left of the base. It is computed from the object state and should not be set to a value directly.
Tiny Type indicates the way the object will be displayed in the tiny representation. By default, this attribute does not appear in the table.
The IltObject business class includes a number of predefined attributes that make it possible to represent the state of the object in the table component. However, you might want to display other information that is contained in the object state in a table column. To do so, you can define a new computed attribute based on the object state.
The following example shows how to define a new computed attribute that returns the number of major new alarms.
IlpAttribute NewMajorAlarmAttribute =
new IltComputedAttribute("newMajorAlarmAttribute",
String.class) {
public Object getValue (IlpAttributeValueHolder h) {
IltObjectState oState =
(IltObjectState)h.getAttributeValue(IltObject.ObjectStateAttribute);
IltAlarm.State alarmState = oState == null
? null : (IltAlarm.State)oState.getAlarmState();
if ( alarmState == null ) return null;
return alarmState.getNewAlarmCount(IltAlarm.Severity.Major);
}
public boolean isDependentOn (IlpAttribute a) {
return a.getName().equals(ObjectStateAttribute.getName());
}
};
To extend a predefined business class dynamically, you can:
IlpDefaultClass directly or create it from an XML description of the class.
IlpClass.
The following example demonstrates how to create a subclass of a predefined business class in XML.
<class>
<name>Element</name>
<superClass>ilog.tgo.model.IltNetworkElement</superClass>
<attribute>
<name>throughput</name>
<javaClass>java.lang.Integer</javaClass>
</attribute>
</class>
The syntax is the same as for creating a regular class with XML. See Defining the Business Model in XML.
The newly created class extends the IltNetworkElement predefined business class and has an additional attribute (throughput).
This class is an instance of both the IlpClass Element and the Java class ilog.tgo.model.IltNetworkElement.
As shown in the following figure, an instance of Element derives from two class hierarchies: the dynamic class hierarchy and the Java class hierarchy.
If you create an instance of the IlpClass Element with XML or with the API, the created object will be an instance of the Java class IltNetworkElement.
For example:
IlpClass elementClass =
classManager.getClass("Element");
IlpObject element = elementClass.newInstance("element 1", true);
The method newInstance is available in business classes to create new instances. This method has two arguments:
initializeAttributeValues: a flag which indicates whether the new instance has its default attribute values initialized. It is important to note that predefined business objects and their subclasses always have their default attributes initialized when a new instance is created. In this case, the second parameter is ignored.
Creating a Java subclass of a predefined business class is similar to what is described in Adding Predefined Business Objects with the following differences:
getIdentifier, getIlpClass, getAttributeValue and setAttributeValue should not be overridden.
IltObjectInfo that will store the business class information so that it is recognized as an JViews TGO business class.
GetIlpClass. This method allows your new business class to be automatically recognized by the Class Manager service.
getThroughput/setThroughput) should call getAttributeValue and setAttributeValue with the appropriate parameters. These methods already provide the mechanism to store the objects internally as well as notification support.
The following example illustrate the implementation of a new business object class that inherits from IltNetworkElement. This new business class contains a new attribute, called THROUGHPUT.
public class CustomNetworkElement extends IltNetworkElement {
// Create the business class
static IltObjectInfo metainfo = new IltObjectInfo(CustomNetworkElement.class,
"CustomNetworkElement");
// Create the business attribute and register in the class
public static final IlpAttribute THROUGHPUT = new IltAttribute("throughput",
Integer.class,
metainfo,
new
Integer(0));
// Register the new attribute in this business class
static {
metainfo.addAttribute(THROUGHPUT);
}
// Implement method GetIlpClass so that this class is automatically
// recognized as a business class by the Class Manager service
public static IltObjectInfo GetIlpClass() {
return metainfo;
}
// Implement the class constructor
public CustomNetworkElement (Object identifier) {
super(identifier);
}
// Implement the class constructor
public CustomNetworkElement (IlpClass clazz, Object identifier) {
super(clazz, identifier);
}
public int getThroughput() {
Object v = getAttributeValue(THROUGHPUT);
if (v == ilog.cpl.model.IlpAttributeValueHolder.VALUE_NOT_SET)
return 0;
else
return ((Integer)v).intValue();
}
public void setThroughput(int throughput) {
setAttributeValue(THROUGHPUT, new Integer(throughput));
}
}
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |