From 578ad0d6bc408edf9e6c875156054374f5fd8337 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Mon, 22 Mar 2021 18:40:26 +0100 Subject: change to EGIZ codestyle --- .../invoke/CreateCMSSignatureResponseBuilder.java | 50 ++++++++++++---------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateCMSSignatureResponseBuilder.java') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateCMSSignatureResponseBuilder.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateCMSSignatureResponseBuilder.java index aa52fe0..bc5d884 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateCMSSignatureResponseBuilder.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateCMSSignatureResponseBuilder.java @@ -21,7 +21,6 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.server.invoke; import java.util.ArrayList; @@ -34,29 +33,33 @@ import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse; /** * A class to build a CreateCMSSignatureResponse. - * - *

The methods addSignature() and addError() may be + * + *

+ * The methods addSignature() and addError() may be * called in any combination to add CMSignature and * ErrorResponse elements to the response. One of these functions - * must be called at least once to produce a - * CreateCMSSignatureResponse.

- * - *

The getResponseElement() method then returns the - * CreateXMLSignatureResponse built so far.

- * + * must be called at least once to produce a + * CreateCMSSignatureResponse. + *

+ * + *

+ * The getResponseElement() method then returns the + * CreateXMLSignatureResponse built so far. + *

+ * * @author Patrick Peck * @version $Id$ */ public class CreateCMSSignatureResponseBuilder { /** The SPSSFactory for creating API objects. */ - private SPSSFactory factory = SPSSFactory.getInstance(); + private final SPSSFactory factory = SPSSFactory.getInstance(); /** The elements to add to the response. */ - private List responseElements = new ArrayList(); + private final List responseElements = new ArrayList(); /** * Get the CreateCMSSignatureResponse built so far. - * + * * @return The CreateCMSSignatureResponse built so far. */ public CreateCMSSignatureResponse getResponse() { @@ -65,28 +68,29 @@ public class CreateCMSSignatureResponseBuilder { /** * Add a SignatureEnvironment element to the response. - * + * * @param signatureEnvironment The content to put under the - * SignatureEnvironment element. This should either be a - * dsig:Signature element (in case of a detached signature) or - * the signature environment containing the signature (in case of - * an enveloping signature). + * SignatureEnvironment element. This + * should either be a dsig:Signature + * element (in case of a detached signature) or the + * signature environment containing the signature + * (in case of an enveloping signature). */ public void addCMSSignature(String base64value) { - CMSSignatureResponse responseElement = - factory.createCMSSignatureResponse(base64value); + final CMSSignatureResponse responseElement = + factory.createCMSSignatureResponse(base64value); responseElements.add(responseElement); } /** * Add a ErrorResponse element to the response. - * + * * @param errorCode The error code. - * @param info Additional information about the error. + * @param info Additional information about the error. */ public void addError(String errorCode, String info) { - ErrorResponse errorResponse = - factory.createErrorResponse(Integer.parseInt(errorCode), info); + final ErrorResponse errorResponse = + factory.createErrorResponse(Integer.parseInt(errorCode), info); responseElements.add(errorResponse); } -- cgit v1.2.3