Package org.uddi.custody_v3

Examples of org.uddi.custody_v3.TransferToken


  public void validateDiscardTransferToken(EntityManager em, DiscardTransferToken body) throws DispositionReportFaultMessage {
    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    KeyBag keyBag = body.getKeyBag();
   
    // The call must contain at least a transfer token or keyBag
    if (body.getTransferToken() == null && keyBag == null)
      throw new FatalErrorException(new ErrorMessage("errors.discardtransfertoken.NoInput"));
   
    if (keyBag != null) {
      List<String> keyList = keyBag.getKey();
      if (keyList == null || keyList.size() == 0)
        throw new ValueNotAllowedException(new ErrorMessage("errors.keybag.NoInput"));
     
      // Test that publisher owns keys using operational info.
      int i = 0;
View Full Code Here


   
    org.uddi.custody_v3.TransferToken apiTransferToken = body.getTransferToken();
    if (apiTransferToken == null)
      throw new FatalErrorException(new ErrorMessage("errors.transfertoken.NullInput"));
   
    KeyBag keyBag = body.getKeyBag();
    if (keyBag == null)
      throw new FatalErrorException(new ErrorMessage("errors.keybag.NullInput"));
   
    List<String> apiKeyList = keyBag.getKey();
    if (apiKeyList == null || apiKeyList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.keybag.NoInput"));
   
    String transferTokenId = new String(apiTransferToken.getOpaqueToken());
    org.apache.juddi.model.TransferToken modelTransferToken = em.find(org.apache.juddi.model.TransferToken.class, transferTokenId);
View Full Code Here

        org.apache.juddi.model.TransferToken modelTransferToken = em.find(org.apache.juddi.model.TransferToken.class, transferTokenId);
        if (modelTransferToken != null)
          em.remove(modelTransferToken);
      }
     
      KeyBag keyBag = body.getKeyBag();
      if (keyBag != null) {
        List<String> keyList = keyBag.getKey();
        Vector<DynamicQuery.Parameter> params = new Vector<DynamicQuery.Parameter>(0);
        for (String key : keyList) {
          // Creating parameters for key-checking query
          DynamicQuery.Parameter param = new DynamicQuery.Parameter("UPPER(ttk.entityKey)",
                                        key.toUpperCase(),
View Full Code Here

      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateCustodyTransfer(publisher).validateTransferEntities(em, body);
 
      // Once validated, the ownership transfer is as simple as switching the publisher
      KeyBag keyBag = body.getKeyBag();
      List<String> keyList = keyBag.getKey();
      for (String key : keyList) {
        UddiEntity uddiEntity = em.find(UddiEntity.class, key);
        uddiEntity.setAuthorizedName(publisher.getAuthorizedName());
       
        if (uddiEntity instanceof BusinessEntity) {
View Full Code Here

  public void validateDiscardTransferToken(EntityManager em, DiscardTransferToken body) throws DispositionReportFaultMessage {
    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    KeyBag keyBag = body.getKeyBag();
   
    // The call must contain at least a transfer token or keyBag
    if (body.getTransferToken() == null && keyBag == null)
      throw new FatalErrorException(new ErrorMessage("errors.discardtransfertoken.NoInput"));
   
    if (keyBag != null) {
      List<String> keyList = keyBag.getKey();
      if (keyList == null || keyList.size() == 0)
        throw new ValueNotAllowedException(new ErrorMessage("errors.keybag.NoInput"));
     
      // Test that publisher owns keys using operational info.
      int i = 0;
View Full Code Here

   
    org.uddi.custody_v3.TransferToken apiTransferToken = body.getTransferToken();
    if (apiTransferToken == null)
      throw new FatalErrorException(new ErrorMessage("errors.transfertoken.NullInput"));
   
    KeyBag keyBag = body.getKeyBag();
    if (keyBag == null)
      throw new FatalErrorException(new ErrorMessage("errors.keybag.NullInput"));
   
    List<String> apiKeyList = keyBag.getKey();
    if (apiKeyList == null || apiKeyList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.keybag.NoInput"));
   
    String transferTokenId = new String(apiTransferToken.getOpaqueToken());
    org.apache.juddi.model.TransferToken modelTransferToken = em.find(org.apache.juddi.model.TransferToken.class, transferTokenId);
View Full Code Here

                String keySamBiz = bd.getBusinessEntity().get(0).getBusinessKey();
                //String keySamBizSvc = bd.getBusinessEntity().get(0).getBusinessServices().getBusinessService().get(0).getServiceKey();

                //transfers from Joe to Sam
                KeyBag kb = new KeyBag();
                kb.getKey().add(keyJoeBiz);

                Holder<String> nodeidOUT = new Holder<String>();
                Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                Holder<byte[]> tokenOUT = new Holder<byte[]>();
                custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

        @Test
        public void InvalidTransferTokenNullKeybag() {
                try {
                        //transfers from Joe to Sam
                        KeyBag kb = null;

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
                        custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

        @Test
        public void InvalidTransferTokenEmptyKeybag() {
                try {
                        //transfers from Joe to Sam
                        KeyBag kb = new KeyBag();
                        //kb.getKey().add(keyJoeBiz);

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
View Full Code Here

                        BusinessDetail bd = publishJoe.saveBusiness(sb);

                        keyJoeBiz = bd.getBusinessEntity().get(0).getBusinessKey();

                        //transfers from Joe to Sam
                        KeyBag kb = new KeyBag();
                        kb.getKey().add(keyJoeBiz);

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
                        custodyTransferPortTypeJoe.getTransferToken(null, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

TOP

Related Classes of org.uddi.custody_v3.TransferToken

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.