if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" Actuator::Modify instance :cop"+cop);
CIMInstance cimInstance= null;
try
{
cimInstance=handle.getInstance(cop, true, true, true, null);
}
catch(CIMException e)
{
logger.severe(Thread.currentThread().getName()+" "+
"instance does not belong to Anchor Class, might be of an extension of Anchor class, " +
"no action will be taken on it. "+e.getMessage());
throw new SPLException("instance does not belong to Anchor Class, might be of an " +
"extension of Anchor class, no action will be taken on it. "+e.getMessage());
}
if(cimInstance != null)
{
Vector modifiedProperties = new Vector();
Vector instanceProperties = cimInstance.getAllProperties();
Set propertyNames = properties.keySet();
Iterator propertyIterator = propertyNames.iterator();
while(propertyIterator.hasNext())
{
String keyName = (String)propertyIterator.next();
Object keyValue = properties.get(keyName);
Iterator instancePropertyIterator = instanceProperties.iterator();
while(instancePropertyIterator.hasNext())
{
CIMProperty cimprop=(CIMProperty)instancePropertyIterator.next();
String name=cimprop.getName();
int type=cimprop.getType().getType();
// boolean isArray=cimprop.isArray();
CIMValue instValue=cimprop.getValue();
if(cimprop.getName().equalsIgnoreCase(keyName))
{
Object cimKeyValue = keyValue;
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+
" Instance property:: Name,Type,Value,CIMKeyValue :"+name+" "+type+" "
+instValue+" "+ cimKeyValue.getClass());
CIMValue cimval = getCIMObjectOfGivenType(type,cimKeyValue);
cimprop.setValue(cimval);
handle.setProperty(cimInstance.getObjectPath(), keyName, cimval);
modifiedProperties.add(cimprop);
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" cimprop set to cimValue "+cimval.getValue());
}