}
IRegistry ireg = registry.getRegistry();
ConnectionImpl connection = registry.getConnection();
AuthToken token = getAuthToken(connection, ireg);
if (token == null) {
throw new IllegalStateException("No auth token returned");
}
Object regobj;
if(op.equalsIgnoreCase("SAVE_ASSOCIATION"))
{
regobj = ireg.setPublisherAssertions(token.getAuthInfo(), (PublisherAssertion[]) dataarray);
} else
if (op.equalsIgnoreCase("SAVE_SERVICE")) {
regobj = ireg.saveService(token.getAuthInfo(), (BusinessService[])dataarray);
}
else if (op.equalsIgnoreCase("SAVE_SERVICE_BINDING")) {
regobj = ireg.saveBinding(token.getAuthInfo(), (BindingTemplate[]) dataarray);
}
else if (op.equalsIgnoreCase("SAVE_ORG")) {
regobj = ireg.saveBusiness(token.getAuthInfo(), (BusinessEntity[]) dataarray);
}
else if (op.equalsIgnoreCase("SAVE_TMODEL")) {
regobj = ireg.saveTModel(token.getAuthInfo(), (TModel[]) dataarray);
}
else if (op.equalsIgnoreCase("DELETE_ORG")) {
clearPublisherAssertions(token.getAuthInfo(), ireg);
regobj = ireg.deleteBusiness(token.getAuthInfo(), (String[]) dataarray);
}
else if (op.equalsIgnoreCase("DELETE_SERVICE")) {
regobj = ireg.deleteService(token.getAuthInfo(), (String[]) dataarray);
}
else if (op.equalsIgnoreCase("DELETE_SERVICEBINDING")) {
regobj = ireg.deleteBinding(token.getAuthInfo(), (String[]) dataarray);
}
else if (op.equalsIgnoreCase("DELETE_CONCEPT")) {
regobj = ireg.deleteTModel(token.getAuthInfo(), (String[]) dataarray);
}
else if (op.equalsIgnoreCase("DELETE_ASSOCIATION")) {
int len = ((String[]) dataarray).length;
PublisherAssertion[] paarr = new PublisherAssertion[len];
for(int i=0;i<len;i++)
{
String keystr = ((String[])dataarray)[i];
paarr[i] = ScoutJaxrUddiHelper.getPubAssertionFromJAXRAssociationKey(keystr);
}
regobj = ireg.deletePublisherAssertions(token.getAuthInfo(), paarr);
}
else if (op.equalsIgnoreCase("DELETE_CLASSIFICATIONSCHEME")) {
regobj = ireg.deleteTModel(token.getAuthInfo(), (String[]) dataarray);
}
else {
throw new JAXRException("Unsupported operation:" + op);
}