List of usage examples for javax.xml.registry LifeCycleManager deleteObjects
BulkResponse deleteObjects(Collection keys) throws JAXRException;
From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java
/** * Delete existing Registry Object. Returns Failure/Success string for display. * * @param none/*from w w w .j a v a 2s . co m*/ * @return String */ public String doDeleteObject(RegistryObjectBean deleteROB) { String status = "failure"; ArrayList<Key> roList = new ArrayList<Key>(); RegistryObject ro = deleteROB.getRegistryObject(); try { roList.add(ro.getKey()); LifeCycleManager lcm = ro.getLifeCycleManager(); lcm.deleteObjects(roList); status = "publishSuccessful"; refreshSearchExplore(); } catch (ReferencesExistException ree) { log.error(WebUIResourceBundle.getInstance().getString("message.FailedToDeleteThisObject") + ":" + ree.getLocalizedMessage()); append(WebUIResourceBundle.getInstance().getString("lcmDeleteError") + " " + ree.getLocalizedMessage()); } catch (Exception je) { log.error("Error in Delete Existing RegistryObject ", je); append(WebUIResourceBundle.getInstance().getString("deleteROError") + " " + je.getLocalizedMessage()); } return status; }
From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java
/** * Delete existing Registry Object. Returns Failure/Success string for display. * * @param none/*from w w w . j a va 2 s . co m*/ * @return String */ public String doDeleteOnCurrentROB() { String status = "failure"; if (!isUserAllowedToPublish()) { status = RegistryBrowser.getInstance().getAuthenticationStatus(); RegistryBrowser.getInstance() .setPublishOperationMessage(WebUIResourceBundle.getInstance().getString("deleteButtonText")); } else { ArrayList<Key> roList = new ArrayList<Key>(); RegistryObject ro = currentRegistryObject.getRegistryObject(); try { roList.add(ro.getKey()); LifeCycleManager lcm = ro.getLifeCycleManager(); lcm.deleteObjects(roList); status = "publishSuccessful"; refreshSearchExplore(); } catch (Exception je) { log.error( WebUIResourceBundle.getInstance().getString("message.ErrorInDeleteExistingRegistryObject"), je); append(WebUIResourceBundle.getInstance().getString("deleteROError") + " " + je.getLocalizedMessage()); } } return status; }