Example usage for javax.xml.registry BusinessLifeCycleManager createKey

List of usage examples for javax.xml.registry BusinessLifeCycleManager createKey

Introduction

In this page you can find the example usage for javax.xml.registry BusinessLifeCycleManager createKey.

Prototype

public Key createKey(String id) throws JAXRException;

Source Link

Document

Creates a Key instance from an ID.

Usage

From source file:JAXRDeleteConcept.java

/**
     * Creates a Key object from the user-supplied string.
     */*  ww  w .  ja  va 2 s.  com*/
     * @param keyStr        the key of the published concept
     *
     * @return        the key of the concept found
     */
    public Key createKey(String keyStr) {
        BusinessLifeCycleManager blcm = null;
        Key key = null;

        try {
            rs = connection.getRegistryService();
            blcm = rs.getBusinessLifeCycleManager();
            System.out.println("Got registry service and life cycle manager");

            key = blcm.createKey(keyStr);
        } catch (Exception e) {
            e.printStackTrace();

            if (connection != null) {
                try {
                    connection.close();
                } catch (JAXRException je) {
                    System.err.println("Connection close failed");
                }
            }
        }

        return key;
    }

From source file:JAXRDelete.java

/**
     * Creates a Key object from the user-supplied string.
     *// ww w.  j a  v  a 2 s  . c o m
     * @param keyStr        the key of the published organization
     *
     * @return        the key of the organization found
     */
    public Key createOrgKey(String keyStr) {
        BusinessLifeCycleManager blcm = null;
        Key orgKey = null;

        try {
            rs = connection.getRegistryService();
            blcm = rs.getBusinessLifeCycleManager();
            System.out.println("Got registry service and " + "life cycle manager");

            orgKey = blcm.createKey(keyStr);
        } catch (Exception e) {
            e.printStackTrace();

            if (connection != null) {
                try {
                    connection.close();
                } catch (JAXRException je) {
                    System.err.println("Connection close failed");
                }
            }
        }

        return orgKey;
    }

From source file:JAXRDeleteScheme.java

/**
     * Creates a Key object from the user-supplied string.
     *// w ww  .j a v  a2  s.c o m
     * @param keyStr        the key of the published organization
     *
     * @return        the key of the organization found
     */
    public Key createSchemeKey(String keyStr) {
        BusinessLifeCycleManager blcm = null;
        Key schemeKey = null;

        try {
            rs = connection.getRegistryService();
            blcm = rs.getBusinessLifeCycleManager();
            System.out.println("Got registry service and " + "life cycle manager");

            schemeKey = blcm.createKey(keyStr);
        } catch (Exception e) {
            e.printStackTrace();

            if (connection != null) {
                try {
                    connection.close();
                } catch (JAXRException je) {
                    System.err.println("Connection close failed");
                }
            }
        }

        return schemeKey;
    }