javax.cim

Class CIMParameter<E>

public class CIMParameter<E> extends CIMTypedElement implements CIMQualifiedElementInterface

This class represents a CIM Parameter. A CIM Parameter is a schema item, thus it can only be part of a CIMMethod definition for a CIMClass. A parameter can be used to define an input, output or input/output parameter. A CIMParameter consists of a name, data type and qualifiers. CIMParameters do not have values - so you can not set a default value. CIM Parameters are defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004). To invoke a method, you would use CIMArgument.

Parameters: Type parameter.

See Also: CIMMethod

Constructor Summary
CIMParameter(String pName, CIMDataType pType, CIMQualifier<?>[] pQualifiers)
Constructs a CIMParameter object using the specified name, data type and qualifiers.
Method Summary
CIMParameter<E>filter(boolean pIncludeQualifiers, boolean pLocalOnly)
Returns a CIMParameter filtered as specified.
CIMQualifier<?>getQualifier(int pIndex)
Get a qualifier by index.
CIMQualifier<?>getQualifier(String pName)
Gets a qualifier by name.
intgetQualifierCount()
Get the number of qualifiers defined for this CIM Parameter.
CIMQualifier<?>[]getQualifiers()
Returns the list of qualifiers for this class.
ObjectgetQualifierValue(String pName)
Gets a qualifier value by name.
booleanhasQualifier(String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM element.
booleanhasQualifierValue(String pName, Object pValue)
Checks whether the specified qualifier is one of the qualifiers defined for this parameter with the specified value.

Constructor Detail

CIMParameter

public CIMParameter(String pName, CIMDataType pType, CIMQualifier<?>[] pQualifiers)
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: pName Name of this parameter. pType Data type of this parameter. pQualifiers Qualifiers for this parameter.

Method Detail

filter

public CIMParameter<E> filter(boolean pIncludeQualifiers, boolean pLocalOnly)
Returns a CIMParameter filtered as specified.

Parameters: pIncludeQualifiers If true all qualifiers are returned; otherwise no qualifiers. pLocalOnly If true only the qualifiers that were not propagated will be included.

Returns: A filtered CIMParameter.

getQualifier

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

Parameters: pIndex The index of the qualifier.

Returns: The Qualifier at index pIndex.

Throws: ArrayIndexOutOfBoundsException

getQualifier

public CIMQualifier<?> getQualifier(String pName)
Gets a qualifier by name.

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 Parameter.

Returns: The number of qualifiers.

getQualifiers

public CIMQualifier<?>[] getQualifiers()
Returns the list of qualifiers for this class.

Returns: Qualifiers for this class.

getQualifierValue

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

Parameters: pName 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(String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM element.

Parameters: pName The name of the qualifier.

Returns: true if the qualifier exists in this CIM parameter, otherwise false.

hasQualifierValue

public boolean hasQualifierValue(String pName, Object pValue)
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.

Parameters: pName The name of the qualifier. pValue The value to be tested.

Returns: true if the qualifier exists in this property, otherwise false.

Copyright © 2005, 2010 IBM Corporation. All Rights Reserved.