Package net.aifusion.metamodel
Class CimInstance
java.lang.Object
net.aifusion.metamodel.QualifiedElement
net.aifusion.metamodel.NamedElement
net.aifusion.metamodel.StructureValue
net.aifusion.metamodel.CimInstance
- All Implemented Interfaces:
CimEventGenerator
Class to represent a CIM Instance. CIM Instances are active elements that can have properties and operations, and provide
the ability to model control plane elements. Instances can be bound to java classes that can perform the corresponding actions
within the managed environment. Instances can be created from corresponding class templates.
- Author:
- Sharad Singhal
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbind()
Bind this Cim Instance to a java object, and return the corresponding java objectstatic CimInstance
Create a new CimInstanceboolean
Get the underlying Cimclass used to create this instanceGet the CIM type of this elementGet the case-normalized (lower case) name for this elementGet the names of all methods defined in this instancegetMethodParameters
(String methodName) Get the parameters associated with a declared method in this instancegetMethodReturnType
(String methodName) Get the return type for a declared method in this instancegetName()
Get the name of this elementint
hashCode()
invokeMethod
(String methodName, List<CimParameter> cimParameters) Invoke a method on this instancetoMOF()
Return the MOF representation of this elementtoString()
Methods inherited from class net.aifusion.metamodel.StructureValue
createJavaObject, createStructureValue, getAlias, getCreationStruct, getPropertyNames, getPropertyType, getPropertyValue, hasAlias, hasNonNullProperty, hasProperty, isInstanceOf, isInstanceOf, setPropertyValue
Methods inherited from class net.aifusion.metamodel.NamedElement
addListener, getAllQualifiers, getFullName, getNameSpacePath, getObjectPath, getQualifierValue, getSuperType, hasListener, hasQualifier, isAbstract, isSubTypeOf, removeListener
Methods inherited from class net.aifusion.metamodel.QualifiedElement
getQualifiers
-
Method Details
-
createInstance
public static CimInstance createInstance(CimClass creationClass, Map<String, DataValue> propertyValues, String alias) Create a new CimInstance- Parameters:
creationClass
- - class to be used as a template for this instancepropertyValues
- - properties for this instancealias
- - alias, if any for this instance- Returns:
- - newly constructed CIMInstance
-
bind
Bind this Cim Instance to a java object, and return the corresponding java object- Overrides:
bind
in classStructureValue
- Returns:
- Java Object bound to this CIM Instance
-
getCreationClass
Get the underlying Cimclass used to create this instance- Returns:
- - underlying CimClass
-
getMethodNames
Get the names of all methods defined in this instance- Returns:
- - names of all methods in this instance
-
getMethodReturnType
Get the return type for a declared method in this instance- Parameters:
methodName
- - name of the desired method- Returns:
- return type for the method. Null if no such method defined
-
getMethodParameters
Get the parameters associated with a declared method in this instance- Parameters:
methodName
- - name of the desired method- Returns:
- - paramters associated with the method. Null if no such method defined
-
invokeMethod
Invoke a method on this instance- Parameters:
methodName
- - name of the method to invokecimParameters
- - parameters required by the method- Returns:
- - returned value from the method
-
equals
- Overrides:
equals
in classStructureValue
-
getName
Get the name of this element- Returns:
- - name of this element
- See Also:
-
getLowerCaseName
Get the case-normalized (lower case) name for this element- Returns:
- - name of this element normalized to lower case
- See Also:
-
getElementType
Get the CIM type of this element- Returns:
- - CIMType for this element
- See Also:
-
toMOF
Return the MOF representation of this element- Returns:
- - String containing MOF representation of this element
-
toString
-
hashCode
public int hashCode()
-