javax.cim
Class CIMParameter

java.lang.Object
  extended byjavax.cim.CIMElement
      extended byjavax.cim.CIMTypedElement
          extended byjavax.cim.CIMParameter
All Implemented Interfaces:
CIMQualifiedElementInterface, java.io.Serializable

public class CIMParameter
extends javax.cim.CIMTypedElement
implements CIMQualifiedElementInterface, java.io.Serializable

This class wraps a CIM paramter that is used to define an input, output or input/output parameter to a CIM method. A CIM Parameter is defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004). A CIMParameter object consists of a name, data type and a list of qualifiers. NOTE: Parameters do not have values - so you can not set a default value. CIM Parameters are defined in the CIM Infrastructure Specification. The specification is available from the DMTF (Distributed Management Task Force) at http://dmtf.org/.

Since:
JSR48 1.0.0
See Also:
CIMMethod, Serialized Form

Constructor Summary
CIMParameter(java.lang.String name, CIMDataType type, CIMQualifier[] qualifiers)
          Constructs a CIMParameter object using the specified name, data type and qualifiers.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this object against the specified object.
 CIMDataType getDataType()
          Returns the CIMDataType for this CIM Element.
 CIMQualifier getQualifier(int pIndex)
          Get a qualifier by index.
 CIMQualifier getQualifier(java.lang.String pName)
          Gets a qualifier by name.
 int getQualifierCount()
          Get the number of qualifiers defined for this CIM Element.
 CIMQualifier[] getQualifiers()
          Returns the list of qualifiers for this class
 java.lang.Object getQualifierValue(java.lang.String name)
          Gets a qualifier value by name.
 boolean hasQualifier(java.lang.String pName)
          Checks whether the specified qualifier is one of the qualifiers in this CIM element.
 boolean hasQualifierValue(java.lang.String name, java.lang.Object value)
          Checks whether the specified qualifier is one of the qualifiers defined for this parameter with the specified value.
 java.lang.String toString()
          Returns a String representation of the CIMParameter.
 
Methods inherited from class javax.cim.CIMElement
getName, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CIMParameter

public CIMParameter(java.lang.String name,
                    CIMDataType type,
                    CIMQualifier[] qualifiers)
Constructs a CIMParameter object using the specified name, data type and qualifiers. Takes a string for the name of an existing CIM parameter and creates a new instance of a CIM parameter, using the name and identifier of the existing CIM parameter.

Parameters:
name - name of this parameter
type - data type of this parameter
qualifiers - qualifiers for this parameter
Method Detail

getQualifier

public CIMQualifier getQualifier(int pIndex)
Get a qualifier by index.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pIndex - The index of the qualifier
Returns:
CIMQualifier The Qualifier at index pIndex

getQualifier

public CIMQualifier getQualifier(java.lang.String pName)
Gets a qualifier by name.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - The name of the qualifier to get.
Returns:
Null if the qualifier does not exist, otherwise returns the reference to the qualifier.

getQualifierCount

public int getQualifierCount()
Get the number of qualifiers defined for this CIM Element.

Specified by:
getQualifierCount in interface CIMQualifiedElementInterface
Returns:
int The number of qualifiers.

getQualifiers

public CIMQualifier[] getQualifiers()
Returns the list of qualifiers for this class

Specified by:
getQualifiers in interface CIMQualifiedElementInterface
Returns:
CIMQualifier[] qualifiers for this class

getQualifierValue

public java.lang.Object getQualifierValue(java.lang.String name)
Gets a qualifier value by name.

Specified by:
getQualifierValue in interface CIMQualifiedElementInterface
Parameters:
name - The name of the qualifier to get.
Returns:
Null if the qualifier does not exist or value is null, otherwise returns the reference to the qualifier.

hasQualifier

public boolean hasQualifier(java.lang.String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM element.

Specified by:
hasQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - the name of the qualifier
Returns:
true if the qualifier exists in this CIM element, otherwise false.

hasQualifierValue

public boolean hasQualifierValue(java.lang.String name,
                                 java.lang.Object value)
Checks whether the specified qualifier is one of the qualifiers defined for this parameter with the specified value. This method will return false if the qualifier is not applied or if the value does not match

Specified by:
hasQualifierValue in interface CIMQualifiedElementInterface
Parameters:
name - the name of the qualifier
value - the value to be tested
Returns:
True if the qualifier exists in this property, otherwise false.

toString

public java.lang.String toString()
Returns a String representation of the CIMParameter. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
toString in class CIMElement
Returns:
string representation of this parameter

equals

public boolean equals(java.lang.Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a CIMTypedElement that represents the same name and type as this object.

Overrides:
equals in class CIMElement
Parameters:
obj - - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

getDataType

public CIMDataType getDataType()
Returns the CIMDataType for this CIM Element.

Returns:
CIMDataType of this CIM element.


Java™ WBEM (JSR48) 1.0.0 API