Example usage for javax.xml.registry LifeCycleManager REGISTRY_PACKAGE

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

Introduction

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

Prototype

String REGISTRY_PACKAGE

To view the source code for javax.xml.registry LifeCycleManager REGISTRY_PACKAGE.

Click Source Link

Document

Constant representing the javax.xml.registry.infomodel.RegistryPackage interface.

Usage

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

/** Test addition of Member Services to RegistryPackage */
public void testAddRegistryObjects() throws Exception {

    // -- Get the Registry Package
    RegistryPackage pkg = (RegistryPackage) getBQM().getRegistryObject(pkgId,
            LifeCycleManager.REGISTRY_PACKAGE);
    Assert.assertNotNull("Could not retrieve test package submitted in testSubmit", pkg);

    // -- Get the Service
    Service service = (Service) getBQM().getRegistryObject(serviceId);
    Assert.assertNotNull("Could not retrieve canonical XML Cataloging Service", service);

    // -- Add service to Registry Package and save
    ArrayList<Service> members = new ArrayList<Service>();
    members.add(service);/*  w w  w.  j  av  a 2  s . co  m*/

    pkg.addRegistryObjects(members);

    // -- Save the Object
    ArrayList<RegistryPackage> objectsToSave = new ArrayList<RegistryPackage>();
    objectsToSave.add(pkg);

    BulkResponse resp = getLCM().saveObjects(objectsToSave);

    JAXRUtility.checkBulkResponse(resp);

}

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

public void testDelete() throws Exception {
    //Delete the service that was created in testSubmit
    deleteIfExist(pkgId, LifeCycleManager.REGISTRY_PACKAGE);
}