public interface ClassModelService extends ScopedClassModelService
ClassModelService classModelService = ucmdbService.getClassModelService(); for (ClassDefinition def : classModelService.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()); } }
Modifier and Type | Method and Description |
---|---|
Map<String,URL> |
getAllClassesIcons(IconSize size)
Returns absolute URLs to all classes icons.
|
Map<String,String> |
getChangedAttributesNames(String fromVersion,
String toVersion)
Returns the changes in attribute names between versions.
|
Map<String,String> |
getChangedClassNames(String fromVersion,
String toVersion)
Returns all changes in class names between given versions.
|
URL |
getClassIconByName(String iconName,
IconSize size)
Returns absolute URL for icon with the given name and size.
|
EnumDefinitions |
getEnumDefinitions()
Returns the object containing enums defined in the UCMDB class model.
|
ClassModelFactory |
getFactory() |
ScopedClassModelService |
getScopedService(Scope scope)
Returns the interface for querying scoped UCMDB class model.
|
void |
registerChangesListener(ClassModelChangesListener listener)
Registers a client-side listener to be called on changes in the server's class model.
|
void |
unregisterChangesListener(ClassModelChangesListener listener)
Unregisters a previously registered listener.
|
getAllClasses, getCalculatedLink, getCalculatedLinks, getCalculatedLinkTripletsForType, getClassDefinition, getValidRelations, getValidRelationTypes, hasClassDefinition, isRelationValid
ClassModelFactory getFactory()
void registerChangesListener(ClassModelChangesListener listener)
registerChangesListener
causes a thread to be launched at the client side .
This thread polls the server for changes. The delay between a change and the listener
invocation can be up to two minutes.listener
- void unregisterChangesListener(ClassModelChangesListener listener)
unregisterChangesListener
invocation, the internal list of registered listeners is empty, the polling thread is stopped.
(The polling thread is started by the first
registerChangesListener invocation.)listener
- ScopedClassModelService getScopedService(Scope scope)
scope
- EnumDefinitions getEnumDefinitions()
Map<String,URL> getAllClassesIcons(IconSize size)
size
- URL getClassIconByName(String iconName, IconSize size)
iconName
- size
- Map<String,String> getChangedClassNames(String fromVersion, String toVersion)
fromVersion
- currently should be "0"toVersion
- currently should be "1"Map<String,String> getChangedAttributesNames(String fromVersion, String toVersion)
fromVersion
- always pass "0"toVersion
- always pass "1" Documentation Feedback
Copyright 2011 - 2018 Micro Focus or one of its affiliates.