//Protected Methods
protected org.apache.juddi.datatype.RegistryObject executeOperation(Vector datavect, String op)
throws org.apache.juddi.error.RegistryException, JAXRException {
org.apache.juddi.datatype.RegistryObject regobj = null;
IRegistry ireg = null;
if (registry != null) {
ireg = registry.getRegistry();
}
ConnectionImpl connection = registry.getConnection();
AuthToken token = getAuthToken(connection, ireg);
if(op.equalsIgnoreCase("SAVE_ASSOCIATION"))
{
regobj = ireg.setPublisherAssertions(token.getAuthInfo(), datavect);
} else
if (op.equalsIgnoreCase("SAVE_SERVICE")) {
regobj = ireg.saveService(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("SAVE_SERVICE_BINDING")) {
regobj = ireg.saveBinding(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("SAVE_ORG")) {
regobj = ireg.saveBusiness(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("SAVE_TMODEL")) {
regobj = ireg.saveTModel(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("DELETE_ORG")) {
clearPublisherAssertions(token.getAuthInfo(),datavect,ireg);
regobj = ireg.deleteBusiness(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("DELETE_SERVICE")) {
regobj = ireg.deleteService(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("DELETE_SERVICEBINDING")) {
regobj = ireg.deleteBinding(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("DELETE_CONCEPT")) {
regobj = ireg.deleteTModel(token.getAuthInfo(), datavect);
}
else if (op.equalsIgnoreCase("DELETE_ASSOCIATION")) {
int len = datavect.size();
Vector pavect = new Vector(len);
for(int i=0;i<len;i++)
{
String keystr = (String)datavect.elementAt(i);
pavect.add(ScoutJaxrUddiHelper.getPubAssertionFromJAXRAssociationKey(keystr));
}
regobj = ireg.deletePublisherAssertions(token.getAuthInfo(), pavect);
}
else if (op.equalsIgnoreCase("DELETE_CLASSIFICATIONSCHEME")) {
regobj = ireg.deleteTModel(token.getAuthInfo(), datavect);
}
else {
throw new JAXRException("Unsupported operation:" + op);
}