Predefined business classes
Shows class diagrams of the predefined business classes and describes their attributes and how to extend them.
Presents the relationship between the predefined business classes.
Describes the attributes of the IltObject class and its subclasses.
Shows how to define a new computed attribute.
Shows the two ways to dynamically extend a predefined business class.
Overview of the predefined business classes
Predefined business objects include telecommunication network managed objects such as:
Inheritance tree of predefined business classes 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.
IltObject inheritance path
The following figure shows the inheritance tree of predefined business classes.
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,
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.
Structural data remains constant while the application is running. It includes:
Characteristics of the element (for example, its name, Toronto-C10).
The key properties of the element that have an impact on its own representation, regardless of its states or alarms. The network element function and family (such as, ATM, OC192) are examples of structural data that can be displayed permanently.
State and alarm data describes the most recently known or inferred state of the managed object. A state can have several different aspects that depend on the type of network management used. For example, in the OSI state system, there are three categories of states: operational states, usage states, and administrative states. On top of these values, a set of statuses can further qualify the managed object. In other standards, such as Bellcore, all states are either primary or secondary states.
For an introduction to state and alarm visuals, refer to
States.
Attributes of predefined business objects
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.
Name:
nameValue class:
StringAttribute:
IltObject.NameAttributeGraphic 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.
Name:
graphicRepresentationValue class:
ilog.tgo.model.attribute.IltGraphicRepresentationAttributeTypeAttribute:
IltObject.GraphicRepresentationAttributeObject State defines the state of the business object. See
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.
Name:
objectStateValue class:
ilog.tgo.model.IltObjectStateAttribute:
IltObject.ObjectStateAttributePosition 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.
Name:
positionValue class:
ilog.cpl.graphic.IlpPositionAttribute:
IltObject.PositionAttributeNew 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.
Name:
newAlarmCountValue class:
ilog.tgo.model.IltAlarmCountAttributeTypeAttribute:
IltObject.NewAlarmCountAttributeNew 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.
Name:
newAlarmCountNumberValue class:
java.lang.IntegerAttribute:
IltObject.NewAlarmCountNumberAttributeAlarm Count indicates the number of outstanding raw alarms or traps of the business object. Outstanding refers to both acknowledged 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.
Name:
alarmCountValue class:
ilog.tgo.model.IltAlarmCountAttributeTypeAttribute:
IltObject.AlarmCountAttributeAlarm Count Number indicates the number of outstanding raw alarms or traps of the business object. Outstanding refers to both acknowledged 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.
Name:
alarmCountNumberValue class:
java.lang.IntegerAttribute:
IltObject.AlarmCountNumberAttributeNew 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.
Name:
newAlarmHighestSeverityValue class:
ilog.tgo.model.IltAlarmSeverityAttribute:
IltObject.NewAlarmHighestSeverityAttributeAlarm Highest Severity indicates the highest severity of the outstanding raw alarms or traps raised on the business object. Outstanding refers to both acknowledged 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.
Name:
alarmHighestSeverityValue class:
ilog.tgo.model.IltAlarmSeverityAttribute:
IltObject.AlarmHighestSeverityAttributeAck 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.
Name:
ackAlarmHighestSeverityValue class:
ilog.tgo.model.IltAlarmSeverityAttribute:
IltObject.AckAlarmHighestSeverityAttributeNew 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.
Name:
newImpactAlarmCountValue class:
ilog.tgo.model.IltAlarmCountAttributeTypeAttribute:
IltObject.NewImpactAlarmCountAttributeNew 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.
Name:
newImpactAlarmCountNumberValue class:
java.lang.IntegerAttribute:
IltObject.NewImpactAlarmCountNumberAttributeImpact Alarm Count indicates the number of outstanding impact alarms of the business object. Outstanding refers to both acknowledged 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.
Name:
impactAlarmCountValue class:
ilog.tgo.model.IltAlarmCountAttributeTypeAttribute:
IltObject.ImpactAlarmCountAttributeImpact Alarm Count Number indicates the number of outstanding impact alarms of the business object. Outstanding refers to both acknowledged 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.
Name:
impactAlarmCountNumberValue class:
java.lang.IntegerAttribute:
IltObject.ImpactAlarmCountNumberAttributeNew 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.
Name:
newImpactAlarmHighestSeverityValue class:
ilog.tgo.model.IltAlarmSeverityAttribute:
IltObject.NewImpactAlarmHighestSeverityAttributeImpact Alarm Highest Severity indicates the highest severity of the outstanding impact alarms raised on the business object. Outstanding refers to both acknowledged 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.
Name:
impactAlarmHighestSeverityValue class:
ilog.tgo.model.IltAlarmSeverityAttribute:
IltObject.ImpactAlarmHighestSeverityAttributeAck 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.
Name:
ackImpactAlarmHighestSeverityValue class:
ilog.tgo.model.IltAlarmSeverityAttribute:
IltObject.AckImpactAlarmHighestSeverityAttributePrimary 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.
Name:
primaryStateValue class:
StringAttribute:
IltObject.PrimaryStateAttributeSecondary 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.
Name:
secondaryStatesValue class:
StringAttribute:
IltObject.SecondaryStatesAttributeTiny Type indicates the way the object will be displayed in the tiny representation. By default, this attribute does not appear in the table.
Name:
tinyTypeValue class:
ilog.tgo.model.IltObject.TinyTypeAttribute:
IltObject.TinyTypeAttributeComputed attributes based on the object state
The
IlpDefaultClass 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.
How to define a new computed attribute
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());
}
};
Extending predefined business classes
To extend a predefined business class dynamically, you can:
Create a new instance of
IlpDefaultClass directly or create it from an XML description of the class.
Create a new Java™ class and its associated
IlpClass.
Creating a subclass of a predefined business class dynamically
The following example demonstrates how to create a subclass of a predefined business class in XML.
How to create a subclass of a predefined business object 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.
Deriving instances from the dynamic and the Java class hierarchies
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:
How to extend predefined business object classes for use with the Java API
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:
object identifier: a unique object identifier used by the new instance
boolean
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
Creating a Java subclass of a predefined business class is similar to what is described in
Adding predefined business objects with the following differences:
Methods
getIdentifier,
getIlpClass,
getAttributeValue and
setAttributeValue should not be overridden.
You must implement the following constructors:
public MyClass (Object identifier) {
super(identifier);
}
and
public MyClass (IlpClass ilpclass, Object identifier) {
super(ilpclass, identifier);
}
You must call the superclass in the constructor.
You must create a static instance of
IltObjectInfo that will store the business class information so that it is recognized as an
JViews TGO business class.
You must implement the method
GetIlpClass. This method allows your new business class to be automatically recognized by the Class Manager service.
Your new accessor methods (for example,
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.
How to create a new business class from a predefined business class
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 © 2018, Rogue Wave Software, Inc. All Rights Reserved.