Search in sources :

Example 1 with EbicsNoPubKeyDigestsRequest

use of com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest in project axelor-open-suite by axelor.

the class EbicsXmlFactory method createEbicsNoPubKeyDigestsRequestDocument.

/**
 * Creates a new <code>EbicsNoPubKeyDigestsRequestDocument</code> XML object
 *
 * @param ebicsNoPubKeyDigestsRequest the <code>EbicsNoPubKeyDigestsRequest</code> element
 * @return the <code>EbicsNoPubKeyDigestsRequestDocument</code> XML object
 */
public static EbicsNoPubKeyDigestsRequestDocument createEbicsNoPubKeyDigestsRequestDocument(EbicsNoPubKeyDigestsRequest ebicsNoPubKeyDigestsRequest) {
    EbicsNoPubKeyDigestsRequestDocument newEbicsNoPubKeyDigestsRequestDocument = EbicsNoPubKeyDigestsRequestDocument.Factory.newInstance();
    newEbicsNoPubKeyDigestsRequestDocument.setEbicsNoPubKeyDigestsRequest(ebicsNoPubKeyDigestsRequest);
    return newEbicsNoPubKeyDigestsRequestDocument;
}
Also used : EbicsNoPubKeyDigestsRequestDocument(com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument)

Example 2 with EbicsNoPubKeyDigestsRequest

use of com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest in project axelor-open-suite by axelor.

the class EbicsXmlFactory method createEbicsNoPubKeyDigestsRequest.

// -----------------------------------------------------------------------------------------------------------------------------------------------
/**
 * Creates a new <code>EbicsNoPubKeyDigestsRequest</code> XML object
 *
 * @param revision the default revision
 * @param version the default version
 * @param header the <code>
 *     com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header
 *     </code> element
 * @param body the <code>
 *     com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Body
 *     </code> element
 * @return the <code>EbicsNoPubKeyDigestsRequest</code> XML object
 */
public static EbicsNoPubKeyDigestsRequest createEbicsNoPubKeyDigestsRequest(int revision, String version, com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header header, com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Body body) {
    EbicsNoPubKeyDigestsRequest newEbicsNoPubKeyDigestsRequest = EbicsNoPubKeyDigestsRequest.Factory.newInstance();
    newEbicsNoPubKeyDigestsRequest.setRevision(revision);
    newEbicsNoPubKeyDigestsRequest.setVersion(version);
    newEbicsNoPubKeyDigestsRequest.setHeader(header);
    newEbicsNoPubKeyDigestsRequest.setBody(body);
    return newEbicsNoPubKeyDigestsRequest;
}
Also used : EbicsNoPubKeyDigestsRequest(com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest)

Example 3 with EbicsNoPubKeyDigestsRequest

use of com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest in project axelor-open-suite by axelor.

the class NoPubKeyDigestsRequestElement method build.

@Override
public void build() throws AxelorException {
    EbicsNoPubKeyDigestsRequest request;
    Body body;
    Header header;
    EmptyMutableHeaderType mutable;
    NoPubKeyDigestsRequestStaticHeaderType xstatic;
    ProductElementType product;
    OrderDetailsType orderDetails;
    EbicsUser ebicsUser = session.getUser();
    EbicsPartner ebicsPartner = ebicsUser.getEbicsPartner();
    OrderAttribute orderAttribute = new OrderAttribute(OrderType.HPB, ebicsPartner.getEbicsTypeSelect());
    orderAttribute.build();
    product = EbicsXmlFactory.creatProductElementType(session.getProduct().getLanguage(), session.getProduct().getName());
    orderDetails = EbicsXmlFactory.createOrderDetailsType(orderAttribute.getOrderAttributes(), null, OrderType.HPB.getOrderType());
    xstatic = EbicsXmlFactory.createNoPubKeyDigestsRequestStaticHeaderType(session.getBankID(), EbicsUtils.generateNonce(), Calendar.getInstance(), ebicsPartner.getPartnerId(), ebicsUser.getUserId(), product, orderDetails, ebicsUser.getSecurityMedium());
    mutable = EbicsXmlFactory.createEmptyMutableHeaderType();
    header = EbicsXmlFactory.createDigestsRequestHeader(true, mutable, xstatic);
    body = EbicsXmlFactory.createDigestsRequestBody();
    request = EbicsXmlFactory.createEbicsNoPubKeyDigestsRequest(1, "H003", header, body);
    document = EbicsXmlFactory.createEbicsNoPubKeyDigestsRequestDocument(request);
}
Also used : OrderDetailsType(com.axelor.apps.account.ebics.schema.h003.OrderDetailsType) Header(com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header) EbicsNoPubKeyDigestsRequest(com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest) EbicsUser(com.axelor.apps.bankpayment.db.EbicsUser) OrderAttribute(com.axelor.apps.bankpayment.ebics.client.OrderAttribute) ProductElementType(com.axelor.apps.account.ebics.schema.h003.ProductElementType) EbicsPartner(com.axelor.apps.bankpayment.db.EbicsPartner) Body(com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Body) NoPubKeyDigestsRequestStaticHeaderType(com.axelor.apps.account.ebics.schema.h003.NoPubKeyDigestsRequestStaticHeaderType) EmptyMutableHeaderType(com.axelor.apps.account.ebics.schema.h003.EmptyMutableHeaderType)

Aggregations

EbicsNoPubKeyDigestsRequest (com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest)2 EbicsNoPubKeyDigestsRequestDocument (com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument)1 Body (com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Body)1 Header (com.axelor.apps.account.ebics.schema.h003.EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header)1 EmptyMutableHeaderType (com.axelor.apps.account.ebics.schema.h003.EmptyMutableHeaderType)1 NoPubKeyDigestsRequestStaticHeaderType (com.axelor.apps.account.ebics.schema.h003.NoPubKeyDigestsRequestStaticHeaderType)1 OrderDetailsType (com.axelor.apps.account.ebics.schema.h003.OrderDetailsType)1 ProductElementType (com.axelor.apps.account.ebics.schema.h003.ProductElementType)1 EbicsPartner (com.axelor.apps.bankpayment.db.EbicsPartner)1 EbicsUser (com.axelor.apps.bankpayment.db.EbicsUser)1 OrderAttribute (com.axelor.apps.bankpayment.ebics.client.OrderAttribute)1