Interface ScopedClassModelService

All Known Subinterfaces:
ClassModelService

public interface ScopedClassModelService
Interface for querying the UCMDB scoped class model.

Example of using this interface:

 ClassModelService classModelService = ucmdbService.getClassModelService();
 ScopedClassModelService scopedClassModelService = classModelService.getScopedService(Scope.BDM);
 for (ClassDefinition def : scopedClassModelService.getAllClasses()) {
     System.out.println("Type " + def.getName() + " (" + def.getDisplayName() + ") is derived from type " + def.getParentClassName());
     System.out.println("Has " + def.getChildClasses().size() + " derived types");
     System.out.println("Defined and inherited attributes:");
     for (Attribute attr : def.getAllAttributes().values()) {
         System.out.println("Attribute " + attr.getName() + " of type " + attr.getType());
     }
 }
 
Since:
9.0
  • Method Details

    • getClassDefinition

      ClassDefinition getClassDefinition(String typeName) throws ClassDoesNotExistException
      Returns the object representing the specified type.
      Parameters:
      typeName -
      Returns:
      the object representing the type with the specified name
      Throws:
      ClassDoesNotExistException - if there is no type with the specified name in the UCMDB
    • forceRefresh

      void forceRefresh()
      force refresh class model cache
    • hasClassDefinition

      boolean hasClassDefinition(String typeName)
      Returns true if the type with the specified name is defined in the UCMDB.
      Parameters:
      typeName -
      Returns:
      true if the type with the specified name is defined in the UCMDB
    • getAllClasses

      Collection<ClassDefinition> getAllClasses()
      Returns an Iterable collection of classes defined in the UCMDB class model.
      Returns:
      an Iterable collection of classes defined in the UCMDB class model.
    • isRelationValid

      boolean isRelationValid(String relationTypeName, String end1TypeName, String end2TypeName) throws ClassDoesNotExistException
      Checks whether a relation of the specified type is permitted between the specified end types. The relation and end types are checked against the valid relations definition in the class model. The end types can be exact types or super-types.
      Parameters:
      relationTypeName - a relation type name
      end1TypeName - a CI type name
      end2TypeName - a CI type name
      Returns:
      true if the relation is allowed.
      Throws:
      ClassDoesNotExistException
    • getValidRelationTypes

      Iterable<ClassDefinition> getValidRelationTypes(String end1TypeName, String end2TypeName) throws ClassDoesNotExistException
      Returns an Iterable collection of all types of relations that can be created between CIs of the specified types.
      Parameters:
      end1TypeName - a CI type name
      end2TypeName - a CI type name
      Throws:
      ClassDoesNotExistException
    • getValidRelations

      Collection<ValidRelation> getValidRelations()
      Returns an Iterable collection of valid relations defined in the UCMDB class model.
      Returns:
      an Iterable collection of valid relations defined in the UCMDB class model.
    • getCalculatedLinks

      Collection<CalculatedLink> getCalculatedLinks()
      Returns a collection of all calculated link triplets defined in UCMDB class model
      Returns:
    • getCalculatedLink

      CalculatedLink getCalculatedLink(String type)
    • getCalculatedLinkTripletsForType

      Collection<CalculatedLinkTriplet> getCalculatedLinkTripletsForType(String typeName)