Package org.apache.juddi.datatype.request

Examples of org.apache.juddi.datatype.request.DeletePublisherAssertions


  public RegistryObject unmarshal(Element element)
  {
    Vector nodeList = null;
    AbstractHandler handler = null;
    DeletePublisherAssertions obj = new DeletePublisherAssertions();

    // Attributes
    String generic = element.getAttribute("generic");
    if ((generic != null && (generic.trim().length() > 0)))
      obj.setGeneric(generic);

    nodeList = XMLUtils.getChildElementsByTagName(element,AuthInfoHandler.TAG_NAME);
    if (nodeList != null && nodeList.size() == 1)
    {
      handler = maker.lookup(AuthInfoHandler.TAG_NAME);
      obj.setAuthInfo((AuthInfo)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,PublisherAssertionHandler.TAG_NAME);
    if (nodeList != null && nodeList.size() > 0)
    {
      handler = maker.lookup(PublisherAssertionHandler.TAG_NAME);
      for (int index = 0; index < nodeList.size(); ++index)
      {

        obj.addPublisherAssertion(
          (PublisherAssertion) handler.unmarshal(
            (Element) nodeList.elementAt(index)));
      }
    }
    return obj;
View Full Code Here


    return obj;
  }

  public void marshal(RegistryObject object, Element parent)
  {
    DeletePublisherAssertions request = (DeletePublisherAssertions) object;
    String generic = request.getGeneric();
    generic = getGeneric(generic);
    String namespace = getUDDINamespace(generic);
    Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);
    AbstractHandler handler = null;

    element.setAttribute("generic", generic);

    AuthInfo authInfo = request.getAuthInfo();
    if (authInfo != null)
    {
      handler = maker.lookup(AuthInfoHandler.TAG_NAME);
      handler.marshal(authInfo, element);
    }

    Vector keyVector = request.getPublisherAssertionVector();
    if ((keyVector != null) && (keyVector.size() > 0))
    {
      handler = maker.lookup(PublisherAssertionHandler.TAG_NAME);
      for (int i = 0; i < keyVector.size(); i++)
        handler.marshal(
View Full Code Here

    PublisherAssertion assertion2 = new PublisherAssertion();
    assertion2.setFromKey("6f157513-844e-4a95-a856-d257e6ba2222");
    assertion2.setToKey("6f157513-844e-4a95-a856-d257e6ba3333");

    DeletePublisherAssertions service = new DeletePublisherAssertions();
    service.setAuthInfo(authInfo);
    service.addPublisherAssertion(assertion1);
    service.addPublisherAssertion(assertion2);

    System.out.println();

    RegistryObject regObject = service;
    handler.marshal(regObject,parent);
View Full Code Here

   */
  public RegistryObject execute(RegistryObject regObject)
    throws RegistryException
  {
    // extract individual parameters
    DeletePublisherAssertions request = (DeletePublisherAssertions)regObject;
    String generic = request.getGeneric();
    AuthInfo authInfo = request.getAuthInfo();
    Vector assertionVector = request.getPublisherAssertionVector();

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

    try
View Full Code Here

      System.out.println("errno: "+dspRpt1.toString());
      DispositionReport dspRpt2 = (DispositionReport)(new AddPublisherAssertionsFunction(reg).execute(apaReq));
      System.out.println("errno: "+dspRpt2.toString());

      // create an DeletePublisherAssertions request & invoke the server
      DeletePublisherAssertions dpaReq = new DeletePublisherAssertions();
      dpaReq.setAuthInfo(new AuthInfo(authInfo));
      dpaReq.setPublisherAssertionVector(assertionVector);
      DispositionReport response = (DispositionReport)(new DeletePublisherAssertionsFunction(reg).execute(dpaReq));
      System.out.println("errno: "+response.toString());
    }
    catch (Exception ex)
    {
View Full Code Here

    PublisherAssertion assertion2 = new PublisherAssertion();
    assertion2.setFromKey("6f157513-844e-4a95-a856-d257e6ba2222");
    assertion2.setToKey("6f157513-844e-4a95-a856-d257e6ba3333");

    DeletePublisherAssertions object = new DeletePublisherAssertions();
    object.setAuthInfo(authInfo);
    object.addPublisherAssertion(assertion1);
    object.addPublisherAssertion(assertion2);

    return object;

  }
View Full Code Here

  public RegistryObject unmarshal(Element element)
  {
    Vector nodeList = null;
    AbstractHandler handler = null;
    DeletePublisherAssertions obj = new DeletePublisherAssertions();

    // Attributes
    String generic = element.getAttribute("generic");
    if ((generic != null && (generic.trim().length() > 0)))
      obj.setGeneric(generic);

    nodeList = XMLUtils.getChildElementsByTagName(element,AuthInfoHandler.TAG_NAME);
    if (nodeList != null && nodeList.size() == 1)
    {
      handler = maker.lookup(AuthInfoHandler.TAG_NAME);
      obj.setAuthInfo((AuthInfo)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,PublisherAssertionHandler.TAG_NAME);
    if (nodeList != null && nodeList.size() > 0)
    {
      handler = maker.lookup(PublisherAssertionHandler.TAG_NAME);
      for (int index = 0; index < nodeList.size(); ++index)
      {

        obj.addPublisherAssertion(
          (PublisherAssertion) handler.unmarshal(
            (Element) nodeList.elementAt(index)));
      }
    }
    return obj;
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object, Element parent)
  {
    DeletePublisherAssertions request = (DeletePublisherAssertions) object;
    Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);
    AbstractHandler handler = null;

    String generic = request.getGeneric();
    if (generic != null)
      element.setAttribute("generic", generic);

    AuthInfo authInfo = request.getAuthInfo();
    if (authInfo != null)
    {
      handler = maker.lookup(AuthInfoHandler.TAG_NAME);
      handler.marshal(authInfo, element);
    }

    Vector keyVector = request.getPublisherAssertionVector();
    if ((keyVector != null) && (keyVector.size() > 0))
    {
      handler = maker.lookup(PublisherAssertionHandler.TAG_NAME);
      for (int i = 0; i < keyVector.size(); i++)
        handler.marshal(
View Full Code Here

    PublisherAssertion assertion2 = new PublisherAssertion();
    assertion2.setFromKey("6f157513-844e-4a95-a856-d257e6ba2222");
    assertion2.setToKey("6f157513-844e-4a95-a856-d257e6ba3333");

    DeletePublisherAssertions service = new DeletePublisherAssertions();
    service.setAuthInfo(authInfo);
    service.addPublisherAssertion(assertion1);
    service.addPublisherAssertion(assertion2);

    System.out.println();

    RegistryObject regObject = service;
    handler.marshal(regObject,parent);
View Full Code Here

   */
  public RegistryObject execute(RegistryObject regObject)
    throws RegistryException
  {
    // extract individual parameters
    DeletePublisherAssertions request = (DeletePublisherAssertions)regObject;
    String generic = request.getGeneric();
    AuthInfo authInfo = request.getAuthInfo();
    Vector assertionVector = request.getPublisherAssertionVector();

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

    try
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.request.DeletePublisherAssertions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.