skip to main content
TGO > Programmers documentation > Business objects and data sources > Introducing business objects and data sources > Predefined business classes
 
Predefined business classes
Shows class diagrams of the predefined business classes and describes their attributes and how to extend them.
*Overview of the predefined business classes
*Presents the relationship between the predefined business classes.
*Attributes of predefined business objects
*Describes the attributes of the IltObject class and its subclasses.
*Computed attributes based on the object state
*Shows how to define a new computed attribute.
*Extending predefined business classes
*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:
*Network elements of the class IltNetworkElement
*Links of the class IltLink
*Groups of links of the classes IltLinkBundle, IltLinkSet
*Groups of the class IltGroup
*Shelves, cards, ports, and LEDs of the classes IltShelf, IltCard, IltPort and IltLed
*Dedicated wireless representations of BTS and antennas of the classes IltBTS and IltBTSAntenna
*Off-page connectors of the class IltOffPageConnector
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
For details on IlpDefaultObject and IlpDefaultClass, see Business model API.
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: name
*Value class: String
*Attribute: IltObject.NameAttribute
*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.
*Name: graphicRepresentation
*Value class: ilog.tgo.model.attribute.IltGraphicRepresentationAttributeType
*Attribute: IltObject.GraphicRepresentationAttribute
*Object 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: objectState
*Value class: ilog.tgo.model.IltObjectState
*Attribute: 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.
*Name: position
*Value class: ilog.cpl.graphic.IlpPosition
*Attribute: IltObject.PositionAttribute
*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.
*Name: newAlarmCount
*Value class: ilog.tgo.model.IltAlarmCountAttributeType
*Attribute: 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.
*Name: newAlarmCountNumber
*Value class: java.lang.Integer
*Attribute: IltObject.NewAlarmCountNumberAttribute
*Alarm 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: alarmCount
*Value class: ilog.tgo.model.IltAlarmCountAttributeType
*Attribute: IltObject.AlarmCountAttribute
*Alarm 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: alarmCountNumber
*Value class: java.lang.Integer
*Attribute: 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.
*Name: newAlarmHighestSeverity
*Value class: ilog.tgo.model.IltAlarmSeverity
*Attribute: 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 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: alarmHighestSeverity
*Value class: ilog.tgo.model.IltAlarmSeverity
*Attribute: 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.
*Name: ackAlarmHighestSeverity
*Value class: ilog.tgo.model.IltAlarmSeverity
*Attribute: 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.
*Name: newImpactAlarmCount
*Value class: ilog.tgo.model.IltAlarmCountAttributeType
*Attribute: 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.
*Name: newImpactAlarmCountNumber
*Value class: java.lang.Integer
*Attribute: IltObject.NewImpactAlarmCountNumberAttribute
*Impact 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: impactAlarmCount
*Value class: ilog.tgo.model.IltAlarmCountAttributeType
*Attribute: IltObject.ImpactAlarmCountAttribute
*Impact 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: impactAlarmCountNumber
*Value class: java.lang.Integer
*Attribute: 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.
*Name: newImpactAlarmHighestSeverity
*Value class: ilog.tgo.model.IltAlarmSeverity
*Attribute: IltObject.NewImpactAlarmHighestSeverityAttribute
*Impact 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: impactAlarmHighestSeverity
*Value class: ilog.tgo.model.IltAlarmSeverity
*Attribute: 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.
*Name: ackImpactAlarmHighestSeverity
*Value class: ilog.tgo.model.IltAlarmSeverity
*Attribute: 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.
*Name: primaryState
*Value class: String
*Attribute: IltObject.PrimaryStateAttribute
*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.
*Name: secondaryStates
*Value class: String
*Attribute: IltObject.SecondaryStatesAttribute
*Tiny Type indicates the way the object will be displayed in the tiny representation. By default, this attribute does not appear in the table.
*Name: tinyType
*Value class: ilog.tgo.model.IltObject.TinyType
*Attribute: IltObject.TinyTypeAttribute
Computed 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.