Business Objects and Data Sources > The Business Model > Business Class Manager API

Once business object classes are created, it is important to make them available to the whole application and allow them to be used by all the components. This is the role of the class manager defined by the interface IlpClassManager. This interface provides methods to:

For example, the following function writes the entire content of a class manager. It iterates over all the classes stored in a class manager and then over their attributes, displaying the class they belong to along with their default value, if any.

How to Write the Content of a Class Manager
public void displayModel(IlpClassManager classManager) {
    for (Iterator i = classManager.getClasses().iterator();
         i.hasNext();) {
      IlpClass ilpClass = (IlpClass)i.next();
      System.out.println(ilpClass.getName());
      if (ilpClass.getSuperClass() != null) {
        System.out.println("\t"+ilpClass.getSuperClass().getName());
      }
      for (Iterator j = ilpClass.getAttributes().iterator();
           j.hasNext();) {
        IlpAttribute attr = (IlpAttribute)j.next();
        System.out.println("\t" +attr.getName() +": "
                           +attr.getValueClass().toString());
        if (attr.getDefaultValue() != 
            IlpAttributeValueHolder.VALUE_NOT_SET) {
          System.out.print("\t\tdefault: " +attr.getDefaultValue());
          if (attr.getDefaultValue() != null) {
            System.out.print(" " +attr.getDefaultValue().getClass());
          }
          System.out.println();
        }
      }
    }
  }

JViews TGO provides a default implementation of the class manager, which is defined by the class IlpDefaultClassManager. This implementation has the following additional functionality:

JViews TGO also provides a class manager implementation to automatically handle the predefined business classes. This implementation is defined by class IltDefaultClassManager.

For easier access to the business classes information in your application, the class manager has been defined as one of the application context services. Refer to Class Manager in the Application Context and Deployment Descriptor documentation for information on how to customize the class manager information through the application context and the deployment descriptor.