version 1.21, 2005/02/05 22:59:23
|
version 1.22, 2005/02/14 17:14:54
|
|
|
// check name | // check name |
if(!referenceQualifier.getName().equal(cimQualifier.getName())) | if(!referenceQualifier.getName().equal(cimQualifier.getName())) |
{ | { |
String message = cimQualifier.getName().getString() + String(" invalid qualifier name."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_QUALIFIER_NAME", |
|
"\"$0\"", |
|
cimQualifier.getName().getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
// check type | // check type |
if(referenceQualifier.getType() != cimQualifier.getType()) | if(referenceQualifier.getType() != cimQualifier.getType()) |
{ | { |
String message = cimQualifier.getName().getString() + String(" incorrect qualifier type."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_QUALIFIER_TYPE", |
|
"\"$0\"", |
|
cimQualifier.getName().getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
// check name | // check name |
if(!referenceProperty.getName().equal(cimProperty.getName())) | if(!referenceProperty.getName().equal(cimProperty.getName())) |
{ | { |
String message = cimProperty.getName().getString() + String(" invalid property name."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_PROPERTY_NAME", |
|
"\"$0\"", |
|
cimProperty.getName().getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
// check type | // check type |
if(referenceProperty.getType() != cimProperty.getType()) | if(referenceProperty.getType() != cimProperty.getType()) |
{ | { |
String message = cimProperty.getName().getString() + String(" incorrect property type."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_PROPERTY_NAME", |
|
"\"$0\"", |
|
cimProperty.getName().getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
throw CIMException(CIM_ERR_FAILED, "uninitialized object path"); | throw CIMException(CIM_ERR_FAILED, "uninitialized object path"); |
} | } |
| |
|
/* |
|
// ATTN: The following code is currently redundant because the CIMName object validates |
|
// legal names when it is constructed. It is included here for completeness. |
// check class name | // check class name |
|
if(!CIMName(cimObjectPath.getClassName()).legal()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_CLASS_NAME", |
|
"\"$0\"", |
|
cimObjectPath.getClassName().getString()); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
*/ |
|
|
|
// check class type |
if(!_cimClass.getClassName().equal(cimObjectPath.getClassName())) | if(!_cimClass.getClassName().equal(cimObjectPath.getClassName())) |
{ | { |
String message = cimObjectPath.getClassName().getString() + String(" invalid class name."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_CLASS_TYPE", |
|
"\"$0\"", |
|
cimObjectPath.getClassName().getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
throw CIMException(CIM_ERR_FAILED, "uninitialized object path"); | throw CIMException(CIM_ERR_FAILED, "uninitialized object path"); |
} | } |
| |
|
/* |
|
// ATTN: The following code is currently redundant because the CIMName object validates |
|
// legal names when it is constructed. It is included here for completeness. |
// check class name | // check class name |
|
if(!CIMName(cimObjectPath.getClassName()).legal()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_CLASS_NAME", |
|
"\"$0\"", |
|
cimObjectPath.getClassName().getString()); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
*/ |
|
|
|
// check class type |
if(!_cimClass.getClassName().equal(cimObjectPath.getClassName())) | if(!_cimClass.getClassName().equal(cimObjectPath.getClassName())) |
{ | { |
String message = cimObjectPath.getClassName().getString() + String(" invalid class name."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_CLASS_TYPE", |
|
"\"$0\"", |
|
cimObjectPath.getClassName().getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
// no default and not overriden by specified object path | // no default and not overriden by specified object path |
if(value == "<null>") | if(value == "<null>") |
{ | { |
String message = name.getString() + String(" key property missing from object path."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.MISSING_KEY", |
|
"\"$0\"", |
|
name.getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
break; | break; |
case CIMTYPE_OBJECT: | case CIMTYPE_OBJECT: |
default: | default: |
throw CIMException(CIM_ERR_FAILED, "invalid key type."); |
{ |
|
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.MISSING_KEY", |
|
"\"$0\"", |
|
name.getString()); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
break; | break; |
} | } |
| |
|
|
throw CIMException(CIM_ERR_FAILED, "unintialized instance object."); | throw CIMException(CIM_ERR_FAILED, "unintialized instance object."); |
} | } |
| |
|
/* |
|
// ATTN: The following code is currently redundant because the CIMName object validates |
|
// legal names when it is constructed. It is included here for completeness. |
// check class name | // check class name |
|
if(!CIMName(cimInstance.getClassName()).legal()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_CLASS_NAME", |
|
"\"$0\"", |
|
cimInstance.getClassName().getString()); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
*/ |
|
|
|
// check class type |
if(!_cimClass.getClassName().equal(cimInstance.getClassName())) | if(!_cimClass.getClassName().equal(cimInstance.getClassName())) |
{ | { |
String message = cimInstance.getClassName().getString() + String(" invalid class name."); |
MessageLoaderParms message( |
|
"Common.ObjectNormalizer.INVALID_CLASS_TYPE", |
|
"\"$0\"", |
|
cimInstance.getClassName().getString()); |
| |
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |