Method used to create GPO command and execute it

@param pPdol
PDOL raw data
@return return data
@throws CommunicationException communication error
170597
protected byte[] getGetProcessingOptions(final byte[] pPdol) throws CommunicationException {
		// List Tag and length from PDOL
		List<TagAndLength> list = TlvUtil.parseTagAndLength(pPdol);
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		try {
			out.write(EmvTags.COMMAND_TEMPLATE.getTagBytes()); // COMMAND
			// TEMPLATE
			out.write(TlvUtil.getLength(list)); // ADD total length
			if (list != null) {
				for (TagAndLength tl : list) {
					out.write(template.get().getTerminal().constructValue(tl));
				}
			}
		} catch (IOException ioe) {
			LOGGER.error("Construct GPO Command:" + ioe.getMessage(), ioe);
		}
		return template.get().getProvider().transceive(new CommandApdu(CommandEnum.GPO, out.toByteArray(), 0).toBytes());
	}
447481
public static <T, ID> RuntimeExceptionDao<T, ID> createDao(ConnectionSource connectionSource, Class<T> clazz)
			throws SQLException {
		@SuppressWarnings("unchecked")
		Dao<T, ID> castDao = (Dao<T, ID>) DaoManager.createDao(connectionSource, clazz);
		return new RuntimeExceptionDao<T, ID>(castDao);
	}
97811
public TCConversationRequest createConversation(Dialog d, boolean dialogTermitationPermission) {
        if (d == null) {
            throw new NullPointerException("Dialog is null");
        }
        TCConversationRequestImpl tccr = new TCConversationRequestImpl(dialogTermitationPermission);
        tccr.setDialog(d);
        tccr.setOriginatingAddress(d.getLocalAddress());

        return tccr;
    }
