From a9fab8fc750f9f31f1354e6d212eed7305f666b1 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Mon, 17 Mar 2014 18:25:09 +0100 Subject: adding removed modules - backup purpose only - remove it after successful integration --- id/server/legacy-backup/mw-messages-api/.classpath | 27 +++++ id/server/legacy-backup/mw-messages-api/.gitignore | 1 + id/server/legacy-backup/mw-messages-api/.project | 36 ++++++ .../.settings/org.eclipse.core.resources.prefs | 5 + .../.settings/org.eclipse.jdt.core.prefs | 8 ++ .../.settings/org.eclipse.m2e.core.prefs | 4 + .../.settings/org.eclipse.wst.common.component | 6 + .../org.eclipse.wst.common.project.facet.core.xml | 5 + .../.settings/org.eclipse.wst.validation.prefs | 2 + .../mw-messages-api/mw-messages-api.iml | 17 +++ .../mw-messages-api/nb-configuration.xml | 18 +++ id/server/legacy-backup/mw-messages-api/pom.xml | 65 +++++++++++ .../vidp/api/messages/GetAuthDataRequest.java | 52 +++++++++ .../stork/vidp/api/messages/StartAuthResponse.java | 129 +++++++++++++++++++++ .../eu/stork/mw/core/mwmessagesapi/AppTest.java | 38 ++++++ 15 files changed, 413 insertions(+) create mode 100644 id/server/legacy-backup/mw-messages-api/.classpath create mode 100644 id/server/legacy-backup/mw-messages-api/.gitignore create mode 100644 id/server/legacy-backup/mw-messages-api/.project create mode 100644 id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.core.resources.prefs create mode 100644 id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.jdt.core.prefs create mode 100644 id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.m2e.core.prefs create mode 100644 id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.component create mode 100644 id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.validation.prefs create mode 100644 id/server/legacy-backup/mw-messages-api/mw-messages-api.iml create mode 100644 id/server/legacy-backup/mw-messages-api/nb-configuration.xml create mode 100644 id/server/legacy-backup/mw-messages-api/pom.xml create mode 100644 id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java create mode 100644 id/server/legacy-backup/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java create mode 100644 id/server/legacy-backup/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java (limited to 'id/server/legacy-backup/mw-messages-api') diff --git a/id/server/legacy-backup/mw-messages-api/.classpath b/id/server/legacy-backup/mw-messages-api/.classpath new file mode 100644 index 000000000..c15838fd0 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/id/server/legacy-backup/mw-messages-api/.gitignore b/id/server/legacy-backup/mw-messages-api/.gitignore new file mode 100644 index 000000000..ea8c4bf7f --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.gitignore @@ -0,0 +1 @@ +/target diff --git a/id/server/legacy-backup/mw-messages-api/.project b/id/server/legacy-backup/mw-messages-api/.project new file mode 100644 index 000000000..cc4d05bc1 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.project @@ -0,0 +1,36 @@ + + + mw-messages-api + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.core.resources.prefs b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..839d647ee --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.jdt.core.prefs b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..45a6e0e0d --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.m2e.core.prefs b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.component b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.component new file mode 100644 index 000000000..ec983b870 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.component @@ -0,0 +1,6 @@ + + + + + + diff --git a/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 000000000..a1f6907b8 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.validation.prefs b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 000000000..04cad8cb7 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/id/server/legacy-backup/mw-messages-api/mw-messages-api.iml b/id/server/legacy-backup/mw-messages-api/mw-messages-api.iml new file mode 100644 index 000000000..df1c138c5 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/mw-messages-api.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/id/server/legacy-backup/mw-messages-api/nb-configuration.xml b/id/server/legacy-backup/mw-messages-api/nb-configuration.xml new file mode 100644 index 000000000..c51afd41b --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + JDK_1.5 + + diff --git a/id/server/legacy-backup/mw-messages-api/pom.xml b/id/server/legacy-backup/mw-messages-api/pom.xml new file mode 100644 index 000000000..0e930ff52 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + MOA.id + mw-messages-api + jar + 2.0 + mw-messages-api + http://maven.apache.org + + hudson + https://vidp.openlimit.com:8120/hudson/job/mw-messages-api/ + + + + central + STORK-releases + https://vidp.openlimit.com:8120/artifactory/libs-release-local + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.5 + 1.5 + ${project.build.sourceEncoding} + + + + org.apache.maven.plugins + maven-resources-plugin + 2.4 + + ${project.build.sourceEncoding} + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + config/sun_checks.xml + + + + + + + + junit + junit + 3.8.1 + test + + + + UTF-8 + + + + + 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 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 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(); + } + + /** + * 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 getHttpHeaders() { + return httpHeaders; + } + + /** + * Sets the Map with HTTP Headers + * @param httpHeaders HTTP Headers Map + */ + public void setHttpHeaders(Map 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(); + } +} diff --git a/id/server/legacy-backup/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java b/id/server/legacy-backup/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java new file mode 100644 index 000000000..8845aa855 --- /dev/null +++ b/id/server/legacy-backup/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java @@ -0,0 +1,38 @@ +package eu.stork.mw.core.mwmessagesapi; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} -- cgit v1.2.3