Example usage for javax.xml.registry.infomodel RegistryEntry STATUS_DEPRECATED

List of usage examples for javax.xml.registry.infomodel RegistryEntry STATUS_DEPRECATED

Introduction

In this page you can find the example usage for javax.xml.registry.infomodel RegistryEntry STATUS_DEPRECATED.

Prototype

int STATUS_DEPRECATED

To view the source code for javax.xml.registry.infomodel RegistryEntry STATUS_DEPRECATED.

Click Source Link

Document

RegistryEntry has been deprecated.

Usage

From source file:it.cnr.icar.eric.client.xml.registry.infomodel.RegistryObjectImpl.java

public int getStatus() throws JAXRException {
    //TODO: Need to move status to RegistryObject in JAXR 2.0
    int status = RegistryEntry.STATUS_SUBMITTED;
    try {//from   ww w. jav  a2s . com
        if (statusRef != null) {
            String ebStatus = statusRef.getId();

            if (ebStatus.equals(BindingUtility.CANONICAL_STATUS_TYPE_ID_Approved)) {
                status = RegistryEntry.STATUS_APPROVED;
            } else if (ebStatus.equals(BindingUtility.CANONICAL_STATUS_TYPE_ID_Deprecated)) {
                status = RegistryEntry.STATUS_DEPRECATED;
            } else if (ebStatus.equals(BindingUtility.CANONICAL_STATUS_TYPE_ID_Submitted)) {
                status = RegistryEntry.STATUS_SUBMITTED;
            } else if (ebStatus.equals(BindingUtility.CANONICAL_STATUS_TYPE_ID_Withdrawn)) {
                status = RegistryEntry.STATUS_WITHDRAWN;
            } else {
                status = RegistryEntry.STATUS_WITHDRAWN + 1; //Unknown?
            }
        }
    } catch (JAXRException e) {
        //cannot happen
        log.error(e);
    }
    return status;
}

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

public List<SelectItem> getRegistryEntryStatusCodes() {
    ArrayList<SelectItem> list = new ArrayList<SelectItem>();

    list.add(new SelectItem((new Integer(RegistryEntry.STATUS_APPROVED)),
            CanonicalSchemes.CANONICAL_STATUS_TYPE_CODE_Approved));
    list.add(new SelectItem((new Integer(RegistryEntry.STATUS_DEPRECATED)),
            CanonicalSchemes.CANONICAL_STATUS_TYPE_CODE_Deprecated));
    list.add(new SelectItem((new Integer(RegistryEntry.STATUS_WITHDRAWN)),
            CanonicalSchemes.CANONICAL_STATUS_TYPE_CODE_Withdrawn));
    list.add(new SelectItem((new Integer(RegistryEntry.STATUS_SUBMITTED)),
            CanonicalSchemes.CANONICAL_STATUS_TYPE_CODE_Submitted));
    return list;/*ww  w  .  j  ava2s  .com*/
}

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

public boolean isDeprecated() throws JAXRException {
    int currentStatus = ((RegistryObjectImpl) registryObject).getStatus();
    boolean checkNew = ((RegistryObjectImpl) registryObject).isNew();
    return (RegistryEntry.STATUS_WITHDRAWN == currentStatus || checkNew
            || RegistryEntry.STATUS_DEPRECATED == currentStatus);
}

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

public boolean isUnDeprecated() throws JAXRException {
    int currentStatus = ((RegistryObjectImpl) registryObject).getStatus();
    boolean checkNew = ((RegistryObjectImpl) registryObject).isNew();
    return (RegistryEntry.STATUS_WITHDRAWN == currentStatus || checkNew
            || RegistryEntry.STATUS_DEPRECATED != currentStatus);
}