1000945
public final void makeSeOrdLn(final Map<String, Object> pRqVs,
    final List<CuOrSe> pOrders, final SeSeller pSel,
      final AItemPlace<?, ?> pItPl, final CartLn pCartLn,
        final TradingSettings pTs) throws Exception {
    CuOrSe cuOr = null;
    boolean isNdOrInit = true;
    for (CuOrSe co : pOrders) {
      if (co.getCurr() != null && co.getSel() != null
  && co.getSel().getSeller().getItsId().equals(pSel.getSeller().getItsId())) {
        cuOr = co;
        isNdOrInit = false;
        break;
      }
    }
    if (cuOr == null) {
      for (CuOrSe co : pOrders) {
        if (co.getCurr() == null) {
          cuOr = co;
          break;
        }
      }
    }
    if (cuOr == null) {
      cuOr = new CuOrSe();
      cuOr.setIsNew(true);
      cuOr.setTaxes(new ArrayList<CuOrSeTxLn>());
      cuOr.setGoods(new ArrayList<CuOrSeGdLn>());
      cuOr.setServs(new ArrayList<CuOrSeSrLn>());
      pOrders.add(cuOr);
    }
    if (isNdOrInit) {
      cuOr.setDat(new Date());
      cuOr.setSeller(pSel);
      cuOr.setStat(EOrdStat.NEW);
      cuOr.setDeliv(pCartLn.getItsOwner().getDeliv());
      cuOr.setPayMeth(pCartLn.getItsOwner().getPayMeth());
      cuOr.setBuyer(pCartLn.getItsOwner().getBuyer());
      //TODO  method "pickup by buyer from several places"
      //cuOr.setPlace(pItPl.getPickUpPlace());
      cuOr.setPur(pCartLn.getItsOwner().getItsVersion());
      cuOr.setCurr(pCartLn.getItsOwner().getCurr());
      cuOr.setExcRt(pCartLn.getItsOwner().getExcRt());
      cuOr.setDescr(pCartLn.getItsOwner().getDescr());
    }
    pRqVs.put(CartItTxLn.class.getSimpleName() + "itsOwnerdeepLevel", 1);
    pRqVs.put(CartItTxLn.class.getSimpleName() + "taxdeepLevel", 1);
    List<CartItTxLn> citls = getSrvOrm().retrieveListWithConditions(pRqVs,
      CartItTxLn.class, "where DISAB=0 and ITSOWNER=" + pCartLn.getItsId());
    pRqVs.remove(CartItTxLn.class.getSimpleName() + "itsOwnerdeepLevel");
    pRqVs.remove(CartItTxLn.class.getSimpleName() + "taxdeepLevel");
    ACuOrSeLn ol;
    if (pCartLn.getItTyp().equals(EShopItemType.SEGOODS)) {
      CuOrSeGdLn ogl = null;
      if (!cuOr.getIsNew()) {
        for (CuOrSeGdLn gl : cuOr.getGoods()) {
          if (gl.getGood() == null) {
            ogl = gl;
            break;
          }
        }
      }
      if (ogl == null) {
        ogl = new CuOrSeGdLn();
        ogl.setIsNew(true);
        cuOr.getGoods().add(ogl);
      }
      SeGoods gd = new SeGoods();
      gd.setSeller(pSel);
      gd.setItsId(pCartLn.getItId());
      gd.setItsName(pCartLn.getItsName());
      ogl.setGood(gd);
      if (citls.size() > 0) {
        if (ogl.getIsNew()) {
          ogl.setItTxs(new ArrayList<CuOrSeGdTxLn>());
        }
        for (CartItTxLn citl : citls) {
          CuOrSeGdTxLn oitl = null;
          if (!cuOr.getIsNew()) {
            for (CuOrSeGdTxLn itl : ogl.getItTxs()) {
              if (itl.getTax() == null) {
                oitl = itl;
                break;
              }
            }
          }
          if (oitl == null) {
            oitl = new CuOrSeGdTxLn();
            oitl.setIsNew(true);
            ogl.getItTxs().add(oitl);
          }
          oitl.setItsOwner(ogl);
          Tax tx = new Tax();
          tx.setItsId(citl.getTax().getItsId());
          tx.setItsName(citl.getTax().getItsName());
          oitl.setTax(tx);
          oitl.setTot(citl.getTot());
        }
      }
      ol = ogl;
    } else {
      CuOrSeSrLn osl = null;
      if (!cuOr.getIsNew()) {
        for (CuOrSeSrLn sl : cuOr.getServs()) {
          if (sl.getService() == null) {
            osl = sl;
            break;
          }
        }
      }
      if (osl == null) {
        osl = new CuOrSeSrLn();
        osl.setIsNew(true);
        cuOr.getServs().add(osl);
      }
      SeService sr = new SeService();
      sr.setSeller(pSel);
      sr.setItsId(pCartLn.getItId());
      sr.setItsName(pCartLn.getItsName());
      osl.setService(sr);
      osl.setDt1(pCartLn.getDt1());
      osl.setDt2(pCartLn.getDt2());
      if (citls.size() > 0) {
        if (osl.getIsNew()) {
          osl.setItTxs(new ArrayList<CuOrSeSrTxLn>());
        }
        for (CartItTxLn citl : citls) {
          CuOrSeSrTxLn oitl = null;
          if (!cuOr.getIsNew()) {
            for (CuOrSeSrTxLn itl : osl.getItTxs()) {
              if (itl.getTax() == null) {
                oitl = itl;
                break;
              }
            }
          }
          if (oitl == null) {
            oitl = new CuOrSeSrTxLn();
            oitl.setIsNew(true);
            osl.getItTxs().add(oitl);
          }
          oitl.setItsOwner(osl);
          Tax tx = new Tax();
          tx.setItsId(citl.getTax().getItsId());
          tx.setItsName(citl.getTax().getItsName());
          oitl.setTax(tx);
          oitl.setTot(citl.getTot());
        }
      }
      ol = osl;
    }
    ol.setItsName(pCartLn.getItsName());
    ol.setDescr(pCartLn.getDescr());
    ol.setUom(pCartLn.getUom());
    ol.setPrice(pCartLn.getPrice());
    ol.setQuant(pCartLn.getQuant());
    ol.setSubt(pCartLn.getSubt());
    ol.setTot(pCartLn.getTot());
    ol.setTotTx(pCartLn.getTotTx());
    ol.setTxCat(pCartLn.getTxCat());
    ol.setTxDsc(pCartLn.getTxDsc());
  }
354229
protected final PrcSeSellerDel<RS> lazyGetPrcSeSellerDel(final Map<String, Object> pAddParam) throws Exception {
    String beanName = PrcSeSellerDel.class.getSimpleName();
    @SuppressWarnings("unchecked")
    PrcSeSellerDel<RS> proc = (PrcSeSellerDel<RS>) this.processorsMap.get(beanName);
    if (proc == null) {
      proc = new PrcSeSellerDel<RS>();
      proc.setSrvOrm(getSrvOrm());
      proc.setFindSeSeller(getFindSeSeller());
      //assigning fully initialized object:
      this.processorsMap.put(beanName, proc);
      this.logger.info(null, FctBnTradeEntitiesProcessors.class, beanName + " has been created.");
    }
    return proc;
  }
440632
public static cmpglobal_cmppolicy_binding[] get(nitro_service service) throws Exception{
		cmpglobal_cmppolicy_binding obj = new cmpglobal_cmppolicy_binding();
		cmpglobal_cmppolicy_binding response[] = (cmpglobal_cmppolicy_binding[]) obj.get_resources(service);
		return response;
	}
1295587
public Result<Void> delPermFromRole(AuthzTrans trans, RoleDAO.Data role,PermDAO.Data pd, boolean fromApproval) {
		String user = trans.user();
		if (!fromApproval) {
			Result<NsDAO.Data> ucr = q.mayUser(trans, user, role, Access.write);
			Result<NsDAO.Data> ucp = q.mayUser(trans, user, pd, Access.write);

			// If Can't change either Role or Perm, then deny
			if (ucr.notOK() && ucp.notOK()) {
				return Result.err(Status.ERR_Denied,
						"User [" + trans.user()
								+ "] does not have permission to delete ["
								+ pd.encode() + "] from Role ["
								+ role.fullName() + ']');
			}
		}

		Result<List<RoleDAO.Data>> rlr = q.roleDAO.read(trans, role);
		if (rlr.notOKorIsEmpty()) {
			// If Bad Data, clean out
			Result<List<PermDAO.Data>> rlp = q.permDAO.read(trans, pd);
			if (rlp.isOKhasData()) {
				for (PermDAO.Data pv : rlp.value) {
					q.permDAO.delRole(trans, pv, role);
				}
			}
			return Result.err(rlr);
		}
		String perm1 = pd.encode();
		boolean notFound;
		if (trans.forceRequested()) {
			notFound = false;
		} else { // only check if force not set.
			notFound = true;
			for (RoleDAO.Data r : rlr.value) {
				if (r.perms != null) {
					for (String perm : r.perms) {
						if (perm1.equals(perm)) {
							notFound = false;
							break;
						}
					}
					if(!notFound) {
						break;
					}
				}
			}
		}
		if (notFound) { // Need to check both, in case of corruption
			return Result.err(Status.ERR_PermissionNotFound,
					"Permission [%s.%s|%s|%s] not associated with any Role",
					pd.ns,pd.type,pd.instance,pd.action);
		}

		// Read Perm for full data
		Result<List<PermDAO.Data>> rlp = q.permDAO.read(trans, pd);
		Result<Void> rv = null;
		if (rlp.isOKhasData()) {
			for (PermDAO.Data pv : rlp.value) {
				if ((rv = q.permDAO.delRole(trans, pv, role)).isOK()) {
					if ((rv = q.roleDAO.delPerm(trans, role, pv)).notOK()) {
						trans.error().log(
								"Error removing Perm during delFromPermRole:",
								trans.getUserPrincipal(), rv.errorString());
					}
				} else {
					trans.error().log(
							"Error removing Role during delFromPermRole:",
							trans.getUserPrincipal(), rv.errorString());
				}
			}
		} else {
			rv = q.roleDAO.delPerm(trans, role, pd);
			if (rv.notOK()) {
				trans.error().log("Error removing Role during delFromPermRole",
						rv.errorString());
			}
		}
		return rv == null ? Result.ok() : rv;
	}
