Package org.apache.juddi.datatype.assertion

Examples of org.apache.juddi.datatype.assertion.PublisherAssertion


  {

    AuthInfo authInfo = new AuthInfo();
    authInfo.setValue("6f157513-844e-4a95-a856-d257e6ba9726");

    PublisherAssertion assertion1 = new PublisherAssertion();
    assertion1.setFromKey("6f157513-844e-4a95-a856-d257e6ba0000");
    assertion1.setToKey("6f157513-844e-4a95-a856-d257e6ba1111");

    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);
View Full Code Here


  private RegistryObject getRegistryObject()
  {
    AuthInfo authInfo = new AuthInfo();
    authInfo.setValue("6f157513-844e-4a95-a856-d257e6ba9726");

    PublisherAssertion assertion = new PublisherAssertion();
    assertion.setFromKey("3379ec11-a509-4668-9fee-19b134d0d09b");
    assertion.setToKey("3379ec11-a509-4668-9fee-19b134d0d09b");
    assertion.setKeyName("paKeyName");
    assertion.setKeyValue("paKeyValue");
    assertion.setTModelKey("uuid:3379ec11-a509-4668-9fee-19b134d0d09b");

    SetPublisherAssertions object = new SetPublisherAssertions();
    object.setAuthInfo(authInfo);
    object.addPublisherAssertion(assertion);
    object.addPublisherAssertion(assertion);
View Full Code Here

                len = v.size();
                col = new ArrayList(len);
            }
            for (int i = 0; i < len; i++)
            {
                PublisherAssertion pas = (PublisherAssertion) v.elementAt(i);
                String sourceKey = pas.getFromKey();
                String targetKey = pas.getToKey();
                Collection orgcol = new ArrayList();
                orgcol.add(new KeyImpl(sourceKey));
                orgcol.add(new KeyImpl(targetKey));
                BulkResponse bl = getRegistryObjects(orgcol, LifeCycleManager.ORGANIZATION);
                Association asso = ScoutUddiJaxrHelper.getAssociation(bl.getCollection(),
                                             registryService.getBusinessLifeCycleManager());
                KeyedReference keyr = pas.getKeyedReference();
                Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
                c.setName(new InternationalStringImpl(keyr.getKeyName()));
                c.setKey( new KeyImpl(keyr.getTModelKey()) );
                c.setValue(keyr.getKeyValue());
                asso.setAssociationType(c);
View Full Code Here


        Iterator iter = asso.iterator();
        while (iter.hasNext()) {
            try {
                PublisherAssertion pa = ScoutJaxrUddiHelper.getPubAssertionFromJAXRAssociation((Association) iter.next());
                svect.add(pa);
            }
            catch (ClassCastException ce) {
                throw new UnexpectedObjectException();
            }
        }
        // Save PublisherAssertion
        PublisherAssertions bd = null;
        try {
            bd = (PublisherAssertions) executeOperation(svect, "SAVE_ASSOCIATION");
        }
        catch (RegistryException e) {
            exceptions.add(new SaveException(e.getLocalizedMessage()));
            bulk.setExceptions(exceptions);
            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
            return bulk;
        }
        if(bd != null)
        {
           Vector keyvect = bd.getPublisherAssertionVector();
           for (int i = 0; keyvect != null && i < keyvect.size(); i++) {
               PublisherAssertion result = (PublisherAssertion) keyvect.elementAt(i);
               KeyedReference kr = result.getKeyedReference();
               coll.add(kr.getTModelKey()); //TODO:Verify This

           }
        }
        bulk.setCollection(coll);
View Full Code Here

    private PublisherAssertion getPublisherAssertion(AssertionStatusItem asi)
    {
        String sourceKey = asi.getFromKey();
        String targetKey = asi.getToKey();
        PublisherAssertion pa = new PublisherAssertion();
        pa.setFromKey(sourceKey);
        pa.setToKey(targetKey);
        KeyedReference keyr = asi.getKeyedReference();
        pa.setKeyedReference(keyr);
        pa.setTModelKey(keyr.getTModelKey());
        pa.setKeyName(keyr.getKeyName());
        pa.setKeyValue(keyr.getKeyValue());
        return pa;
    }
View Full Code Here

    }

    public static PublisherAssertion getPubAssertionFromJAXRAssociation(Association assc)
            throws JAXRException
    {
        PublisherAssertion pa = new PublisherAssertion();
        try
        {
            pa.setFromKey(assc.getSourceObject().getKey().getId());
            pa.setToKey(assc.getTargetObject().getKey().getId());
            Concept c = assc.getAssociationType();
            String v = c.getValue();
            KeyedReference kr = new KeyedReference();
            Key key = c.getKey();
            if(key == null )
            {
                //TODO:Need to check this.  If the concept is a predefined
                //enumeration, the key can be the parent classification scheme
                key = c.getClassificationScheme().getKey();
            }
            if(key != null)
              kr.setTModelKey(key.getId());
            kr.setKeyName("Concept");
            kr.setKeyValue(v);
            pa.setKeyedReference(kr);
        } catch (Exception ud)
        {
            throw new JAXRException("Apache JAXR Impl:", ud);
        }
        return pa;
View Full Code Here

    }

    public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(String key)
            throws JAXRException
    {
        PublisherAssertion pa = new PublisherAssertion();
        try
        {
            StringTokenizer token = new  StringTokenizer(key,":");
            if(token.hasMoreTokens())
            {
               pa.setFromKey(getToken(token.nextToken()));
               pa.setToKey(getToken(token.nextToken()));
               KeyedReference kr = new KeyedReference();
               //Sometimes the Key is UUID:something
               String str = getToken(token.nextToken());
               if("UUID".equals(str)) str += ":" + getToken(token.nextToken());
               kr.setTModelKey(str);
               kr.setKeyName(getToken(token.nextToken()));
               kr.setKeyValue(getToken(token.nextToken()));
               pa.setKeyedReference(kr);
            }

        } catch (Exception ud)
        {
            throw new JAXRException("Apache JAXR Impl:", ud);
View Full Code Here

      // create a new PublisherAssertion
      String fromKey = b1.getBusinessKey();
      String toKey = b2.getBusinessKey();
      KeyedReference keyedReference = new KeyedReference ("Partner Company","peer-peer");
      keyedReference.setTModelKey(TModel.RELATIONSHIPS_TMODEL_KEY);
      PublisherAssertion assertion = new PublisherAssertion(fromKey,toKey,keyedReference);

      // create a PublisherAssertion Vector
      Vector assertionVector = new Vector();
      assertionVector.addElement(assertion);
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.assertion.PublisherAssertion

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.