List of usage examples for javax.xml.registry LifeCycleManager deprecateObjects
BulkResponse deprecateObjects(Collection keys) throws JAXRException;
From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java
/** * Deprecate existing Registry Object. Returns Failure/Success string for display. * * @param none/*from w w w.java 2 s . com*/ * @return String */ public String doDeprecateOnCurrentROB() { String status = "failure"; if (!isUserAllowedToPublish()) { status = RegistryBrowser.getInstance().getAuthenticationStatus(); RegistryBrowser.getInstance() .setPublishOperationMessage(WebUIResourceBundle.getInstance().getString("deprecateButtonText")); } else { ArrayList<Key> roList = new ArrayList<Key>(); RegistryObject ro = currentRegistryObject.getRegistryObject(); try { roList.add(ro.getKey()); LifeCycleManager lcm = ro.getLifeCycleManager(); lcm.deprecateObjects(roList); status = "publishSuccessful"; refreshSearchExplore(); } catch (Exception je) { log.error(WebUIResourceBundle.getInstance().getString("message.ErrorInDeprecateRegistryObject"), je); append(WebUIResourceBundle.getInstance().getString("deprecateROError") + " " + je.getLocalizedMessage()); } } return status; }