Defines a Java object that represents a CIM Class. A CIM Class provides the
class definition for creating CIM Instances.
addMethod
public void addMethod(CIMMethod pMethod)
Add a CIMMethod to this class.
pMethod
- defines a CIMMethod to be added to the class. If the method
already exists, nothing happend.
clone
public Object clone()
filterProperties
public CIMClass filterProperties(String[] pPropertyList)
Creates a replica of this CIMClass only with the properties specified in
the propertyList argument.
pPropertyList
- An array with string of property names. (case sencitive names)
getAllMethods
public Vector getAllMethods()
Return all the methods for this class, including all the methods
inherited from superclasses.
- A Vector containin all CIMMethods from this class. For
performance reasons, the returned vector points to the internal
data structure that maintains the methods. Modifications on this
object may result in an inconsistent state of the CIMClass.
Applications MUST deside when this obect has to be cloned.
getMethod
public CIMMethod getMethod(String pName)
Returns a CIMMethod with the specified name. If a method with the
specified name (case sensitive) does not exists, then returns null. For
performance reasons, this method returns the internal data structure that
is used to by the CIMClass. Modifications on this object may result in
state of the CIMClass or CIMMethod. Applications MUST deside when this
object has to be cloned.
pName
- The method's name
- null if the speficied method is not found or does not exists.
getMethod
public CIMMethod getMethod(String pName,
String pOriginClass)
Returns a CIMMethod with the specified name for the given class origin.
If a method with the specified name (case sensitive) does not exists,
then returns null. The class origin may be "superclass.overridingmethod"
or "overridingmethod", or null. For performance reasons, this
method returns the internal data structure that is used to by the
CIMClass. Modifications on this object may result in state of the
CIMClass or CIMMethod. Applications MUST deside when this object has to
be cloned.
pName
- The method's namepOriginClass
- The class origin
- null if the speficied method is not found or does not exists.
getMethod
protected CIMMethod getMethod(CIMMethod pMethod)
Gets a method corresponding to the specified name
pMethod
- A CIMMethod with the name to look for
getMethods
public Vector getMethods()
Returns a vector containing all the CIMMethods defined by this CIMClass,
without including the methods inherited by any super classes. For
performance reasons, this method returns a vector that contains
CIMMethods which are internally used by the CIMClass. Modifications on
the CIMMethods objects may result in state of the CIMClass or CIMMethod.
Applications MUST deside when this object has to be cloned.
getObjectPath
public CIMObjectPath getObjectPath()
Returns the CIMObjectPath from this object. For performance reasons, this
method returns the internal structure used by the CIMClass. The
application is responsable to deside when it must may a copy of the
returned object to prevent inconsiste state.
- A CIMObjectPath pointing to the class.
getSuperClass
public String getSuperClass()
Returns the name of the super class. Return null if this class does not
has a super class.
- a string which defines the super class of this class.
hashCode
public int hashCode()
isAssociation
public boolean isAssociation()
Determines if this CIMClass contains the Association qualifier.
- true if this class contains the association qualifier,
otherwise false.
isKeyed
public boolean isKeyed()
Determines if this CIMClass contains any keyed CIMProperty.
- true if this CIMClass contains a keyed CIMProperty, otherwise
returns false.
localElements
public CIMClass localElements()
Creates a replica of this CIMClass which only contains the objects local
CIMProperties and CIMMethods. A local CIMProperty or CIMMethod are those
that the original CIMClass is this object.
main
public static void main(args[] )
newInstance
public CIMInstance newInstance()
Creates an CIMInstance object based on this CIMClass. This CIMInstance
may be used later to create a CIMInstance remotely at the CIMOM with the
CIMClient.createInstance() method.
numberOfProperties
public int numberOfProperties()
Returns the number of properties in this class.
numberOfQualifiers
public int numberOfQualifiers()
Returns the number of qualifiers in this class.
setIsAssociation
public void setIsAssociation(boolean pValue)
Adds or removes the Association qualifier from this CIMClass. Depending
on the case, this method will add if the specified parameter is true,
otherwise remove the association qualifier from this CIMClass.
setIsKeyed
public void setIsKeyed(boolean pValue)
this method may lead to confusion. Instead of this method
application are encourage to remove/add the Key qualifier
manually.
Specified when this CIM Class has key properties or not.
setMethods
public void setMethods(Vector pMethods)
Assigns the specified vector with CIMMethod to this CIMClass. If the
method argument is null, all the CIMMethods from this CIMClass will be
removed.
setName
public void setName(String pName)
Sets the name for this CIMClass.
- setName in interface CIMElement
setSuperClass
public void setSuperClass(String pClass)
Sets the super class for this class. If null is passed means that the
class does not have any super class.
toMOF
public String toMOF()
Returns the MOF representation of this object.
- A string containig the MOF representation
toString
public String toString()