852827
public final J4pClientBuilder proxy(String pProxyHost, int pProxyPort, String pProxyUser, String pProxyPass) {
        httpProxy = new Proxy(pProxyHost,pProxyPort, pProxyUser,pProxyPass);
        return this;
    }
1016016
@Override
    public void createControlAdapter()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createControlAdapter");

        DestinationHandler dh = null;
        try
        {
            ReferenceStream rs = getReferenceStream();
            if (rs instanceof MessageReferenceStream)
            {
                ItemStream is = rs.getItemStream();
                if (is instanceof PubSubMessageItemStream)
                {
                    dh = ((PubSubMessageItemStream) is).getDestinationHandler();
                    controlAdapter = new QueuedMessage(this, dh, rs);
                }
            }
        } catch (Exception e)
        {
            // FFDC
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.store.items.MessageItemReference.createControlAdapter",
                                        "1:1266:1.147",
                                        this);

            SibTr.exception(tc, e);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createControlAdapter");
    }
993925
public static synchronized PortRange getUdpSourceInstance() {
        if (udpSourcePortRange == null) {
            udpSourcePortRange = new PortRange();
            udpSourcePortRange.init(
                  CoGProperties.getDefault().getUdpSourcePortRange());
        }
        return udpSourcePortRange;
    }
95238
protected final PrcWageGfr<RS> createPutPrcWageGfr(
    final Map<String, Object> pAddParam) throws Exception {
    PrcWageGfr<RS> proc = new PrcWageGfr<RS>();
    @SuppressWarnings("unchecked")
    IEntityProcessor<Wage, Long> procDlg = (IEntityProcessor<Wage, Long>)
      lazyGetPrcAccDocGetForReverse(pAddParam);
    proc.setPrcAccDocGetForReverse(procDlg);
    //assigning fully initialized object:
    this.processorsMap.put(PrcWageGfr.class.getSimpleName(), proc);
    return proc;
  }
323624
public function writeDocPropsApp(PHPExcel $pPHPExcel = null)
    {
        // Create XML writer
        $objWriter = null;
        if ($this->getParentWriter()->getUseDiskCaching()) {
            $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
        } else {
            $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
        }

        // XML header
        $objWriter->startDocument('1.0', 'UTF-8', 'yes');

        // Properties
        $objWriter->startElement('Properties');
        $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties');
        $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');

        // Application
        $objWriter->writeElement('Application', 'Microsoft Excel');

        // DocSecurity
        $objWriter->writeElement('DocSecurity', '0');

        // ScaleCrop
        $objWriter->writeElement('ScaleCrop', 'false');

        // HeadingPairs
        $objWriter->startElement('HeadingPairs');

        // Vector
        $objWriter->startElement('vt:vector');
        $objWriter->writeAttribute('size', '2');
        $objWriter->writeAttribute('baseType', 'variant');

        // Variant
        $objWriter->startElement('vt:variant');
        $objWriter->writeElement('vt:lpstr', 'Worksheets');
        $objWriter->endElement();

        // Variant
        $objWriter->startElement('vt:variant');
        $objWriter->writeElement('vt:i4', $pPHPExcel->getSheetCount());
        $objWriter->endElement();

        $objWriter->endElement();

        $objWriter->endElement();

        // TitlesOfParts
        $objWriter->startElement('TitlesOfParts');

        // Vector
        $objWriter->startElement('vt:vector');
        $objWriter->writeAttribute('size', $pPHPExcel->getSheetCount());
        $objWriter->writeAttribute('baseType', 'lpstr');

        $sheetCount = $pPHPExcel->getSheetCount();
        for ($i = 0; $i < $sheetCount; ++$i) {
            $objWriter->writeElement('vt:lpstr', $pPHPExcel->getSheet($i)->getTitle());
        }

        $objWriter->endElement();

        $objWriter->endElement();

        // Company
        $objWriter->writeElement('Company', $pPHPExcel->getProperties()->getCompany());

        // Company
        $objWriter->writeElement('Manager', $pPHPExcel->getProperties()->getManager());

        // LinksUpToDate
        $objWriter->writeElement('LinksUpToDate', 'false');

        // SharedDoc
        $objWriter->writeElement('SharedDoc', 'false');

        // HyperlinksChanged
        $objWriter->writeElement('HyperlinksChanged', 'false');

        // AppVersion
        $objWriter->writeElement('AppVersion', '12.0000');

        $objWriter->endElement();

        // Return
        return $objWriter->getData();
    }
