{
getLog().debug("name="+mo.getName()+",description="+mo.getDescription()+",impact="+mo.getImpact());
operations.put(mo.getName(), mo);
}
ManagedOperation mgdop = operations.get("showHistory");
assertNotNull("HAPartition has showHistory", mgdop);
MetaValue result = mgdop.invoke();
assertNotNull(result);
mgdop = operations.get("showHistoryAsXML");
assertNotNull("HAPartition has showHistoryAsXML", mgdop);
result = mgdop.invoke();
assertNotNull(result);
mgdop = operations.get("getDRMServiceNames");
assertNotNull("HAPartition has getDRMServiceNames", mgdop);
result = mgdop.invoke();
assertTrue(result instanceof CollectionValue);
MetaValue[] elements = ((CollectionValue) result).getElements();
assertNotNull(elements);
boolean found = false;
for (MetaValue element : elements)
{
assertTrue(element instanceof SimpleValue);
if (HAJNDI.equals(((SimpleValue) element).getValue()))
{
found = true;
break;
}
}
assertTrue(found);
mgdop = operations.get("listDRMContent");
assertNotNull("HAPartition has listDRMContent", mgdop);
result = mgdop.invoke();
assertTrue(result instanceof SimpleValue);
Object val = ((SimpleValue) result).getValue();
assertTrue(val instanceof String);
assertTrue(((String) val).indexOf(HAJNDI) > -1);
mgdop = operations.get("listDRMContentAsXml");
assertNotNull("HAPartition has listDRMContentAsXml", mgdop);
result = mgdop.invoke();
assertTrue(result instanceof SimpleValue);
val = ((SimpleValue) result).getValue();
assertTrue(val instanceof String);
assertTrue(((String) val).indexOf(HAJNDI) > -1);
mgdop = operations.get("getDRMServiceViewId");
assertNotNull("HAPartition has getDRMServiceViewId", mgdop);
MetaValue hajndiparam = SimpleValueSupport.wrap(HAJNDI);
MetaValue[] hajndiparams = new MetaValue[]{hajndiparam};
result = mgdop.invoke(hajndiparams);
assertNotNull(result);
mgdop = operations.get("lookupDRMNodeNames");
assertNotNull("HAPartition has lookupDRMNodeNames", mgdop);
result = mgdop.invoke(hajndiparams);
assertTrue(result instanceof CollectionValue);
elements = ((CollectionValue) result).getElements();
assertNotNull(elements);
assertEquals(2, elements.length);
mgdop = operations.get("isDRMMasterForService");
assertNotNull("HAPartition has isDRMMasterForService", mgdop);
result = mgdop.invoke(hajndiparams);
assertTrue(result instanceof SimpleValue);
val = ((SimpleValue) result).getValue();
assertTrue(val instanceof Boolean);
mgdop = operations.get("create");