diff options
author | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-03-17 18:25:09 +0100 |
---|---|---|
committer | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-03-17 18:25:09 +0100 |
commit | a9fab8fc750f9f31f1354e6d212eed7305f666b1 (patch) | |
tree | ef618a56c68054f74285201a18c6562a09f85470 /id/server/legacy-backup/mw-messages-api/src/main | |
parent | 3dbd5a679a3d695d43729916e2196d2b50b128cf (diff) | |
download | moa-id-spss-a9fab8fc750f9f31f1354e6d212eed7305f666b1.tar.gz moa-id-spss-a9fab8fc750f9f31f1354e6d212eed7305f666b1.tar.bz2 moa-id-spss-a9fab8fc750f9f31f1354e6d212eed7305f666b1.zip |
adding removed modules - backup purpose only - remove it after successful integration
Diffstat (limited to 'id/server/legacy-backup/mw-messages-api/src/main')
2 files changed, 181 insertions, 0 deletions
diff --git a/id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java b/id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java new file mode 100644 index 000000000..fab637408 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java @@ -0,0 +1,52 @@ +/** + * + */ +package eu.stork.vidp.api.messages; + +/** + * Encapsulates the necessary data for a GetAuthDataRequest to a SPWare + * + * @author bzwattendorfer + * + */ +public class GetAuthDataRequest { + + public GetAuthDataRequest() { + } + String sessionID; + + /** + * Constructs a GetAuthDataRequest object + * @param sessionID SessionID + */ + public GetAuthDataRequest(String sessionID) { + super(); + this.sessionID = sessionID; + } + + /** + * Gets the sessionID + * @return sessionID + */ + public String getSessionID() { + return sessionID; + } + + /** + * Sets the session ID + * @param sessionID sessionID + */ + public void setSessionID(String sessionID) { + this.sessionID = sessionID; + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("GetAuthDataRequest ["); + builder.append("sessionID="); + builder.append(sessionID); + builder.append("]"); + return builder.toString(); + } +} diff --git a/id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java b/id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java new file mode 100644 index 000000000..df63afa0e --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java @@ -0,0 +1,129 @@ +/** + * + */ +package eu.stork.vidp.api.messages; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; +import java.util.Arrays; + +/** + * Class encapsulating the HTML content to be returned to the user's browser + * + * @author bzwattendorfer + * + */ +public class StartAuthResponse implements Serializable { + + private int httpStatusCode; + private byte[] content; + private Map<String, String> httpHeaders; + + /** + * Creates a new StartAuthenticationResponse object + * @param httpStatusCode HTTP Status code to be returned to the user's browser + * @param content HTML content to be returned to the user's browser + * @param httpHeaders HTTP headers to be returned to the user's browser + */ + public StartAuthResponse() { + super(); + } + + public StartAuthResponse(int httpStatusCode, byte[] content, + Map<String, String> httpHeaders) { + super(); + this.httpStatusCode = httpStatusCode; + this.content = content; + this.httpHeaders = httpHeaders; + } + + /** + * Creates a new StartAuthenticationResponse object + * @param httpStatusCode HTTP Status code to be returned to the user's browser + * @param content HTML content to be returned to the user's browser + */ + public StartAuthResponse(int httpStatusCode, byte[] content) { + super(); + this.httpStatusCode = httpStatusCode; + this.content = content; + this.httpHeaders = new HashMap<String, String>(); + } + + /** + * Gets the HTTP status code + * @return HTTP status code + */ + public int getHttpStatusCode() { + return httpStatusCode; + } + + /** + * Sets the HTTP status code + * @param httpStatusCode HTTP status code + */ + public void setHttpStatusCode(int httpStatusCode) { + this.httpStatusCode = httpStatusCode; + } + + /** + * Gets the HTML content + * @return HTML content + */ + public byte[] getContent() { + return content; + } + + /** + * Sets the HTML content + * @param content HTML content + */ + public void setContent(byte[] content) { + this.content = content; + } + + /** + * Gets the Map containing the HTTP headers + * @return HTTP header map + */ + public Map<String, String> getHttpHeaders() { + return httpHeaders; + } + + /** + * Sets the Map with HTTP Headers + * @param httpHeaders HTTP Headers Map + */ + public void setHttpHeaders(Map<String, String> httpHeaders) { + this.httpHeaders = httpHeaders; + } + + /** + * Adds a HTTP Header to the Map + * @param key HTTP Header name + * @param value HTTP Header value + */ + public void addHeader(String key, String value) { + } + + /** + * Removes a HTTP Header + * @param key HTTP Header name + */ + public void removeHeader(String key) { + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("StartAuthResponse ["); + builder.append("content="); + builder.append(Arrays.toString(content)); + builder.append(", httpHeaders="); + builder.append(httpHeaders); + builder.append(", httpStatusCode="); + builder.append(httpStatusCode); + builder.append("]"); + return builder.toString(); + } +} |