Example usage for javax.xml.registry LifeCycleManager unDeprecateObjects

List of usage examples for javax.xml.registry LifeCycleManager unDeprecateObjects

Introduction

In this page you can find the example usage for javax.xml.registry LifeCycleManager unDeprecateObjects.

Prototype

BulkResponse unDeprecateObjects(Collection keys) throws JAXRException;

Source Link

Document

Undeprecates one or more previously deprecated objects.

Usage

From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java

/**
* UnDeprecate deprecated Registry Object.  Returns Failure/Success string for display.
* 
* @param none/*w ww .j av  a  2 s. c  om*/
* @return String
*/
public String doUndeprecateOnCurrentROB() {
    String status = "failure";
    if (!isUserAllowedToPublish()) {
        status = RegistryBrowser.getInstance().getAuthenticationStatus();
        RegistryBrowser.getInstance().setPublishOperationMessage(
                WebUIResourceBundle.getInstance().getString("undeprecateButtonText"));
    } else {
        List<Key> roList = new ArrayList<Key>();
        RegistryObject ro = currentRegistryObject.getRegistryObject();
        try {
            roList.add(ro.getKey());
            LifeCycleManager lcm = ro.getLifeCycleManager();
            lcm.unDeprecateObjects(roList);
            status = "publishSuccessful";
            refreshSearchExplore();
        } catch (Exception je) {
            log.error(WebUIResourceBundle.getInstance().getString("message.ErrorInUndeprecatingRegistryObject"),
                    je);
            append(WebUIResourceBundle.getInstance().getString("undeprecateROError") + " "
                    + je.getLocalizedMessage());
        }
    }
    return status;
}