325188
public TCQueryRequest createQuery(Dialog d, boolean dialogTermitationPermission) {
        if (d == null) {
            throw new NullPointerException("Dialog is null");
        }
        TCQueryRequestImpl tcbr = new TCQueryRequestImpl(dialogTermitationPermission);
        tcbr.setDialog(d);
        tcbr.setDestinationAddress(d.getRemoteAddress());
        tcbr.setOriginatingAddress(d.getLocalAddress());
        return tcbr;
    }
1252430
public byte[] sendHeader(OutputStream os, int commandId, int commandStatus,
            int sequenceNumber) throws IOException {
        synchronized (os) {
            return pduSender.sendHeader(os, commandId, commandStatus,
                    sequenceNumber);
        }
    }
762321
public List<JobExecutionEntity> getJobExecutionsRunningLocalToServer(PersistenceServiceUnit psu) {

        final EntityManager em = psu.createEntityManager();
        try {
            List<JobExecutionEntity> exec = new TranRequest<List<JobExecutionEntity>>(em) {
                @Override
                public List<JobExecutionEntity> call() throws Exception {
                    TypedQuery<JobExecutionEntity> query = em.createNamedQuery(JobExecutionEntity.GET_JOB_EXECUTIONS_BY_SERVERID_AND_STATUSES_QUERY,
                                                                               JobExecutionEntity.class);
                    query.setParameter("serverid", batchLocationService.getServerId());
                    query.setParameter("status", RUNNING_STATUSES);
                    List<JobExecutionEntity> result = query.getResultList();
                    if (result == null) {
                        return new ArrayList<JobExecutionEntity>();
                    }
                    return result;
                }
            }.runInNewOrExistingGlobalTran();

            return exec;
        } finally {
            em.close();
        }
    }
808899
@Override
	public com.liferay.commerce.product.model.CPSpecificationOption createCPSpecificationOption(
		long CPSpecificationOptionId) {
		return _cpSpecificationOptionLocalService.createCPSpecificationOption(CPSpecificationOptionId);
	}
661174
public CompensatingTransactionOperationExecutor recordOperation(
            Object[] args) {
        if (args == null || args.length != 3) {
            throw new IllegalArgumentException(
                    "Invalid arguments for bind operation");
        }
        Name dn = LdapTransactionUtils.getFirstArgumentAsName(args);
        Object object = args[1];
        Attributes attributes = null;
        if (args[2] != null && !(args[2] instanceof Attributes)) {
            throw new IllegalArgumentException(
                    "Invalid third argument to bind operation");
        } else if (args[2] != null) {
            attributes = (Attributes) args[2];
        }

        Name temporaryName = renamingStrategy.getTemporaryName(dn);

        return new RebindOperationExecutor(ldapOperations, dn, temporaryName,
                object, attributes);
    }