diff --git a/README.md b/README.md
index 0af29072..f3399fcb 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,3 @@ See the [wiki associated with this repository](https://github.com/Access4Learnin
* contributing to this framework
* the Java coding style to be used and
* the structure of the SIF 3 Framework repositories
-
-
-
diff --git a/SIF3InfraREST/.classpath b/SIF3InfraREST/.classpath
deleted file mode 100644
index 70375fc7..00000000
--- a/SIF3InfraREST/.classpath
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SIF3InfraREST/.gitignore b/SIF3InfraREST/.gitignore
index e3846609..47aa8c95 100644
--- a/SIF3InfraREST/.gitignore
+++ b/SIF3InfraREST/.gitignore
@@ -1 +1,6 @@
/backup
+/.settings/
+/.project
+/.classpath
+/bin/
+
diff --git a/SIF3InfraREST/.project b/SIF3InfraREST/.project
deleted file mode 100644
index 764279c5..00000000
--- a/SIF3InfraREST/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- SIF3InfraREST
-
-
-
-
-
- org.eclipse.wst.jsdt.core.javascriptValidator
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.wst.common.project.facet.core.builder
-
-
-
-
- org.eclipse.wst.validation.validationbuilder
-
-
-
-
-
- org.eclipse.jem.workbench.JavaEMFNature
- org.eclipse.wst.common.modulecore.ModuleCoreNature
- org.eclipse.wst.common.project.facet.core.nature
- org.eclipse.jdt.core.javanature
- org.eclipse.wst.jsdt.core.jsNature
-
-
diff --git a/SIF3InfraREST/.settings/.jsdtscope b/SIF3InfraREST/.settings/.jsdtscope
deleted file mode 100644
index a9827158..00000000
--- a/SIF3InfraREST/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SIF3InfraREST/.settings/org.eclipse.ltk.core.refactoring.prefs b/SIF3InfraREST/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index cfcd1d3c..00000000
--- a/SIF3InfraREST/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/SIF3InfraREST/.settings/org.eclipse.wst.common.component b/SIF3InfraREST/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 7a319bbd..00000000
--- a/SIF3InfraREST/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SIF3InfraREST/.settings/org.eclipse.wst.common.project.facet.core.xml b/SIF3InfraREST/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 146117dd..00000000
--- a/SIF3InfraREST/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/SIF3InfraREST/.settings/org.eclipse.wst.jsdt.ui.superType.container b/SIF3InfraREST/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a4..00000000
--- a/SIF3InfraREST/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/SIF3InfraREST/.settings/org.eclipse.wst.jsdt.ui.superType.name b/SIF3InfraREST/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6..00000000
--- a/SIF3InfraREST/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/SIF3InfraREST/DB/.gitignore b/SIF3InfraREST/DB/.gitignore
new file mode 100644
index 00000000..95e8b92f
--- /dev/null
+++ b/SIF3InfraREST/DB/.gitignore
@@ -0,0 +1,2 @@
+/SIF3InfrastructureERM.mwb
+/SIF3InfrastructureERM.mwb.bak
diff --git a/SIF3InfraREST/META-INF/.gitignore b/SIF3InfraREST/META-INF/.gitignore
new file mode 100644
index 00000000..4854a41b
--- /dev/null
+++ b/SIF3InfraREST/META-INF/.gitignore
@@ -0,0 +1 @@
+/MANIFEST.MF
diff --git a/SIF3InfraREST/README.md b/SIF3InfraREST/README.md
new file mode 100644
index 00000000..a274f1b9
--- /dev/null
+++ b/SIF3InfraREST/README.md
@@ -0,0 +1,160 @@
+# License
+> Copyright 2014 - 2016 Systemic Pty Ltd
+>
+> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+>
+> [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0 "Apache License, Version 2.0")
+>
+> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+
+# Summary
+The SIF3 Framework is a Java Framework that enables developers to efficiently implement SIF3 services (consumers and/or providers). It fully encapsulates the low level SIF3 infrastructure. It also provides a basic environment provider which is core to SIF3.
+
+The framework has some basic demo classes that illustrate how to use the framework. It also has a developer's guide that can be found in the "documentation/UserGuide" directory.
+
+There is a set of pre-built framework libraries in the "release" directory. Please refer to the developer's guide for more details an the libraries.
+
+# Maven
+As of version 0.10.0 the SIF3 Framework is a multi-module Maven project. It is important to note that the SIF3
+Framework is not yet available in a global maven repository. For more details about the maven build and how it can
+be used within other maven projects refer to the developer's guide section **"3.3.1. Framework Libraries Build"** and
+**"3.3.2. Maven Coordinates"** and its sub-sections. Once you understand these sections and have performed appropriate
+actions to have the SIF3 Framework in an accessible repository you can use the following dependency in your own SIF3
+Project (note that the version number will change over time):
+```xml
+
+ sif3.framework
+ sif3-infra-rest
+ 0.10.0
+
+```
+
+# Version History and Update
+## Version from 26/11/2013
+If you have downloaded the framework before Nov 26, 2013 and get an updated version after this date you must perform a few steps to make the framework function correctly. There are NO code changes only configuration changes.
+
+### Step 1:
+Remove all environment XML files in the provider's and consumer's 'workstore' and all XML files in the provider's environment store under the 'any' directory. Please refer to the developer's guide section 5.3.1.1.2 (consumer) and 5.3.1.1.3 (provider) for details where the 'workstore' is located for both these components.
+
+### Step 2:
+Open all environment XML files in the provider's 'template' directory. Note if you have more than one provider configured then you must open the files in all provider's 'template' directories. Please refer to the developer's guide section 5.3.1.1.3 for details about the location of the 'template' directory. Each environment XML file has a section with the name ``. Replace that entire section with the following XML:
+```xml
+
+ environments
+ requests
+ provision
+ queues
+ subscriptions
+
+```
+For details about that XML snipped please see section 5.3.1.1.3 in the developer's guide, paragraph with the title 'Infrastructure Service URIs'.
+
+### Step 3:
+Open the provider's properties file (i.e. StudentProvider.properties). For each environment the provider supports add the following new property:
+```
+env.connector.url=
+```
+
+``: The base URI of the provider. This is the value that used to be in the `` node of each service. (i.e. http://localhost:9080/SIF3InfraREST/sif3). Also refer to section 8 and 9 of the developer's guide for details about this property.
+
+## Version from 10/12/2013
+If you have downloaded the framework before Nov 26, 2013 and get an updated version after this date you must perform all the steps listed in the "Version from 26/11/2013" first.
+
+This latest version of the framework has the HTTPS (secured connections) capability added. It is recommended that you read section "5.10 Security - HTTPS Configuration" of the Developer's Guide first.
+
+## Version from 03/01/2014
+Modified some underlying classes to include all header fields as specified in the latest SIF3 specification. Also implemented the Bulk Delete which is now managed via a HTTP PUT and an appropriate header field.
+
+Also added the functionality for more rigorous ACL checks before any REST calls are made. Before each REST call the consumer checks if access to the call is APPROVED (looking up ACLs in the environment XML). To disable or enable this ACL check please refer to the Developer's Guide and read up on the 'adapter.checkACL' property for the consumer and/or provider.
+
+Please note that with this latest download the Provider Interface has an additional parameter for the two create operation. **Your code may break!** Add the parameter 'boolean useAdvisory' to your provider classes were you may get a compile error. Please refer to the latest SIF3 Specification for details what this value means.
+
+## Version from 17/05/2014: MAJOR UPDATE
+**NOTE: THIS IS A MAJOR UPDATE TO THE FRAMEWORK. THE JAR FILES IN THE RELEASE DIRECTORY SHOULD HAVE A VERSION OF v0.2-alpha.**
+
+You should read through the installation instructions in the Developer's Guide in the directory documentation/UserGuide(SIF3Framework_DevelopersGuide_v0.6.2.docx). If you have developed some consumer and/or provider classes in the past and you want to use them you may have to change some of the method signatures to fix them up. Also neither the consumer nor the provider constructor take any arguments anymore. The management of environments and their templates has changed significantly and may need some re-configuring. Please refer to the Developer's Guide for details (section 5.3).
+
+## Version from 12/08/2014: v0.3
+This version updates the framework from version 0.2 to version 0.3. The latest jar files can be found in the "release" directory. Also upgrade instructions can be found in the directory "release/v0.3".
+Major Changes in this version include:
+- Bug Fixes (i.e. use header fields for paging information rather than query parameters)
+- Ability for a DIRECT provider to deal with multiple environment templates. For details refer to section 5.3.1.3
+ in the Developer's Guide.
+- Updated AU 1.3 SIF data model to cater for latest changes to time table objects.
+
+## Version from 11/09/2014: v0.3.1 - Minor update to above
+The provider interface class has changed which enforces an additional parameter on all methods. All object provider classes that extend the BaseProvider or BaseEventProvider must add the parameter "RequestMetadata metadata" to all methods. This new parameter allows the object provider to get access to some additional metadata relating to each request. For details about the new parameter as well Provider Interface class please refer to the javadoc.
+
+Details about the changes and how to incorporate them into your code can be found in the directory "release/v0.3.1".
+
+## Version from 14/10/2014: v0.3.2 - Minor Changes (Bug Fixes)
+This minor version update includes a couple of minor bug fixes and a couple of improvements to the framework. The changes will not affect the developer's code base. Simply drop the new libraries into your project to get the changes and bug fixes.
+
+Details of this release can be found in the directory "release/v0.3.2".
+
+## Version from December 2, 2014: v0.4.0 - Various changes
+This version update includes a few new bits of functionality, namely support for JSON as well as some restructuring of the data model generation. The AU 1.3 Datamodel is no longer part of this project but part of a new GitHub project called SIF3DMGenerator.
+
+Details of this release can be found in the directory "release/v0.4.0".
+
+## Version from March 03, 2015: v0.5.0 - Various changes
+Version 0.5.0 has a couple important new features. They include support for SIF 3.x Service Path functionality and support for External Security Services (DIRECT Provider only). The later is not yet part of the SIF 3.0.1 specification and it should be used with care as it is experimental at this stage. The DB structure for the SIF3_SESSION table has changed and therefore a database update script must be run to upgrade the previous version of the framework to this version.
+
+Details of this release including upgrade instructions can be found
+in the directory "release/v0.5.0".
+
+## Version from June 16, 2015: v0.6.0 - Various changes
+Version 0.6.0 adds an auditing framework for providers to the SIF3 Framework. This is an optional feature. Further this new version requires all providers to be deployed in a web-/application container that supports
+the servlet 3.0 specification. There are additional changes, additions, bug fixes etc. in the latest version of the SIF3 Framework.
+
+Please refer to the release notes in the directory "release/v0.6.0" for details.
+
+## Version from Dec 17, 2015: v0.7.0 - Various changes
+Version 0.7.0 adds payload compression capabilities to all request/responses. This is an optional feature. Further the infrastructure data model is now in its own jar file rather than part of the infra-common jar file. It has also switched to infrastructure version 3.1. The major change relates to consumers. This framework version supports DELAYED request/responses. Finally support for external security services for consumers has been added as well.
+
+Please refer to the release notes in the directory "release/v0.7.0" for additional details and upgrade instructions.
+
+## Version from Mar 17, 2016: v0.8.0 - Various changes
+Adding support for some SIF 3.2 Infrastructure functionality:
+ - HTTP HEAD supported for 'root' object service (i.e. .../StudentPersonals).
+ - "Changes Since" support for Object Providers.
+
+Upgraded some core libraries to later versions.
+
+Please refer to the release notes in the directory "release/v0.8.0" for additional details and upgrade instructions.
+
+## Version from May 24, 2016: v0.9.0 - Various changes
+___
+**AS OF THIS VERSION ALL FRAMEWORK LIBRARIES ARE COMPILED WITH JAVA 7. THE FRAMEWORK MAY NO LONGER SUPPORT OR RUN ON JAVA 6 ENVIRONMENTS.**
+___
+- Made some method for "Changes Since" functionality more flexible.
+- Allow hibernate properties to be "injected".
+
+Please refer to the release notes in the directory "release/v0.9.0" for additional details and upgrade instructions.
+
+## Version from Dec 20, 2016: v0.10.0 - Various changes
+___
+**AS OF THIS VERSION THE FRAMEWORK USES MAVEN AS THE BUILD MECHANISM INSTEAD OF ANT. THE DEVELOPER'S GUIDE HAS
+ BEEN UPDATED TO REFLECT THIS. PLEASE REFER TO THE RELEASE NOTES FOR ADDITIONAL INFORMATION ON HOW TO UPGRADE
+ THE FRAMEWORK YOU MAY HAVE DOWNLOADED AND IMPORTED TO YOUR IDE OF CHOICE.**
+___
+
+Additional changes to the framework include:
+- Some small bug fixes in relation to external security services.
+- Added new parameter called customResponseParams to **ALL** provider side interface methods. **_THIS WILL BREAK YOUR CODE_**. There is a
+ very easy change to your code to fix the compile errors. See Relaese_Notes_v0.10.0.txt in the release/v0.10.0 directory.
+- Removed dependency on systemic-framework_.jar. Applicable classes of that library are now part of the framework.
+
+Please refer to the release notes in the directory "release/v0.10.0" for additional details and upgrade instructions.
+
+# Download Instructions
+How to download this project:
+
+## Option 1 - As a Zip.
+Click on the button marked "ZIP" available from the Code tab.
+
+## Option 2 - Using a Git client.
+From the command-line type: git clone https://github.com/Access4Learning/sif3-framework-java.git
+
+Note that if you want to use this option but don't have the client installed, it can be
+downloaded from http://git-scm.com/download.
diff --git a/SIF3InfraREST/README.txt b/SIF3InfraREST/README.txt
deleted file mode 100644
index 3abca606..00000000
--- a/SIF3InfraREST/README.txt
+++ /dev/null
@@ -1,216 +0,0 @@
-#########################################################################################################
-# Copyright 2013-2016 Systemic Pty Ltd
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software distributed under the License
-# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-# or implied.
-# See the License for the specific language governing permissions and limitations under the License.
-########################################################################################################
-
-#########################################################################################################
-# Summary
-#########################################################################################################
-
-The SIF3 Framework is a Java Framework that enables developers to efficiently implement SIF3
-services (consumers and/or providers). It fully encapsulates the low level SIF3 infrastructure. It also
-provides a basic environment provider which is core to SIF3.
-
-The framework has some basic demo classes that illustrate how to use the framework. It also has a
-developer's guide that can be found in the "documentation/UserGuide" directory.
-
-There is a set of pre-built framework libraries in the "release" directory. Please refer to the developer's
-guide for more details an the libraries.
-
-#########################################################################################################
-# Version History and Update
-#########################################################################################################
-
-=======================
-Version from 26/11/2013
-=======================
-If you have downloaded the framework before Nov 26, 2013 and get an updated version after this date
-you must perform a few steps to make the framework function correctly. There are NO code changes only
-configuration changes.
-
-Step 1:
--------
-Remove all environment XML files in the provider's and consumer's 'workstore' and all XML files in the provider's
-environment store under the 'any' directory. Please refer to the developer's guide section 5.3.1.1.2 (consumer)
-and 5.3.1.1.3 (provider) for details where the 'workstore' is located for both these components.
-
-Step 2:
--------
-Open all environment XML files in the provider's 'template' directory. Note if you have more than one provider
-configured then you must open the files in all provider's 'template' directories. Please refer to the developer's
-guide section 5.3.1.1.3 for details about the location of the 'template' directory. Each environment XML file
-has a section with the name . Replace that entire section with the following XML:
-
-
- environments
- requests
- provision
- queues
- subscriptions
-
-
-For details about that XML snipped please see section 5.3.1.1.3 in the developer's guide, paragraph with the title
-'Infrastructure Service URIs'.
-
-Step 3:
-------
-Open the provider's properties file (i.e. StudentProvider.properties). For each environment the provider supports
-add the following new property:
-
-env.connector.url=
-
-: The base URI of the provider. This is the value that used to be in the node
- of each service. (i.e. http://localhost:9080/SIF3InfraREST/sif3).
- Also refer to section 8 and 9 of the developer's guide for details about this property.
-
-=======================
-Version from 10/12/2013
-=======================
-If you have downloaded the framework before Nov 26, 2013 and get an updated version after this date you must perform
-all the steps listed in the "Version from 26/11/2013" first.
-
-This latest version of the framework has the HTTPS (secured connections) capability added. It is recommended
-that you read section "5.10 Security - HTTPS Configuration" of the Developer's Guide first.
-
-=======================
-Version from 03/01/2014
-=======================
-Modified some underlying classes to include all header fields as specified in the latest SIF3 specification. Also
-implemented the Bulk Delete which is now managed via a HTTP PUT and an appropriate header field.
-Also added the functionality for more rigorous ACL checks before any REST calls are made. Before each REST call
-the consumer checks if access to the call is APPROVED (looking up ACLs in the environment XML). To disable or enable
-this ACL check please refer to the Developer's Guide and read up on the 'adapter.checkACL' property for the consumer
-and/or provider.
-
-Please note that with this latest download the Provider Interface has an additional parameter for the two create operation.
-Your code may break! Add the parameter 'boolean useAdvisory' to your provider classes were you may get a compile error.
-Please refer to the latest SIF3 Specification for details what this value means.
-
-=====================================
-Version from 17/05/2014: MAJOR UPDATE
-=====================================
-NOTE:
-THIS IS A MAJOR UPDATE TO THE FRAMEWORK. THE JAR FILES IN THE RELEASE DIRECTORY SHOULD HAVE A VERSION OF v0.2-alpha.
-
-You should read through the installation instructions in the Developer's Guide in the directory
-documentation/UserGuide(SIF3Framework_DevelopersGuide_v0.6.2.docx). If you have developed some consumer and/or provider
-classes in the past and you want to use them you may have to change some of the method signatures to fix them up. Also
-neither the consumer nor the provider constructor take any arguments anymore. The management of environments and their
-templates has changed significantly and may need some re-configuring. Please refer to the Developer's Guide for
-details (section 5.3).
-
-=====================================
-Version from 12/08/2014: v0.3
-=====================================
-This version updates the framework from version 0.2 to version 0.3. The latest jar files can be found in the
-"release" directory. Also upgrade instructions can be found in the directory "release/v0.3".
-Major Changes in this version include:
-- Bug Fixes (i.e. use header fields for paging information rather than query parameters)
-- Ability for a DIRECT provider to deal with multiple environment templates. For details refer to section 5.3.1.3
- in the Developer's Guide.
-- Updated AU 1.3 SIF data model to cater for latest changes to time table objects.
-
-=======================================================
-Version from 11/09/2014: v0.3.1 - Minor update to above
-=======================================================
-The provider interface class has changed which enforces an additional parameter on all methods. All object provider
-classes that extend the BaseProvider or BaseEventProvider must add the parameter "RequestMetadata metadata" to all
-methods. This new parameter allows the object provider to get access to some additional metadata relating to each
-request. For details about the new parameter as well Provider Interface class please refer to the javadoc.
-Details about the changes and how to incorporate them into your code can be found in the directory "release/v0.3.1".
-
-=============================================================
-Version from 14/10/2014: v0.3.2 - Minor Changes (Bug Fixes)
-=============================================================
-This minor version update includes a couple of minor bug fixes and a couple of improvements to the
-framework. The changes will not affect the developer's code base. Simply drop the new libraries into
-your project to get the changes and bug fixes.
-Details of this release can be found in the directory "release/v0.3.2".
-
-=============================================================
-Version from December 2, 2014: v0.4.0 - Various changes
-=============================================================
-This version update includes a few new bits of functionality, namely support for JSON as well as some restructuring
-of the data model generation. The AU 1.3 Datamodel is no longer part of this project but part of a new GitHub project
-called SIF3DMGenerator.
-Details of this release can be found in the directory "release/v0.4.0".
-
-=============================================================
-Version from March 03, 2015: v0.5.0 - Various changes
-=============================================================
-Version 0.5.0 has a couple important new features. They include support for SIF 3.x Service Path functionality and
-support for External Security Services (DIRECT Provider only). The later is not yet part of the SIF 3.0.1
-specification and it should be used with care as it is experimental at this stage. The DB structure for the
-SIF3_SESSION table has changed and therefore a database update script must be run to upgrade the previous
-version of the framework to this version. Details of this release including upgrade instructions can be found
-in the directory "release/v0.5.0".
-
-=============================================================
-Version from June 16, 2015: v0.6.0 - Various changes
-=============================================================
-Version 0.6.0 adds an auditing framework for providers to the SIF3 Framework. This is an optional feature.
-Further this new version requires all providers to be deployed in a web-/application container that supports
-the servlet 3.0 specification.
-There are additional changes, additions, bug fixes etc. in the latest version of the SIF3 Framework. Please refer
-to the release notes in the directory "release/v0.6.0" for details.
-
-=============================================================
-Version from Dec 17, 2015: v0.7.0 - Various changes
-=============================================================
-Version 0.7.0 adds payload compression capabilities to all request/responses. This is an optional feature.
-Further the infrastructure data model is now in its own jar file rather than part of the infra-common jar file.
-It has also switched to infrastructure version 3.1.
-The major change relates to consumers. This framework version supports DELAYED request/responses.
-Finally support for external security services for consumers has been added as well.
-Please refer to the release notes in the directory "release/v0.7.0" for additional details and upgrade instructions.
-
-=============================================================
-Version from Mar 17, 2016: v0.8.0 - Various changes
-=============================================================
-Adding support for some SIF 3.2 Infrastructure functionality:
- - HTTP HEAD supported for 'root' object service (i.e. .../StudentPersonals).
- - "Changes Since" support for Object Providers.
-Please refer to the release notes in the directory "release/v0.8.0" for additional details and upgrade instructions.
-Upgraded some core library to later versions.
-
-=============================================================
-Version from May 24, 2016: v0.9.0 - Various changes
-=============================================================
-
-****************************************************************************************************
-* AS OF THIS VERSION ALL FRAMEWORK LIBRARIES ARE COMPILED WITH JAVA 7. THE FRAMEWORK MAY NO LONGER *
-* SUPPORT OR RUN ON JAVA 6 ENVIRONMENTS. *
-****************************************************************************************************
-
-- Made some method for "Changes Since" functionality more flexible.
-- Allow hibernate properties to be "injected".
-Please refer to the release notes in the directory "release/v0.9.0" for additional details and upgrade instructions.
-
-
-#########################################################################################################
-# Download Instructions
-#########################################################################################################
-
-How to download this project:
-
-Option 1 - As a Zip.
-====================
-Click on the button marked "ZIP" available from the Code tab.
-
-
-Option 2 - Using a Git client.
-==============================
-From the command-line type: git clone git://github.com/nsip/sif3-framework-java.git
-
-Note that if you want to use this option but don't have the client installed, it can be
-downloaded from http://git-scm.com/download.
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/.gitignore b/SIF3InfraREST/SIF3Demo/sif3-demo-web/.gitignore
new file mode 100644
index 00000000..ea6ab823
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/.gitignore
@@ -0,0 +1,5 @@
+/target/
+/.settings/
+/.classpath
+/.project
+/bin/
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/pom.xml b/SIF3InfraREST/SIF3Demo/sif3-demo-web/pom.xml
new file mode 100644
index 00000000..f6737d6d
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/pom.xml
@@ -0,0 +1,172 @@
+
+ 4.0.0
+
+
+
+
+ sif3.framework
+ sif3-demo-web
+ war
+ 0.10.0-Demo
+ SIF3 Demo Provider
+
+
+
+
+
+ UTF-8
+
+
+ 1.7
+ 1.7
+
+
+
+ ${project.basedir}/../../lib
+
+
+ ${project.lib.dir}/datamodel
+
+
+ true
+
+
+
+
+
+
+
+
+
+ sif3.framework
+ sif3-infra-rest
+ 0.10.0-beta
+
+
+
+
+
+
+
+ sifau
+ sif3-au-datamodel
+ 3.4
+
+
+
+
+
+
+ com.github.ziplet
+ ziplet
+ 2.1.2
+
+
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ 1.5.8
+
+
+
+ log4j
+ log4j
+ 1.2.14
+
+
+
+
+
+
+
+ jdbc
+ mysql-jdbc
+ 4.0
+
+
+ jdbc
+ oracle-jdbc
+ 6.0
+
+
+ jdbc
+ sqlite-jdbc
+ 3.7.2
+
+
+
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.0.1
+ provided
+
+
+
+
+
+
+
+ com.sun.jersey
+ jersey-server
+ 1.19
+
+
+
+ com.sun.jersey
+ jersey-servlet
+ 1.19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.19.1
+
+ ${skipTests}
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+
+
+ true
+ true
+ demo
+
+
+
+
+ SIF3InfraREST
+
+
+ This is the Demo Provider project to show case how to use the framework. It also has test consumer code.
+
diff --git a/SIF3InfraREST/scripts/service/startConsumer.bat b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/startConsumer.bat
similarity index 100%
rename from SIF3InfraREST/scripts/service/startConsumer.bat
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/startConsumer.bat
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/startConsumer.sh b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/startConsumer.sh
new file mode 100644
index 00000000..f200cef3
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/startConsumer.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+##############################
+# Some environment variables
+##############################
+
+CURRENT_DIR=`pwd`
+
+VER=-v0.2-alpha
+BASE_PATH=../..
+LIB_PATH=$BASE_PATH/lib
+CONFIG_PATH=$BASE_PATH/config
+
+#
+# Sydney Amazon cloud
+#
+JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64
+
+
+####################################
+# Configuration Files
+####################################
+cd $CONFIG_PATH
+THIS_DIR=`pwd`
+CONFIG_FILES=$THIS_DIR:$THIS_DIR/hibernate:$THIS_DIR/consumers
+
+cd $CURRENT_DIR
+
+####################################
+# JVM settings for proxy tunneling
+####################################
+JVM_SETTINGS=
+#JVM_SETTINGS="${JVM_SETTINGS} -Dhttp.proxyHost=10.1.81.5 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=10.1.81.5 -Dhttps.proxyPort=8080"
+
+####################################
+# JVM settings for ignore proxy IPs
+####################################
+#NO_PROXY=-Dhttp.nonProxyHosts="\"test-jcaps.det.wa.edu.au|test-jcaps|10.1.147.210|jcaps.det.wa.edu.au|jcaps|10.1.144.22\""
+JVM_SETTINGS="${JVM_SETTINGS} ${NO_PROXY}"
+
+
+##############################
+# JVM Memory settings
+##############################
+JVM_SETTINGS="${JVM_SETTINGS} -Xms128m -Xmx512m -Xss256k -XX:MaxPermSize=64m"
+
+#######################################
+# Class Path including all libraries
+#######################################
+SERVICE_CLASS_PATH=
+
+cd $LIB_PATH
+THIS_DIR=`pwd`
+jarfiles=`find $THIS_DIR -name "*.jar"`
+cd $CURRENT_DIR
+
+for jarfile in $jarfiles;
+do
+ SERVICE_CLASS_PATH="${SERVICE_CLASS_PATH}:${jarfile}"
+done
+
+#########################################
+# Add config directories to classpath
+#########################################
+SERVICE_CLASS_PATH=$SERVICE_CLASS_PATH:$CONFIG_FILES
+
+echo ========================================================
+echo Classpath: $SERVICE_CLASS_PATH
+echo ========================================================
+echo JVM Settings: $JVM_SETTINGS
+echo JAVA_HOME: $JAVA_HOME
+echo Name of Service : $1
+echo Name of Property File: $2
+echo ========================================================
+
+CLASSPATH=$SERVICE_CLASS_PATH
+export CLASSPATH
+
+$JAVA_HOME/bin/java $JVM_SETTINGS -cp $SERVICE_CLASS_PATH systemic.sif3.demo.rest.consumer.StudentConsumerService $1 $2&
+#$JAVA_HOME/bin/java $JVM_SETTINGS systemic.sif3.demo.rest.consumer.StudentConsumerService $1 $2&
diff --git a/SIF3InfraREST/scripts/service/start_StudentConsumer.bat b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/start_StudentConsumer.bat
similarity index 100%
rename from SIF3InfraREST/scripts/service/start_StudentConsumer.bat
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/start_StudentConsumer.bat
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/start_StudentConsumer.sh b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/start_StudentConsumer.sh
new file mode 100644
index 00000000..0add0da1
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/start_StudentConsumer.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+./startConsumer.sh MyConsumerService StudentConsumer
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/stopConsumer.sh b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/stopConsumer.sh
new file mode 100644
index 00000000..a46d01c6
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/stopConsumer.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+SERVICE_NAME=$1
+
+echo "Shut Down Agent: $SERVICE_NAME"
+SERVICE_PID=`ps --width 10000 -o pid,command | grep "systemic.sif3.demo.rest.consumer.StudentConsumerService $SERVICE_NAME" | awk '{print $1}'`
+
+kill -HUP $SERVICE_PID
+
+echo RIP $SERVICE_PID - $SERVICE_NAME
+
+
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/stop_StudentConsumer.sh b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/stop_StudentConsumer.sh
new file mode 100644
index 00000000..83fdf9c2
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/service/stop_StudentConsumer.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./stopConsumer.sh MyConsumerService
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/tomcat/Readme.txt b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/tomcat/Readme.txt
new file mode 100644
index 00000000..8af77443
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/tomcat/Readme.txt
@@ -0,0 +1,10 @@
+For Tomcat deployment follow the instructions below:
+
+1) Open setenv.bat file.
+2) Modify the path to your project to pint to your specific config directory.
+3) Save setenv.bat
+4) Copy the setenv.bat into the Tomcat/bin directory.
+5) Start tomcat
+
+The above should ensure that all required configuration files are on the classpath.
+
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/tomcat/setenv.bat b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/tomcat/setenv.bat
new file mode 100644
index 00000000..aae2df14
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/scripts/tomcat/setenv.bat
@@ -0,0 +1,7 @@
+rem -----------------------------------------------
+rem -- Classpath setup for SIF2InfraRest Project --
+rem -----------------------------------------------
+set SIF3_REST_BASE_DIR=C:\Development\GitHubRepositories\SIF3InfraRest\SIF3InfraREST
+set "CLASSPATH=%CLASSPATH%;%SIF3_REST_BASE_DIR%\config;%SIF3_REST_BASE_DIR%\config\consumers;%SIF3_REST_BASE_DIR%\config\providers";%SIF3_REST_BASE_DIR%\hibernate
+
+echo "Project Specific Classpath: %CLASSPATH%"
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/audit/LogAuditor.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/audit/LogAuditor.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/audit/LogAuditor.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/audit/LogAuditor.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/hibernate/DemoProperties.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/hibernate/DemoProperties.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/hibernate/DemoProperties.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/hibernate/DemoProperties.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/ModelObjectConstants.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/ModelObjectConstants.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/ModelObjectConstants.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/ModelObjectConstants.java
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/.gitignore b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/.gitignore
new file mode 100644
index 00000000..b6373870
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/.gitignore
@@ -0,0 +1 @@
+/StudentDailyAttendanceConsumer.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/AUDataModelConsumer.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/AUDataModelConsumer.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/AUDataModelConsumer.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/AUDataModelConsumer.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/AUDataModelEventConsumer.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/AUDataModelEventConsumer.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/AUDataModelEventConsumer.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/AUDataModelEventConsumer.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/CSVStudentConsumer.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/CSVStudentConsumer.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/CSVStudentConsumer.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/CSVStudentConsumer.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/SchoolInfoConsumer.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/SchoolInfoConsumer.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/SchoolInfoConsumer.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/SchoolInfoConsumer.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/StudentConsumerService.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/StudentConsumerService.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/StudentConsumerService.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/StudentConsumerService.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/StudentPersonalConsumer.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/StudentPersonalConsumer.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/StudentPersonalConsumer.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/consumer/StudentPersonalConsumer.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/conversion/CSVMarshaller.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/conversion/CSVMarshaller.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/conversion/CSVMarshaller.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/conversion/CSVMarshaller.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/conversion/CSVUnmarshaller.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/conversion/CSVUnmarshaller.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/conversion/CSVUnmarshaller.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/conversion/CSVUnmarshaller.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/.gitignore b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/.gitignore
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/.gitignore
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/.gitignore
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/AUDataModelProvider.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/AUDataModelProvider.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/AUDataModelProvider.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/AUDataModelProvider.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/AUDataModelProviderWithEvents.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/AUDataModelProviderWithEvents.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/AUDataModelProviderWithEvents.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/AUDataModelProviderWithEvents.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/CSVStudentProvider.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/CSVStudentProvider.java
similarity index 87%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/CSVStudentProvider.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/CSVStudentProvider.java
index f08afeff..3415c22b 100644
--- a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/CSVStudentProvider.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/CSVStudentProvider.java
@@ -32,6 +32,7 @@
import sif3.common.interfaces.SIFEventIterator;
import sif3.common.model.PagingInfo;
import sif3.common.model.RequestMetadata;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFEvent;
import sif3.common.model.SIFZone;
@@ -62,7 +63,7 @@ public CSVStudentProvider()
* @see sif3.common.interfaces.Provider#retrievByPrimaryKey(java.lang.String, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Retrieve By Primary Key Resoucre ID = "+resourceID+", "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
throw new IllegalArgumentException("Not implemented for CSV Provider.");
@@ -72,7 +73,7 @@ public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext co
* @see sif3.common.interfaces.Provider#createSingle(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Create Single for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
logger.debug("Payload to Process:\n"+data.toString());
@@ -84,7 +85,7 @@ public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFCo
* @see sif3.common.interfaces.Provider#updateSingle(java.lang.Object, java.lang.String, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Update single with Resoucre ID = "+resourceID+", "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
throw new IllegalArgumentException("Not implemented for CSV Provider.");
@@ -94,7 +95,7 @@ public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFCon
* @see sif3.common.interfaces.Provider#deleteSingle(java.lang.String, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Remove Single with Resoucre ID = "+resourceID+", "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
throw new IllegalArgumentException("Not implemented for CSV Provider.");
@@ -105,7 +106,7 @@ public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context,
* @see sif3.common.interfaces.Provider#retrive(sif3.common.model.SIFZone, sif3.common.model.SIFContext, sif3.common.model.PagingInfo)
*/
@Override
- public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo, RequestMetadata metadata) throws PersistenceException, UnsupportedQueryException, DataTooLargeException
+ public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo, RequestMetadata metadata, ResponseParameters customResponseParams) throws PersistenceException, UnsupportedQueryException, DataTooLargeException
{
logger.debug("Retrieve All for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
throw new IllegalArgumentException("Not implemented for CSV Provider.");
@@ -115,7 +116,7 @@ public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo,
* @see sif3.common.interfaces.Provider#createMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Create Many (Bulk Operation) for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
throw new IllegalArgumentException("Not implemented for CSV Provider.");
@@ -125,7 +126,7 @@ public List createMany(Object data, boolean useAdvisory,
* @see sif3.common.interfaces.Provider#updateMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Update Many (Bulk Operation) for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
throw new IllegalArgumentException("Not implemented for CSV Provider.");
@@ -135,7 +136,7 @@ public List updateMany(Object data, SIFZone zone, SIFContext co
* @see sif3.common.interfaces.Provider#deleteMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Delete Many (Bulk Operation) for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
throw new IllegalArgumentException("Not implemented for CSV Provider.");
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/SchoolInfoProvider.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/SchoolInfoProvider.java
similarity index 89%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/SchoolInfoProvider.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/SchoolInfoProvider.java
index fda683a1..ad01886c 100644
--- a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/SchoolInfoProvider.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/SchoolInfoProvider.java
@@ -33,6 +33,7 @@
import sif3.common.exception.UnsupportedQueryException;
import sif3.common.model.PagingInfo;
import sif3.common.model.RequestMetadata;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFZone;
import sif3.common.utils.UUIDGenerator;
@@ -97,7 +98,7 @@ public SchoolInfoProvider()
* @see sif3.common.interfaces.Provider#retrievByPrimaryKey(java.lang.String, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
if (StringUtils.isEmpty(resourceID))
{
@@ -113,7 +114,7 @@ public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext co
* @see sif3.common.interfaces.Provider#createSingle(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Create Single School for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
@@ -145,7 +146,7 @@ public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFCo
* @see sif3.common.interfaces.Provider#updateSingle(java.lang.Object, java.lang.String, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
if (StringUtils.isEmpty(resourceID))
{
@@ -170,7 +171,7 @@ public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFCon
* @see sif3.common.interfaces.Provider#deleteSingle(java.lang.String, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
if (StringUtils.isEmpty(resourceID))
{
@@ -188,7 +189,7 @@ public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context,
* @see sif3.common.interfaces.Provider#retrive(sif3.common.model.SIFZone, sif3.common.model.SIFContext, sif3.common.model.PagingInfo)
*/
@Override
- public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo, RequestMetadata metadata) throws PersistenceException, UnsupportedQueryException, DataTooLargeException
+ public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo, RequestMetadata metadata, ResponseParameters customResponseParams) throws PersistenceException, UnsupportedQueryException, DataTooLargeException
{
logger.debug("Retrieve schools for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
ArrayList schoolList = new ArrayList();
@@ -229,7 +230,7 @@ public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo,
* @see sif3.common.interfaces.Provider#createMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
// Must be of type StudentPersonalType
if (data instanceof SchoolInfoCollectionType)
@@ -272,7 +273,7 @@ public List createMany(Object data, boolean useAdvisory,
* @see sif3.common.interfaces.Provider#updateMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
// Must be of type StudentPersonalType
if (data instanceof SchoolInfoCollectionType)
@@ -306,7 +307,7 @@ public List updateMany(Object data, SIFZone zone, SIFContext co
* @see sif3.common.interfaces.Provider#deleteMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Delete Students (Bulk Operation) for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/StudentPersonalProvider.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/StudentPersonalProvider.java
similarity index 89%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/StudentPersonalProvider.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/StudentPersonalProvider.java
index 00c4fc49..5343a9b6 100644
--- a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/StudentPersonalProvider.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/StudentPersonalProvider.java
@@ -26,12 +26,15 @@
import javax.xml.bind.JAXBElement;
+import au.com.systemic.framework.utils.DateUtils;
+import au.com.systemic.framework.utils.FileReaderWriter;
+import au.com.systemic.framework.utils.StringUtils;
import sif.dd.au30.model.ObjectFactory;
+import sif.dd.au30.model.StudentListType;
import sif.dd.au30.model.StudentPersonalCollectionType;
import sif.dd.au30.model.StudentPersonalType;
import sif.dd.au30.model.TeachingGroupCollectionType;
-import sif.dd.au30.model.TeachingGroupType.StudentList;
-import sif.dd.au30.model.TeachingGroupType.StudentList.TeachingGroupStudent;
+import sif.dd.au30.model.TeachingGroupStudentType;
import sif3.common.CommonConstants;
import sif3.common.conversion.ModelObjectInfo;
import sif3.common.exception.DataTooLargeException;
@@ -49,6 +52,7 @@
import sif3.common.model.QueryCriteria;
import sif3.common.model.QueryPredicate;
import sif3.common.model.RequestMetadata;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFEvent;
import sif3.common.model.SIFZone;
@@ -58,9 +62,6 @@
import sif3.common.ws.OperationStatus;
import systemic.sif3.demo.rest.ModelObjectConstants;
import systemic.sif3.demo.rest.provider.iterators.StudentPersonalIterator;
-import au.com.systemic.framework.utils.DateUtils;
-import au.com.systemic.framework.utils.FileReaderWriter;
-import au.com.systemic.framework.utils.StringUtils;
/**
* @author Joerg Huber
@@ -128,12 +129,12 @@ public StudentPersonalProvider()
if ((classes != null) && (classes.getTeachingGroup() != null))
{
// Get student list of first teaching group
- JAXBElement jaxbClassStudents = classes.getTeachingGroup().get(0).getStudentList();
+ JAXBElement jaxbClassStudents = classes.getTeachingGroup().get(0).getStudentList();
if (jaxbClassStudents != null)
{
teachingGroupStudents = new HashMap();
- StudentList classStudents = jaxbClassStudents.getValue();
- for (TeachingGroupStudent student : classStudents.getTeachingGroupStudent())
+ StudentListType classStudents = jaxbClassStudents.getValue();
+ for (TeachingGroupStudentType student : classStudents.getTeachingGroupStudent())
{
teachingGroupStudents.put(student.getStudentPersonalRefId().getValue(), students.get(student.getStudentPersonalRefId().getValue()));
}
@@ -225,7 +226,7 @@ public SIFEvent modifyBeforePublishing(SIFEvent createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
// Must be of type StudentPersonalType
if (data instanceof StudentPersonalCollectionType)
@@ -483,7 +493,7 @@ public List createMany(Object data, boolean useAdvisory,
* @see sif3.common.interfaces.Provider#updateMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
// Must be of type StudentPersonalType
if (data instanceof StudentPersonalCollectionType)
@@ -517,7 +527,7 @@ public List updateMany(Object data, SIFZone zone, SIFContext co
* @see sif3.common.interfaces.Provider#deleteMany(java.lang.Object, sif3.common.model.SIFZone, sif3.common.model.SIFContext)
*/
@Override
- public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException
+ public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException
{
logger.debug("Delete Students (Bulk Operation) for "+getZoneAndContext(zone, context)+" and RequestMetadata = "+metadata);
@@ -587,12 +597,12 @@ public String getLatestOpaqueMarker(SIFZone zone, SIFContext context, PagingInfo
* @see sif3.common.interfaces.ChangesSinceProvider#getChangesSince(sif3.common.model.SIFZone, sif3.common.model.SIFContext, sif3.common.model.PagingInfo, sif3.common.model.ChangedSinceInfo, sif3.common.model.RequestMetadata)
*/
@Override
- public Object getChangesSince(SIFZone zone, SIFContext context, PagingInfo pagingInfo, ChangedSinceInfo changedSinceInfo, RequestMetadata metadata) throws PersistenceException, UnsupportedQueryException, DataTooLargeException
+ public Object getChangesSince(SIFZone zone, SIFContext context, PagingInfo pagingInfo, ChangedSinceInfo changedSinceInfo, RequestMetadata metadata, ResponseParameters customResponseParams) throws PersistenceException, UnsupportedQueryException, DataTooLargeException
{
// This is not a real implementation. We just fake things here. In a real implementation one would go to a change log to retrieve
// Students for the given changedSinceInfo criteria.
logger.info("getChangesSince for "+getProviderName()+" called with changes since info: "+changedSinceInfo);
- return retrieve(zone, context, pagingInfo, metadata);
+ return retrieve(zone, context, pagingInfo, metadata, customResponseParams);
}
/*--------------------------------------*/
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/iterators/.gitignore b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/iterators/.gitignore
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/iterators/.gitignore
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/iterators/.gitignore
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/iterators/CSVStudentIterator.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/iterators/CSVStudentIterator.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/iterators/CSVStudentIterator.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/iterators/CSVStudentIterator.java
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/iterators/StudentPersonalIterator.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/iterators/StudentPersonalIterator.java
similarity index 100%
rename from SIF3InfraREST/demo/src/systemic/sif3/demo/rest/provider/iterators/StudentPersonalIterator.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/java/systemic/sif3/demo/rest/provider/iterators/StudentPersonalIterator.java
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/resources/license.txt b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/resources/license.txt
new file mode 100644
index 00000000..86f77fb0
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/resources/license.txt
@@ -0,0 +1,13 @@
+ Copyright 2016 Systemic Pty Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software distributed under the License
+ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ or implied.
+ See the License for the specific language governing permissions and limitations under the License.
+
\ No newline at end of file
diff --git a/SIF3InfraREST/war/WEB-INF/web.xml b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/webapp/WEB-INF/web.xml
similarity index 69%
rename from SIF3InfraREST/war/WEB-INF/web.xml
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/webapp/WEB-INF/web.xml
index 5452293c..a028b1b1 100644
--- a/SIF3InfraREST/war/WEB-INF/web.xml
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
-
-
-
- SIF3InfraREST
+
+ SIF3InfraREST
@@ -23,12 +23,12 @@
-
-
+
+
CompressingFilter
- com.planetj.servlet.filter.compression.CompressingFilter
+ com.github.ziplet.filter.compression.CompressingFilter
debug
true
@@ -67,11 +67,7 @@
- index.html
- index.htm
- index.jsp
- default.html
- default.htm
- default.jsp
+
-
\ No newline at end of file
+
+
diff --git a/SIF3InfraREST/test/src/sif3/.gitignore b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/.gitignore
similarity index 100%
rename from SIF3InfraREST/test/src/sif3/.gitignore
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/.gitignore
diff --git a/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/event/generator/.gitignore b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/event/generator/.gitignore
new file mode 100644
index 00000000..54eb5045
--- /dev/null
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/event/generator/.gitignore
@@ -0,0 +1 @@
+/DailyAttendanceEvents.java
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestEventClient.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/client/TestEventClient.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestEventClient.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/client/TestEventClient.java
index 24cdcd58..88f99760 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestEventClient.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/client/TestEventClient.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.rest.client;
+package sif3.test.infra.rest.client;
import java.net.URI;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestCSVStudentConsumer.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestCSVStudentConsumer.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestCSVStudentConsumer.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestCSVStudentConsumer.java
index d57e442a..7af8634f 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestCSVStudentConsumer.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestCSVStudentConsumer.java
@@ -14,7 +14,7 @@
* the License.
*/
-package sif3.infra.test.rest.consumer;
+package sif3.test.infra.rest.consumer;
import java.util.List;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestConsumerLoader.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestConsumerLoader.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestConsumerLoader.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestConsumerLoader.java
index d7d860b5..5013f824 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestConsumerLoader.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestConsumerLoader.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.rest.consumer;
+package sif3.test.infra.rest.consumer;
import sif3.infra.rest.consumer.ConsumerLoader;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestStudentPersonalConsumer.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestStudentPersonalConsumer.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestStudentPersonalConsumer.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestStudentPersonalConsumer.java
index 332d26dc..b2e9a2a3 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/consumer/TestStudentPersonalConsumer.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/consumer/TestStudentPersonalConsumer.java
@@ -14,7 +14,7 @@
* the License.
*/
-package sif3.infra.test.rest.consumer;
+package sif3.test.infra.rest.consumer;
import java.util.ArrayList;
import java.util.List;
@@ -319,8 +319,8 @@ private void getStudents(StudentPersonalConsumer consumer, boolean printRepsonse
// envZoneCtxList.add(new ZoneContextInfo((SIFZone)null, new SIFContext("secure")));
// envZoneCtxList.add(new ZoneContextInfo((SIFZone)null, CommonConstants.DEFAULT_CONTEXT));
-// List responses = consumer.retrieve(new PagingInfo(10, 0), envZoneCtxList, RequestType.DELAYED, QueryIntention.NO_CACHE, params);
- List responses = consumer.retrieve(new PagingInfo(10, 0), envZoneCtxList, RequestType.IMMEDIATE, QueryIntention.NO_CACHE, params);
+// List responses = consumer.retrieve(new PagingInfo(10), envZoneCtxList, RequestType.DELAYED, QueryIntention.NO_CACHE, params);
+ List responses = consumer.retrieve(new PagingInfo(10, 1), envZoneCtxList, RequestType.IMMEDIATE, QueryIntention.NO_CACHE, params);
// List responses = consumer.retrieve(new PagingInfo(10, 0), envZoneCtxList, REQUEST_TYPE, QueryIntention.NO_CACHE, params);
// List responses = consumer.retrieve(new PagingInfo(5, 17), envZoneCtxList, REQUEST_TYPE);
// List responses = consumer.retrieve(null, envZoneCtxList, REQUEST_TYPE);
@@ -511,7 +511,7 @@ public static void main(String[] args)
StudentPersonalConsumer consumer = tester.getConsumer();
- tester.getStudent(consumer);
+// tester.getStudent(consumer);
tester.getStudents(consumer, true);
// tester.getStudentsByServicePath("SchoolInfos", "24ed508e1ed04bba82198233efa55859", consumer);
// tester.getStudentsByServicePath("TeachingGroups", "64A309DA063A2E35B359D75101A8C3D1", consumer);
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/provider/TestProviderFactory.java b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/provider/TestProviderFactory.java
similarity index 93%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/provider/TestProviderFactory.java
rename to SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/provider/TestProviderFactory.java
index beff34c8..a5a1de9f 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/provider/TestProviderFactory.java
+++ b/SIF3InfraREST/SIF3Demo/sif3-demo-web/src/test/java/sif3/test/infra/rest/provider/TestProviderFactory.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.rest.provider;
+package sif3.test.infra.rest.provider;
import sif3.infra.common.env.types.AdapterEnvironmentStore;
import sif3.infra.rest.provider.ProviderFactory;
diff --git a/SIF3InfraREST/SIF3REST/.gitignore b/SIF3InfraREST/SIF3REST/.gitignore
new file mode 100644
index 00000000..ea6ab823
--- /dev/null
+++ b/SIF3InfraREST/SIF3REST/.gitignore
@@ -0,0 +1,5 @@
+/target/
+/.settings/
+/.classpath
+/.project
+/bin/
diff --git a/SIF3InfraREST/SIF3REST/pom.xml b/SIF3InfraREST/SIF3REST/pom.xml
new file mode 100644
index 00000000..5e68d3a5
--- /dev/null
+++ b/SIF3InfraREST/SIF3REST/pom.xml
@@ -0,0 +1,102 @@
+
+ 4.0.0
+
+
+
+
+
+ sif3.framework
+ sif3-framework
+ 0.10.0-beta
+
+
+
+
+
+ sif3-infra-rest
+ jar
+ SIF3 Infrastructure REST
+
+
+
+
+
+
+
+ ${jarName.prefix}Infra-rest-${project.version}
+
+
+
+
+
+
+
+
+
+ sifau
+ sif3-au-datamodel
+
+
+
+
+
+
+
+ jdbc
+ mysql-jdbc
+
+
+ jdbc
+ oracle-jdbc
+
+
+ jdbc
+ sqlite-jdbc
+
+
+
+
+
+
+ log4j
+ log4j
+
+
+
+
+
+
+ sif3.framework
+ sif3-infra-common
+ ${project.version}
+
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+
+
+ This is the top level module for the SIF3 Framework. It holds the REST specific infrastructure artifacts that will be used by developers.
+
\ No newline at end of file
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/BaseClient.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/BaseClient.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/BaseClient.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/BaseClient.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/ClientConfigMgr.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/ClientConfigMgr.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/ClientConfigMgr.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/ClientConfigMgr.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/ClientUtils.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/ClientUtils.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/ClientUtils.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/ClientUtils.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/EnvironmentClient.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/EnvironmentClient.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/EnvironmentClient.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/EnvironmentClient.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/EventClient.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/EventClient.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/EventClient.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/EventClient.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/MessageClient.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/MessageClient.java
similarity index 89%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/MessageClient.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/MessageClient.java
index 3d3243fa..e10e9160 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/MessageClient.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/MessageClient.java
@@ -52,7 +52,7 @@ public MessageClient(ClientEnvironmentManager clientEnvMgr, URI queueURI)
/*
* Get message and remove old one.
*/
- public Response getMessage(String removeMsgID, String consumerInstanceID) throws ServiceInvokationException
+ public Response getMessage(String removeMsgID, int consumerInstanceID) throws ServiceInvokationException
{
WebResource service = getService();
try
@@ -78,7 +78,7 @@ public Response getMessage(String removeMsgID, String consumerInstanceID) throws
/*
* Remove old message.
*/
- public Response removeMessage(String removeMsgID, String consumerInstanceID) throws ServiceInvokationException
+ public Response removeMessage(String removeMsgID, int consumerInstanceID) throws ServiceInvokationException
{
WebResource service = getService();
try
@@ -121,17 +121,17 @@ private WebResource buildMessageURI(WebResource svc, String removeMsgID, boolean
* This method sets all header properties for queue related request as specified by the SIF3 Spec.
*
* @param sif3Session TSession information. Required for authentication token creation.
- * @param consumerInstanceID Can be null.
+ * @param consumerInstanceID The id of the consumer instance.
* @return
*/
- private HeaderProperties getHeaderProperties(String consumerInstanceID)
+ private HeaderProperties getHeaderProperties(int consumerInstanceID)
{
// Add Authentication info to existing header properties
HeaderProperties hdrProperties = createAuthenticationHdr(false, null);
- if (StringUtils.notEmpty(consumerInstanceID))
- {
- hdrProperties.setHeaderProperty(RequestHeaderConstants.HDR_CONSUMER_ID, consumerInstanceID);
- }
+// if (StringUtils.notEmpty(consumerInstanceID))
+// {
+ hdrProperties.setHeaderProperty(RequestHeaderConstants.HDR_CONSUMER_ID, String.valueOf(consumerInstanceID));
+// }
return hdrProperties;
}
}
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/ObjectServiceClient.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/ObjectServiceClient.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/ObjectServiceClient.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/ObjectServiceClient.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/QueueClient.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/QueueClient.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/QueueClient.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/QueueClient.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/SubscriptionClient.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/SubscriptionClient.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/client/SubscriptionClient.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/client/SubscriptionClient.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/AbstractConsumer.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/AbstractConsumer.java
similarity index 97%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/AbstractConsumer.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/AbstractConsumer.java
index e29c5eff..d4c70831 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/AbstractConsumer.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/AbstractConsumer.java
@@ -1429,7 +1429,7 @@ private String getServicePath(QueryCriteria queryCriteria)
return result;
}
- @SuppressWarnings("unused")
+// @SuppressWarnings("unused")
private List getFinalZoneCtxList( List zoneCtxList, SIF3Session sif3Session)
{
List finalZoneContextList = null;
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/AbstractEventConsumer.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/AbstractEventConsumer.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/AbstractEventConsumer.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/AbstractEventConsumer.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/ConsumerLoader.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/ConsumerLoader.java
similarity index 96%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/ConsumerLoader.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/ConsumerLoader.java
index 63cf5705..8449cde3 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/consumer/ConsumerLoader.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/consumer/ConsumerLoader.java
@@ -355,16 +355,15 @@ private ExecutorService startRemoteMessageReaderThreads(QueueInfo queueInfo, int
ExecutorService service = Executors.newFixedThreadPool(numThreads);
for (int i = 0; i < numThreads; i++)
{
- String readerID = remoteQueueName+" - Reader "+(i+1);
try
{
- RemoteMessageQueueReader remoteReader = new RemoteMessageQueueReader(queueInfo, readerID);
- logger.debug("Start Remote Reader "+readerID);
+ RemoteMessageQueueReader remoteReader = new RemoteMessageQueueReader(queueInfo, i);
+ logger.debug("Start Remote Reader "+remoteQueueName+" "+i);
service.execute(remoteReader);
}
catch (Exception ex)
{
- logger.error("Failed to start message reader thread for : "+readerID);
+ logger.error("Failed to start message reader thread for : "+remoteQueueName+" "+i);
}
}
logger.debug(numThreads+" "+remoteQueueName+" message readers initilaised and started.");
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/BrokeredProviderEnvironmentConnector.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/BrokeredProviderEnvironmentConnector.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/BrokeredProviderEnvironmentConnector.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/BrokeredProviderEnvironmentConnector.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/ConsumerEnvironmentConnector.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/ConsumerEnvironmentConnector.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/ConsumerEnvironmentConnector.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/ConsumerEnvironmentConnector.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/DirectProviderEnvironmentConnector.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/DirectProviderEnvironmentConnector.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/DirectProviderEnvironmentConnector.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/DirectProviderEnvironmentConnector.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/EnvironmentClientConnector.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/EnvironmentClientConnector.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/EnvironmentClientConnector.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/EnvironmentClientConnector.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/EnvironmentConnectorFactory.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/EnvironmentConnectorFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/env/connectors/EnvironmentConnectorFactory.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/env/connectors/EnvironmentConnectorFactory.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/mapper/InfraDataModelMapper.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/mapper/InfraDataModelMapper.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/mapper/InfraDataModelMapper.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/mapper/InfraDataModelMapper.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/BaseEventProvider.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/BaseEventProvider.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/BaseEventProvider.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/BaseEventProvider.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/BaseProvider.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/BaseProvider.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/BaseProvider.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/BaseProvider.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/ProviderClassInfo.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/ProviderClassInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/ProviderClassInfo.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/ProviderClassInfo.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/ProviderFactory.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/ProviderFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/provider/ProviderFactory.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/provider/ProviderFactory.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/LocalConsumerQueue.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/LocalConsumerQueue.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/LocalConsumerQueue.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/LocalConsumerQueue.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/LocalMessageConsumer.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/LocalMessageConsumer.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/LocalMessageConsumer.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/LocalMessageConsumer.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/RemoteMessageQueueReader.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/RemoteMessageQueueReader.java
similarity index 92%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/RemoteMessageQueueReader.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/RemoteMessageQueueReader.java
index a1a05db3..076811d0 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/RemoteMessageQueueReader.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/RemoteMessageQueueReader.java
@@ -65,7 +65,7 @@ public class RemoteMessageQueueReader implements Runnable
private QueueInfo queueInfo = null;
private ConsumerEnvironmentManager consumerEvnMgr = null;
private SIF3Session sif3Session = null;
- private String readerID = null;
+ private int readerID;
private String lastMsgeID = null;
private int waitTime = 0; // milliseconds
@@ -81,7 +81,7 @@ public class RemoteMessageQueueReader implements Runnable
* A string identifying the ID of this reader. Since it is expected that readers are running in multiple threads each
* reader should have its own id to identify it for logging purpose.
*/
- public RemoteMessageQueueReader(QueueInfo queueInfo, String readerID) throws ServiceInvokationException
+ public RemoteMessageQueueReader(QueueInfo queueInfo, int readerID) throws ServiceInvokationException
{
super();
try
@@ -118,7 +118,7 @@ public void shutdown()
@Override
public void run()
{
- logger.debug("Message Queue Reader "+getReaderID()+" starts reading messages...");
+ logger.debug("Message Queue Reader "+getReaderID()+" starts reading messages for queue "+getQueueInfo().getQueue().getName()+"...");
startReading();
}
@@ -206,7 +206,7 @@ private boolean isError(Response response)
private void waitBeforeGetNext()
{
- logger.debug("\n==========================\n"+getReaderID()+ " will wait for "+getWaitTime()/CommonConstants.MILISEC+" seconds before attempting to get next message."+"\n==========================");
+ logger.debug("\n==========================\n"+getReaderID()+" for queue "+getQueueInfo().getQueue().getName()+ " will wait for "+getWaitTime()/CommonConstants.MILISEC+" seconds before attempting to get next message."+"\n==========================");
try
{
Object semaphore = new Object();
@@ -350,7 +350,7 @@ private void setResponseBaseData(DelayedBaseInfo baseInfo, Response response, Me
baseInfo.setContext(getSif3Session().getContext(pathInfo.getContext()));
// baseInfo.setZone(getZone(pathInfo.getZone() != null ? pathInfo.getZone().getId() : null));
// baseInfo.setContext(getContext(pathInfo.getContext()!= null ? pathInfo.getContext().getId() : null));
- baseInfo.setMessageQueueReaderID(getReaderID());
+ baseInfo.setMessageQueueReaderID(getQueueReaderID());
baseInfo.setFullRelativeURL(pathInfo.getOriginalURLString());
baseInfo.setServiceName(pathInfo.getServiceName());
baseInfo.setUrlService(pathInfo.getUrlService());
@@ -366,7 +366,7 @@ private void processEvent(Response response)
{
if (logger.isDebugEnabled())
{
- logger.debug("EVENT Message Received:\n"+response);
+ logger.debug(getQueueReaderID()+": EVENT Message Received:\n"+response);
}
SIFZone zone = getZone(response);
SIFContext context = getContext(response);
@@ -396,10 +396,10 @@ private void processEvent(Response response)
//TODO: JH - Do we need applicationKey and authenticatedUser HTTP header here?
- EventInfo eventInfo = new EventInfo(eventPayload, response.getMediaType(), eventAction, updateType, zone, context, metadata, getReaderID());
- logger.debug(getReaderID()+": Attempts to push Event to local queue...");
+ EventInfo eventInfo = new EventInfo(eventPayload, response.getMediaType(), eventAction, updateType, zone, context, metadata, getQueueReaderID());
+ logger.debug(getQueueReaderID()+": Attempts to push Event to local queue...");
localQueue.blockingPush(eventInfo);
- logger.debug(getReaderID()+": Event successfully pushed to local queue");
+ logger.debug(getQueueReaderID()+": Event successfully pushed to local queue");
}
}
catch (Exception ex)
@@ -562,10 +562,18 @@ private MessageClient getClient()
return client;
}
- private String getReaderID()
+ private int getReaderID()
{
return readerID;
}
+
+ /*
+ * Returns a String ID of the Queue Name and consumerInstance Id. Used for logging an debugging.
+ */
+ private String getQueueReaderID()
+ {
+ return getQueueInfo().getQueue().getName()+"_"+getReaderID();
+ }
private String getLastMsgeID()
{
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/connectors/ConsumerQueueConnector.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/connectors/ConsumerQueueConnector.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/connectors/ConsumerQueueConnector.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/connectors/ConsumerQueueConnector.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/connectors/ConsumerSubscriptionConnector.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/connectors/ConsumerSubscriptionConnector.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/connectors/ConsumerSubscriptionConnector.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/connectors/ConsumerSubscriptionConnector.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/DelayedBaseInfo.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/DelayedBaseInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/DelayedBaseInfo.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/DelayedBaseInfo.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/ErrorInfo.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/ErrorInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/ErrorInfo.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/ErrorInfo.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/EventInfo.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/EventInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/EventInfo.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/EventInfo.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/LocalQueueServiceInfo.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/LocalQueueServiceInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/LocalQueueServiceInfo.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/LocalQueueServiceInfo.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/QueueInfo.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/QueueInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/QueueInfo.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/QueueInfo.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/QueueMessage.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/QueueMessage.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/QueueMessage.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/QueueMessage.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/ResponseInfo.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/ResponseInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/queue/types/ResponseInfo.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/queue/types/ResponseInfo.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/BaseResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/BaseResource.java
similarity index 93%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/BaseResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/BaseResource.java
index 2434371b..6aa61a72 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/BaseResource.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/BaseResource.java
@@ -53,6 +53,7 @@
import sif3.common.model.AuthenticationInfo.AuthenticationMethod;
import sif3.common.model.PagingInfo;
import sif3.common.model.RequestMetadata;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFZone;
import sif3.common.model.ServiceRights.AccessRight;
@@ -372,9 +373,13 @@ public String getProviderID()
* This method combines the validSession() and validateBearerSession() method into a higher level, so that the caller doesn't have to know
* which one to invoke, rather have the code here to determine it automatically as it is possible in most cases.
*
+ * @param autoCreateAllowed There are times where a environment must not be created automatically even if the
+ * provider's property would allow this. A typical case is where we attempt to retrieve
+ * an environment by its ID. In such case we do not create it if it doesn't exist.
+ *
* @return Null if all is fine, ErrorDetails otherwise.
*/
- protected ErrorDetails validateSession()
+ protected ErrorDetails validateSession(boolean autoCreateAllowed)
{
AuthenticationInfo authInfo = getAuthInfo();
if ((authInfo == null) || (authInfo.getUserToken() == null))
@@ -387,7 +392,7 @@ protected ErrorDetails validateSession()
}
else
{
- return validateBearerSession(authInfo);
+ return validateBearerSession(authInfo, autoCreateAllowed);
}
}
@@ -424,12 +429,14 @@ public SIF3Session getSIF3SessionForRequest()
* Converts the ErrorDetails into a REST Response according to the SIF3 Specification.
*
* @param error Error Information to be put into the REST Response.
+ * @param responseAction Action to be set in the appropriate HTTP header.
+ * @param customResponseParams headers that might be added to the response. Can be null.
*
* @return REST Response Object.
*/
- public Response makeErrorResponse(ErrorDetails error, ResponseAction responseAction)
+ public Response makeErrorResponse(ErrorDetails error, ResponseAction responseAction, ResponseParameters customResponseParams)
{
- return makeResponse(makeError(error), error.getErrorCode(), true, responseAction, infraMarshaller);
+ return makeResponse(makeError(error), error.getErrorCode(), true, responseAction, customResponseParams, infraMarshaller);
}
/**
@@ -439,9 +446,9 @@ public Response makeErrorResponse(ErrorDetails error, ResponseAction responseAct
*
* @return A HTTP Response to be sent back to the client.
*/
- public Response makeResopnseWithNoContent(boolean isError, ResponseAction responseAction)
+ public Response makeResopnseWithNoContent(boolean isError, ResponseAction responseAction, ResponseParameters customResponseParams)
{
- return makeFullResponse(null, Status.NO_CONTENT.getStatusCode(), null, null, isError, responseAction, null);
+ return makeFullResponse(null, Status.NO_CONTENT.getStatusCode(), null, isError, responseAction, customResponseParams, null);
}
/**
@@ -454,9 +461,9 @@ public Response makeResopnseWithNoContent(boolean isError, ResponseAction respon
*
* @return A HTTP Response to be sent back to the client.
*/
- public Response makeResponse(Object data, int status, boolean isError, ResponseAction responseAction, MarshalFactory marshaller)
+ public Response makeResponse(Object data, int status, boolean isError, ResponseAction responseAction, ResponseParameters customResponseParams, MarshalFactory marshaller)
{
- return makeFullResponse(data, status, null, null, isError, responseAction, marshaller);
+ return makeFullResponse(data, status, null, isError, responseAction, customResponseParams, marshaller);
}
/**
@@ -465,16 +472,15 @@ public Response makeResponse(Object data, int status, boolean isError, ResponseA
*
* @param data The data (payload) that shall be put into the response.
* @param pagingInfo Paging Information to be added to the response header.
- * @param customHeaders Custom HTTP Headers to be returned to the caller. Note some of the headers might be
- * overwritten as they are 'reserved' values and controlled by the framework (i.e. requestID).
* @param isError Indicator if the response is an error or a standard response.
+ * @param customResponseParams Set of custom http headers to be added to the response.
* @param marshaller The marshaller that converts the 'data' into a valid media type.
*
* @return A HTTP Response to be sent back to the client.
*/
- public Response makePagedResponse(Object data, PagingInfo pagingInfo, HeaderProperties customHeaders, boolean isError, MarshalFactory marshaller)
+ public Response makePagedResponse(Object data, PagingInfo pagingInfo, boolean isError, ResponseParameters customResponseParams, MarshalFactory marshaller)
{
- return makeFullResponse(data, Status.OK.getStatusCode(), pagingInfo, customHeaders, isError, ResponseAction.QUERY, marshaller);
+ return makeFullResponse(data, Status.OK.getStatusCode(), pagingInfo, isError, ResponseAction.QUERY, customResponseParams, marshaller);
}
/*
@@ -482,7 +488,7 @@ public Response makePagedResponse(Object data, PagingInfo pagingInfo, HeaderProp
*/
protected Response makeDelayedAcceptResponse(ResponseAction responseAction)
{
- return makeFullResponse(null, Status.ACCEPTED.getStatusCode(), null, null, false, responseAction, null);
+ return makeFullResponse(null, Status.ACCEPTED.getStatusCode(), null, false, responseAction, null, null);
}
/**
@@ -494,7 +500,7 @@ protected Response makeDelayedAcceptResponse(ResponseAction responseAction)
*
* @return A HTTP Response to be sent back to the client.
*/
- public Response makeCreateMultipleResponse(List operationStatusList, Status overallStatus)
+ public Response makeCreateMultipleResponse(List operationStatusList, Status overallStatus, ResponseParameters customResponseParams)
{
CreateResponseType createManyResponse = infraObjectFactory.createCreateResponseType();
createManyResponse.setCreates(new CreatesType());
@@ -512,7 +518,7 @@ public Response makeCreateMultipleResponse(List operation
}
creates.add(createType);
}
- return makeResponse(createManyResponse, overallStatus.getStatusCode(), false, ResponseAction.CREATE, infraMarshaller);
+ return makeResponse(createManyResponse, overallStatus.getStatusCode(), false, ResponseAction.CREATE, customResponseParams, infraMarshaller);
}
/**
@@ -524,7 +530,7 @@ public Response makeCreateMultipleResponse(List operation
*
* @return A HTTP Response to be sent back to the client.
*/
- public Response makeUpdateMultipleResponse(List operationStatusList, Status overallStatus)
+ public Response makeUpdateMultipleResponse(List operationStatusList, Status overallStatus, ResponseParameters customResponseParams)
{
UpdateResponseType updateManyResponse = infraObjectFactory.createUpdateResponseType();
updateManyResponse.setUpdates(new UpdatesType());
@@ -541,7 +547,7 @@ public Response makeUpdateMultipleResponse(List operationStatus
}
updates.add(updateType);
}
- return makeResponse(updateManyResponse, overallStatus.getStatusCode(), false, ResponseAction.UPDATE, infraMarshaller);
+ return makeResponse(updateManyResponse, overallStatus.getStatusCode(), false, ResponseAction.UPDATE, customResponseParams, infraMarshaller);
}
/**
@@ -553,7 +559,7 @@ public Response makeUpdateMultipleResponse(List operationStatus
*
* @return A HTTP Response to be sent back to the client.
*/
- public Response makeDeleteMultipleResponse(List operationStatusList, Status overallStatus)
+ public Response makeDeleteMultipleResponse(List operationStatusList, Status overallStatus, ResponseParameters customResponseParams)
{
DeleteResponseType deleteManyResponse = infraObjectFactory.createDeleteResponseType();
deleteManyResponse.setDeletes(new DeleteStatusCollection());
@@ -570,7 +576,7 @@ public Response makeDeleteMultipleResponse(List operationStatus
}
deletes.add(deleteStatus);
}
- return makeResponse(deleteManyResponse, overallStatus.getStatusCode(), false, ResponseAction.DELETE, infraMarshaller);
+ return makeResponse(deleteManyResponse, overallStatus.getStatusCode(), false, ResponseAction.DELETE, customResponseParams, infraMarshaller);
}
/*-----------------------*/
@@ -609,6 +615,17 @@ protected List getResourceIDsFromDeleteRequest(String deletePayload) thr
return resourceIDs;
}
+ /**
+ * This method returns a default ResponseParamtere object. It has the httpHeaderParams property defaulted to the values listed
+ * in the "adapter.custom.response.headers" property of the providers property file. This method will never return null.
+ *
+ * @return S
+ */
+ protected ResponseParameters getInitialCustomResponseParameters()
+ {
+ return new ResponseParameters(getProviderEnvironment().getCustomResponseHeaders());
+ }
+
/*---------------------------------*/
/*-- Security Validation Methods --*/
/*---------------------------------*/
@@ -622,12 +639,15 @@ protected List getResourceIDsFromDeleteRequest(String deletePayload) thr
* @param accessType The access level (SUPPORTED, APPROVED, etc) that must be met for the given service and right.
* @param allowDelayed TRUE then the request operation allows delayed requests. In a DIRECT environment it is not supported at
* all and this parameter will be ignored. FALSE if delayed requests are not allowed.
+ * @param autoCreateAllowed There are times where a environment must not be created automatically even if the
+ * provider's property would allow this. A typical case is where we attempt to retrieve
+ * an environment by its ID. In such case we do not create it if it doesn't exist.
*
* @return See desc
*/
- protected ErrorDetails validClient(String serviceName, AccessRight right, AccessType accessType, boolean allowDelayed)
+ protected ErrorDetails validClient(String serviceName, AccessRight right, AccessType accessType, boolean allowDelayed, boolean autoCreateAllowed)
{
- ErrorDetails error = validateSession();
+ ErrorDetails error = validateSession(autoCreateAllowed);
if (error != null)
{
return error;
@@ -1331,10 +1351,10 @@ private ErrorType makeError(ErrorDetails error)
return sifError;
}
- private Response makeFullResponse(Object data, int status, PagingInfo pagingInfo, HeaderProperties customHeaders, boolean isError, ResponseAction responseAction, MarshalFactory marshaller)
+ private Response makeFullResponse(Object data, int status, PagingInfo pagingInfo, boolean isError, ResponseAction responseAction, ResponseParameters customResponseParams, MarshalFactory marshaller)
{
ResponseBuilder response = null;
- HeaderProperties allHeaders = (customHeaders == null) ? new HeaderProperties() : customHeaders;
+ HeaderProperties allHeaders = ((customResponseParams != null) && (customResponseParams.getHttpHeaderParams() != null)) ? customResponseParams.getHttpHeaderParams() : new HeaderProperties();
try
{
// Special case to avoid infinite loop: We deal with an error and the Status Code is of UNSUPPORTED_MEDIA_TYPE. This means we attempted
@@ -1457,11 +1477,11 @@ private Response makeFullResponse(Object data, int status, PagingInfo pagingInfo
}
catch (MarshalException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to marshal "+data.getClass().getSimpleName()+": "+ex.getMessage()), responseAction);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to marshal "+data.getClass().getSimpleName()+": "+ex.getMessage()), responseAction, customResponseParams);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to marshal "+data.getClass().getSimpleName()+" into unsupported media type '"+getResponseMediaType()+"'."), responseAction);
+ return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to marshal "+data.getClass().getSimpleName()+" into unsupported media type '"+getResponseMediaType()+"'."), responseAction, customResponseParams);
}
// catch (UnsupportedEncodingException ex)
// {
@@ -1579,8 +1599,12 @@ private ErrorDetails validateAuthTokenWithSession(SIF3Session sif3Session, boole
*
* At the end of this method we either have returned an error or a sif3 session is now in the
* workstore (DB) AND the cache.
+ *
+ * @param autoCreateAllowed There are times where a environment must not be created automatically even if the
+ * provider's property would allow this. A typical case is where we attempt to retrieve
+ * an environment by its ID. In such case we do not create it if it doesn't exist.
*/
- private ErrorDetails validateBearerSession(AuthenticationInfo authInfo)
+ private ErrorDetails validateBearerSession(AuthenticationInfo authInfo, boolean autoCreateAllowed)
{
String errorStr = null;
SIF3Session sif3Session = getSIF3SessionForRequest();
@@ -1614,7 +1638,7 @@ private ErrorDetails validateBearerSession(AuthenticationInfo authInfo)
{
logger.debug("No envionment found yet => Attempt get bearer token info and reload environment from there...");
tokenInfo = getBearerTokenInfo(authInfo);
- ErrorDetails errors = createOrLoadEnvByTokenInfo(tokenInfo, envMgr, getProviderEnvironment().getAutoCreateEnvironment());
+ ErrorDetails errors = createOrLoadEnvByTokenInfo(tokenInfo, envMgr, (autoCreateAllowed && getProviderEnvironment().getAutoCreateEnvironment()));
if (errors != null)
{
return errors;
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/DataModelResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/DataModelResource.java
similarity index 81%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/DataModelResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/DataModelResource.java
index d34f8da6..493711d7 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/DataModelResource.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/DataModelResource.java
@@ -35,7 +35,6 @@
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriInfo;
-import au.com.systemic.framework.utils.StringUtils;
import sif3.common.CommonConstants;
import sif3.common.conversion.MarshalFactory;
import sif3.common.conversion.ModelObjectInfo;
@@ -55,6 +54,7 @@
import sif3.common.interfaces.QueryProvider;
import sif3.common.model.ChangedSinceInfo;
import sif3.common.model.PagingInfo;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFZone;
import sif3.common.model.ServiceRights.AccessRight;
@@ -68,6 +68,7 @@
import sif3.infra.common.interfaces.EnvironmentManager;
import sif3.infra.rest.provider.ProviderFactory;
import sif3.infra.rest.resource.helper.ServicePathQueryParser;
+import au.com.systemic.framework.utils.StringUtils;
/**
* This is the generic implementation of all Object resources. It implements all the functions required by the SIF3 specification
@@ -198,35 +199,37 @@ public Response createSingle(String payload, @PathParam("dmObjectNameSingle") St
logger.debug("Create Single "+dmObjectNameSingle+" (REST POST) with URL Postfix mimeType = '" + mimeType + "' and input data: " + payload);
}
- ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.CREATE), AccessType.APPROVED, false);
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
+
+ ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.CREATE), AccessType.APPROVED, false, true);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.CREATE);
+ return makeErrorResponse(error, ResponseAction.CREATE, responseParam);
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.CREATE, responseParam);
}
try
{
- Object returnObj = provider.createSingle(provider.getUnmarshaller().unmarshal(payload, provider.getSingleObjectClassInfo().getObjectType(), getRequestMediaType()), getAdvisory(), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false));
+ Object returnObj = provider.createSingle(provider.getUnmarshaller().unmarshal(payload, provider.getSingleObjectClassInfo().getObjectType(), getRequestMediaType()), getAdvisory(), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false), responseParam);
- return makeResponse(returnObj, Status.CREATED.getStatusCode(), false, ResponseAction.CREATE, provider.getMarshaller());
+ return makeResponse(returnObj, Status.CREATED.getStatusCode(), false, ResponseAction.CREATE, responseParam, provider.getMarshaller());
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE, responseParam);
}
catch (UnmarshalException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE, responseParam);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE, responseParam);
}
}
@@ -251,17 +254,17 @@ public Response createMany(String payload)
}
}
- ErrorDetails error = validClient(dmObjectNamePlural, ((isQBE) ? getRight(AccessRight.QUERY) : getRight(AccessRight.CREATE)), AccessType.APPROVED, true);
+ ErrorDetails error = validClient(dmObjectNamePlural, ((isQBE) ? getRight(AccessRight.QUERY) : getRight(AccessRight.CREATE)), AccessType.APPROVED, true, true);
if (error != null) // Not allowed to access!
{
logger.debug("Error Found: "+error);
- return makeErrorResponse(error, ((isQBE) ? ResponseAction.QUERY : ResponseAction.CREATE));
+ return makeErrorResponse(error, ((isQBE) ? ResponseAction.QUERY : ResponseAction.CREATE), getInitialCustomResponseParameters());
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ((isQBE) ? ResponseAction.QUERY : ResponseAction.CREATE));
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ((isQBE) ? ResponseAction.QUERY : ResponseAction.CREATE), getInitialCustomResponseParameters());
}
return (isQBE) ? queryByQBE(provider, payload) : createMany(provider, payload);
@@ -281,39 +284,41 @@ public Response getSingle(@PathParam("resourceID") String resourceID, @PathParam
{
logger.debug("Get Resource by Resoucre ID (REST GET - Single): "+resourceID+" and URL Postfix mimeType = '"+mimeType+"'");
}
-
- ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, false);
+
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
+
+ ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, false, true);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, responseParam);
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.QUERY, responseParam);
}
try
{
- Object returnObj = provider.retrievByPrimaryKey(resourceID, getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false));
+ Object returnObj = provider.retrievByPrimaryKey(resourceID, getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false), responseParam);
if (returnObj != null)
{
- return makeResponse(returnObj, Status.OK.getStatusCode(), false, ResponseAction.QUERY, provider.getMarshaller());
+ return makeResponse(returnObj, Status.OK.getStatusCode(), false, ResponseAction.QUERY, responseParam, provider.getMarshaller());
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+" does not exist."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+" does not exist."), ResponseAction.QUERY, responseParam);
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getSingleObjectClassInfo().getObjectName()+" for resource ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getSingleObjectClassInfo().getObjectName()+" for resource ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (IllegalArgumentException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY, responseParam);
}
}
@@ -328,26 +333,30 @@ public Response getServicePathQuery()
{
logger.debug("Get List (REST GET Service Path Query)");
}
- if (!parser.isServicePath())
+
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
+
+ if (!parser.isServicePath())
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Invalid service path"), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Invalid service path"), ResponseAction.QUERY, responseParam);
}
- ErrorDetails error = validClient(parser.getServicePath(), getRight(AccessRight.QUERY), AccessType.APPROVED, true);
+ ErrorDetails error = validClient(parser.getServicePath(), getRight(AccessRight.QUERY), AccessType.APPROVED, true, true);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, responseParam);
}
Provider provider = getProvider();
if (provider == null || !QueryProvider.class.isAssignableFrom(provider.getClass()))
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "The " + parser.getObjectNamePlural() + " provider does not support this ServicePath."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "The " + parser.getObjectNamePlural() + " provider does not support this ServicePath."), ResponseAction.QUERY, responseParam);
}
- PagingInfo pagingInfo = getPagingInfo();
+ PagingInfo pagingInfo = null;
try
{
+ pagingInfo = getPagingInfo();
if (pretendDelayed())
{
// Simply send a response with status of 202
@@ -355,26 +364,26 @@ public Response getServicePathQuery()
}
else
{
- Object returnObj = QueryProvider.class.cast(provider).retrieveByServicePath(parser.getQueryCriteria(), getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true));
+ Object returnObj = QueryProvider.class.cast(provider).retrieveByServicePath(parser.getQueryCriteria(), getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true), responseParam);
- return makePagedResponse(returnObj, pagingInfo, null, false, provider.getMarshaller());
+ return makePagedResponse(returnObj, pagingInfo, false, responseParam, provider.getMarshaller());
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (IllegalArgumentException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (UnsupportedQueryException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (DataTooLargeException ex)
{
- return makeErrorResponse(new ErrorDetails(CommonConstants.RESPONSE_TOO_LARGE, "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(CommonConstants.RESPONSE_TOO_LARGE, "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
}
@@ -389,21 +398,24 @@ public Response getMany()
logger.debug("Get List (REST GET - Plural)");
}
- ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, true);
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
+
+ ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, true, true);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, responseParam);
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.QUERY, responseParam);
}
- PagingInfo pagingInfo = getPagingInfo();
+ PagingInfo pagingInfo = null;
try
{
+ pagingInfo = getPagingInfo();
if (pretendDelayed())
{
// Simply send a response with status of 202
@@ -431,7 +443,7 @@ public Response getMany()
}
// Return the results.
- Object returnObj = csProvider.getChangesSince(getSifZone(), getSifContext(), pagingInfo, new ChangedSinceInfo(changesSinceMarker), getRequestMetadata(getSIF3SessionForRequest(), true));
+ Object returnObj = csProvider.getChangesSince(getSifZone(), getSifContext(), pagingInfo, new ChangedSinceInfo(changesSinceMarker), getRequestMetadata(getSIF3SessionForRequest(), true), responseParam);
// Check if we have pagingInfo parameter and if so if the navigationID is set. If it is not set we set it to the value of the
// newChangesSinceMarker. Consumer can use this to identify which query the provider ran in subsequent paged queries.
@@ -440,43 +452,43 @@ public Response getMany()
pagingInfo.setNavigationId(newChangesSinceMarker);
}
- return makePagedResponse(returnObj, pagingInfo, customHeaders, false, provider.getMarshaller());
+ return makePagedResponse(returnObj, pagingInfo, false, responseParam, provider.getMarshaller());
}
else // changes since is not supported => Error
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Provider for "+dmObjectNamePlural+" does not support 'ChangesSince' functionality."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Provider for "+dmObjectNamePlural+" does not support 'ChangesSince' functionality."), ResponseAction.QUERY, responseParam);
}
}
else // It is a standard request and/or provider
{
if (changesSinceMarker != null) // Provider is a standard provider but changesSince marker is provided => Error
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Provider for "+dmObjectNamePlural+" does not support 'ChangesSince' functionality."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Provider for "+dmObjectNamePlural+" does not support 'ChangesSince' functionality."), ResponseAction.QUERY, responseParam);
}
else // All good.
{
- Object returnObj = provider.retrieve(getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true));
- return makePagedResponse(returnObj, pagingInfo, null, false, provider.getMarshaller());
+ Object returnObj = provider.retrieve(getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true), responseParam);
+ return makePagedResponse(returnObj, pagingInfo, false, responseParam, provider.getMarshaller());
}
}
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getMultiObjectClassInfo().getObjectName()+" with Paging Information: "+pagingInfo+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getMultiObjectClassInfo().getObjectName()+" with Paging Information: "+pagingInfo+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (IllegalArgumentException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getMultiObjectClassInfo().getObjectName()+" with Paging Information: "+pagingInfo+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to retrieve "+provider.getMultiObjectClassInfo().getObjectName()+" with Paging Information: "+pagingInfo+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (UnsupportedQueryException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Failed to retrieve "+provider.getMultiObjectClassInfo().getObjectName()+" with Paging Information: "+pagingInfo+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Failed to retrieve "+provider.getMultiObjectClassInfo().getObjectName()+" with Paging Information: "+pagingInfo+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (DataTooLargeException ex)
{
- return makeErrorResponse(new ErrorDetails(CommonConstants.RESPONSE_TOO_LARGE, "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(CommonConstants.RESPONSE_TOO_LARGE, "Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
}
@@ -496,44 +508,46 @@ public Response updateSingle(String payload, @PathParam("resourceID") String res
logger.debug("Update Single "+dmObjectNamePlural+" (REST PUT) with resourceID = "+resourceID+", URL Postfix mimeType = "+mimeType+"' and input data: " + payload);
}
- ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.UPDATE), AccessType.APPROVED, false);
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
+
+ ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.UPDATE), AccessType.APPROVED, false, true);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.UPDATE);
+ return makeErrorResponse(error, ResponseAction.UPDATE, responseParam);
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.UPDATE, responseParam);
}
try
{
- if (provider.updateSingle(provider.getUnmarshaller().unmarshal(payload, provider.getSingleObjectClassInfo().getObjectType(), getRequestMediaType()), resourceID, getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false)))
+ if (provider.updateSingle(provider.getUnmarshaller().unmarshal(payload, provider.getSingleObjectClassInfo().getObjectType(), getRequestMediaType()), resourceID, getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false), responseParam))
{
- return makeResopnseWithNoContent(false, ResponseAction.UPDATE);
+ return makeResopnseWithNoContent(false, ResponseAction.UPDATE, responseParam);
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+" does not exist."), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+" does not exist."), ResponseAction.UPDATE, responseParam);
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE, responseParam);
}
catch (IllegalArgumentException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE, responseParam);
}
catch (UnmarshalException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE, responseParam);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE, responseParam);
}
}
@@ -558,17 +572,17 @@ public Response updateMany(String payload)
}
}
- ErrorDetails error = validClient(dmObjectNamePlural, ((doDelete) ? getRight(AccessRight.DELETE) : getRight(AccessRight.UPDATE)), AccessType.APPROVED, true);
+ ErrorDetails error = validClient(dmObjectNamePlural, ((doDelete) ? getRight(AccessRight.DELETE) : getRight(AccessRight.UPDATE)), AccessType.APPROVED, true, true);
if (error != null) // Not allowed to access!
{
logger.debug("Error Found: "+error);
- return makeErrorResponse(error, ((doDelete) ? ResponseAction.DELETE : ResponseAction.UPDATE));
+ return makeErrorResponse(error, ((doDelete) ? ResponseAction.DELETE : ResponseAction.UPDATE), getInitialCustomResponseParameters());
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ((doDelete) ? ResponseAction.DELETE : ResponseAction.UPDATE));
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ((doDelete) ? ResponseAction.DELETE : ResponseAction.UPDATE), getInitialCustomResponseParameters());
}
return (doDelete) ? deleteMany(provider, payload) : updateMany(provider, payload);
@@ -589,37 +603,39 @@ public Response removeSingle(@PathParam("resourceID") String resourceID, @PathPa
logger.debug("Remove Single "+dmObjectNamePlural+" (REST DELETE) with resourceID = "+resourceID + " and URL Postfix mimeType = '" + mimeType + "'.");
}
- ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.DELETE), AccessType.APPROVED, false);
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
+
+ ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.DELETE), AccessType.APPROVED, false, true);
if (error != null) // Not allowed to access!
{
logger.debug("Error Found: "+error);
- return makeErrorResponse(error, ResponseAction.DELETE);
+ return makeErrorResponse(error, ResponseAction.DELETE, responseParam);
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "No Provider for "+dmObjectNamePlural+" available."), ResponseAction.DELETE, responseParam);
}
try
{
- if (provider.deleteSingle(resourceID, getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false)))
+ if (provider.deleteSingle(resourceID, getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false), responseParam))
{
- return makeResopnseWithNoContent(false, ResponseAction.DELETE);
+ return makeResopnseWithNoContent(false, ResponseAction.DELETE, responseParam);
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+" does not exist."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+" does not exist."), ResponseAction.DELETE, responseParam);
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.DELETE, responseParam);
}
catch (IllegalArgumentException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete "+provider.getSingleObjectClassInfo().getObjectName()+" with resouce ID = "+resourceID+". Problem reported: "+ex.getMessage()), ResponseAction.DELETE, responseParam);
}
}
@@ -639,7 +655,7 @@ public Response removeMany(String payload)
logger.debug("Delete Collection "+dmObjectNamePlural+" (REST DELETE) with input data: " + payload);
}
ErrorDetails error = new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Operation not supported.", "Use HTTP PUT with header field '"+RequestHeaderConstants.HDR_METHOD_OVERRIDE+"' set to "+HeaderValues.MethodType.DELETE.name()+" instead.");
- return makeErrorResponse(error, ResponseAction.DELETE);
+ return makeErrorResponse(error, ResponseAction.DELETE, getInitialCustomResponseParameters());
}
@@ -659,22 +675,30 @@ public Response getServiceInfo()
logger.debug("Get Service Info (REST HEAD)");
}
- ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, true);
+ ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, true, true);
if (error != null) // Not allowed to access!
{
- return makeResponse(null, error.getErrorCode(), true, ResponseAction.HEAD, null);
+ return makeResponse(null, error.getErrorCode(), true, ResponseAction.HEAD, getInitialCustomResponseParameters(), null);
}
Provider provider = getProvider();
if (provider == null) // error already logged but we must return an error response for the caller
{
- return makeResponse(null, Status.SERVICE_UNAVAILABLE.getStatusCode(), true, ResponseAction.HEAD, null);
+ return makeResponse(null, Status.SERVICE_UNAVAILABLE.getStatusCode(), true, ResponseAction.HEAD, getInitialCustomResponseParameters(), null);
}
- PagingInfo pagingInfo = getPagingInfo();
+ PagingInfo pagingInfo = null;
try
{
+ pagingInfo = getPagingInfo();
+ HeaderProperties defaultCustomHeaders = getInitialCustomResponseParameters().getHttpHeaderParams();
HeaderProperties customHeaders = provider.getServiceInfo(getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true));
+ if (customHeaders != null)
+ {
+ // Copy customHeaders to defaultCustomHeaders to ensure the correct override order.
+ defaultCustomHeaders.addHeaderProperties(customHeaders);
+ }
+
if (logger.isDebugEnabled())
{
logger.debug("Custom headers to be returned from 'getServiceInfo()' method:\n"+customHeaders);
@@ -686,33 +710,29 @@ public Response getServiceInfo()
{
if (csProvider.changesSinceSupported())
{
- if (customHeaders == null)
- {
- customHeaders = new HeaderProperties();
- }
-
- customHeaders.setHeaderProperty(ResponseHeaderConstants.HDR_CHANGES_SINCE_MARKER, csProvider.getLatestOpaqueMarker(getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true)));
+ defaultCustomHeaders.setHeaderProperty(ResponseHeaderConstants.HDR_CHANGES_SINCE_MARKER, csProvider.getLatestOpaqueMarker(getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true)));
}
}
- return makePagedResponse(null, pagingInfo, customHeaders, false, null);
+ ResponseParameters responseParams = new ResponseParameters(defaultCustomHeaders);
+ return makePagedResponse(null, pagingInfo, false, responseParams, null);
}
catch (PersistenceException ex)
{
- return makeResponse(null, Status.INTERNAL_SERVER_ERROR.getStatusCode(), true, ResponseAction.HEAD, null);
+ return makeResponse(null, Status.INTERNAL_SERVER_ERROR.getStatusCode(), true, ResponseAction.HEAD, getInitialCustomResponseParameters(), null);
}
catch (IllegalArgumentException ex)
{
- return makeResponse(null, Status.INTERNAL_SERVER_ERROR.getStatusCode(), true, ResponseAction.HEAD, null);
+ return makeResponse(null, Status.INTERNAL_SERVER_ERROR.getStatusCode(), true, ResponseAction.HEAD, getInitialCustomResponseParameters(), null);
}
catch (UnsupportedQueryException ex)
{
- return makeResponse(null, Status.BAD_REQUEST.getStatusCode(), true, ResponseAction.HEAD, null);
+ return makeResponse(null, Status.BAD_REQUEST.getStatusCode(), true, ResponseAction.HEAD, getInitialCustomResponseParameters(), null);
}
catch (DataTooLargeException ex)
{
- return makeResponse(null, CommonConstants.RESPONSE_TOO_LARGE, true, ResponseAction.HEAD, null);
+ return makeResponse(null, CommonConstants.RESPONSE_TOO_LARGE, true, ResponseAction.HEAD, getInitialCustomResponseParameters(), null);
}
}
@@ -727,12 +747,12 @@ public Response getServicePathInfo()
{
logger.debug("Get Service Path Info (REST HEAD)");
}
- ErrorDetails error = validClient(parser.getServicePath(), getRight(AccessRight.QUERY), AccessType.APPROVED, true);
+ ErrorDetails error = validClient(parser.getServicePath(), getRight(AccessRight.QUERY), AccessType.APPROVED, true, true);
if (error != null) // Not allowed to access!
{
- return makeResponse(null, error.getErrorCode(), true, ResponseAction.QUERY, null);
+ return makeResponse(null, error.getErrorCode(), true, ResponseAction.QUERY, getInitialCustomResponseParameters(), null);
}
- return makeResponse(null, Status.NO_CONTENT.getStatusCode(), false, ResponseAction.QUERY, null);
+ return makeResponse(null, Status.NO_CONTENT.getStatusCode(), false, ResponseAction.QUERY, getInitialCustomResponseParameters(), null);
}
@@ -747,12 +767,12 @@ public Response getSingleObjectServiceInfo()
{
logger.debug("Get Single Object Service Info (REST HEAD)");
}
- ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, false);
+ ErrorDetails error = validClient(dmObjectNamePlural, getRight(AccessRight.QUERY), AccessType.APPROVED, false, true);
if (error != null) // Not allowed to access!
{
- return makeResponse(null, error.getErrorCode(), true, ResponseAction.QUERY, null);
+ return makeResponse(null, error.getErrorCode(), true, ResponseAction.QUERY, getInitialCustomResponseParameters(), null);
}
- return makeResponse(null, Status.NO_CONTENT.getStatusCode(), false, ResponseAction.QUERY, null);
+ return makeResponse(null, Status.NO_CONTENT.getStatusCode(), false, ResponseAction.QUERY, getInitialCustomResponseParameters(), null);
}
/*------------------------*/
@@ -814,13 +834,20 @@ private AccessRight getRight(AccessRight directEnvRight)
return getProviderEnvironment().getEnvironmentType() == EnvironmentType.DIRECT ? directEnvRight : AccessRight.PROVIDE;
}
- private PagingInfo getPagingInfo()
+ /*
+ * IllegalArgumentException if page number is <=0 which is not valid.
+ */
+ private PagingInfo getPagingInfo() throws IllegalArgumentException
{
PagingInfo pagingInfo = new PagingInfo(getSIFHeaderProperties(), getQueryParameters());
if (pagingInfo.getPageSize() <= PagingInfo.NOT_DEFINED) // page size not defined. Pass null to provider.
{
pagingInfo = null;
}
+ else if (pagingInfo.getCurrentPageNo() <= 0)
+ {
+ throw new IllegalArgumentException("Page Number to be returned was set to "+pagingInfo.getCurrentPageNo()+". Must be "+CommonConstants.FIRST_PAGE+" or higher.");
+ }
else
{
pagingInfo = pagingInfo.clone(); // ensure that initial values are not overridden in case we need them later,
@@ -855,6 +882,7 @@ private ChangesSinceProvider getChangesSinceProvider(Provider provider)
private Response updateMany(Provider provider, String payload)
{
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
try
{
if (pretendDelayed())
@@ -864,34 +892,35 @@ private Response updateMany(Provider provider, String payload)
}
else
{
- List statusList = provider.updateMany(provider.getUnmarshaller().unmarshal(payload, provider.getMultiObjectClassInfo().getObjectType(), getRequestMediaType()), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false));
+ List statusList = provider.updateMany(provider.getUnmarshaller().unmarshal(payload, provider.getMultiObjectClassInfo().getObjectType(), getRequestMediaType()), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false), responseParam);
if (statusList != null)
{
- return makeUpdateMultipleResponse(statusList, Status.OK);
+ return makeUpdateMultipleResponse(statusList, Status.OK, responseParam);
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Contact your System Administrator."), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Contact your System Administrator."), ResponseAction.UPDATE, responseParam);
}
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Problem reported: "+ex.getMessage()), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to update "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Problem reported: "+ex.getMessage()), ResponseAction.UPDATE, responseParam);
}
catch (UnmarshalException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getMultiObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getMultiObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE, responseParam);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE);
+ return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.UPDATE, responseParam);
}
}
private Response deleteMany(Provider provider, String payload)
{
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
try
{
if (pretendDelayed())
@@ -901,34 +930,35 @@ private Response deleteMany(Provider provider, String payload)
}
else
{
- List statusList = provider.deleteMany(getResourceIDsFromDeleteRequest(payload), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false));
+ List statusList = provider.deleteMany(getResourceIDsFromDeleteRequest(payload), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false), responseParam);
if (statusList != null)
{
- return makeDeleteMultipleResponse(statusList, Status.OK);
+ return makeDeleteMultipleResponse(statusList, Status.OK, responseParam);
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete " + provider.getMultiObjectClassInfo().getObjectName() + " (Bulk Operation). Contact your System Administrator."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete " + provider.getMultiObjectClassInfo().getObjectName() + " (Bulk Operation). Contact your System Administrator."), ResponseAction.DELETE, responseParam);
}
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete " + provider.getMultiObjectClassInfo().getObjectName() + " (Bulk Operation). Problem reported: " + ex.getMessage()), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to delete " + provider.getMultiObjectClassInfo().getObjectName() + " (Bulk Operation). Problem reported: " + ex.getMessage()), ResponseAction.DELETE, responseParam);
}
catch (UnmarshalException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to DeleteRequestType. Problem reported: " + ex.getMessage()), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to DeleteRequestType. Problem reported: " + ex.getMessage()), ResponseAction.DELETE, responseParam);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to DeleteRequestType. Problem reported: " + ex.getMessage()), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to DeleteRequestType. Problem reported: " + ex.getMessage()), ResponseAction.DELETE, responseParam);
}
}
private Response createMany(Provider provider, String payload)
{
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
try
{
if (pretendDelayed())
@@ -938,43 +968,45 @@ private Response createMany(Provider provider, String payload)
}
else
{
- List statusList = provider.createMany(provider.getUnmarshaller().unmarshal(payload, provider.getMultiObjectClassInfo().getObjectType(), getRequestMediaType()), getAdvisory(), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false));
+ List statusList = provider.createMany(provider.getUnmarshaller().unmarshal(payload, provider.getMultiObjectClassInfo().getObjectType(), getRequestMediaType()), getAdvisory(), getSifZone(), getSifContext(), getRequestMetadata(getSIF3SessionForRequest(), false), responseParam);
if (statusList != null)
{
- return makeCreateMultipleResponse(statusList, Status.CREATED);
+ return makeCreateMultipleResponse(statusList, Status.CREATED, responseParam);
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Contact your System Administrator."), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Contact your System Administrator."), ResponseAction.CREATE, responseParam);
}
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Problem reported: "+ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create "+provider.getMultiObjectClassInfo().getObjectName()+" (Bulk Operation). Problem reported: "+ex.getMessage()), ResponseAction.CREATE, responseParam);
}
catch (UnmarshalException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getMultiObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Could not unmarshal the given data to "+provider.getMultiObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE, responseParam);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.CREATE, responseParam);
}
}
private Response queryByQBE(Provider provider, String payload)
{
- PagingInfo pagingInfo = getPagingInfo();
+ ResponseParameters responseParam = getInitialCustomResponseParameters();
if (provider == null || !QueryProvider.class.isAssignableFrom(provider.getClass()))
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "The " + provider.getMultiObjectClassInfo().getObjectName() + " does not support QBE style queries."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "The " + provider.getMultiObjectClassInfo().getObjectName() + " does not support QBE style queries."), ResponseAction.QUERY, responseParam);
}
+ PagingInfo pagingInfo = null;
try
{
+ pagingInfo = getPagingInfo();
if (pretendDelayed())
{
// Simply send a response with status of 202
@@ -982,34 +1014,34 @@ private Response queryByQBE(Provider provider, String payload)
}
else
{
- Object returnObj = QueryProvider.class.cast(provider).retrieveByQBE(provider.getUnmarshaller().unmarshal(payload, provider.getSingleObjectClassInfo().getObjectType(), getRequestMediaType()), getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true));
+ Object returnObj = QueryProvider.class.cast(provider).retrieveByQBE(provider.getUnmarshaller().unmarshal(payload, provider.getSingleObjectClassInfo().getObjectType(), getRequestMediaType()), getSifZone(), getSifContext(), pagingInfo, getRequestMetadata(getSIF3SessionForRequest(), true), responseParam);
- return makePagedResponse(returnObj, pagingInfo, null, false, provider.getMarshaller());
+ return makePagedResponse(returnObj, pagingInfo, false, responseParam, provider.getMarshaller());
}
}
catch (PersistenceException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (UnmarshalException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "(QBE) Could not unmarshal the given data to payload. Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "(QBE) Could not unmarshal the given data to payload. Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (IllegalArgumentException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (UnsupportedQueryException ex)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (DataTooLargeException ex)
{
- return makeErrorResponse(new ErrorDetails(CommonConstants.RESPONSE_TOO_LARGE, "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(CommonConstants.RESPONSE_TOO_LARGE, "(QBE) Failed to retrieve " + provider.getMultiObjectClassInfo().getObjectName() + " with Paging Information: " + pagingInfo + ". Problem reported: " + ex.getMessage()), ResponseAction.QUERY, responseParam);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "(QBE) Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "(QBE) Could not unmarshal the given data to "+provider.getSingleObjectClassInfo().getObjectName()+". Problem reported: "+ex.getMessage()), ResponseAction.QUERY, responseParam);
}
}
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/EnvironmentResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/EnvironmentResource.java
similarity index 87%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/EnvironmentResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/EnvironmentResource.java
index 5d6ff0da..a5d7315e 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/EnvironmentResource.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/EnvironmentResource.java
@@ -143,7 +143,7 @@ public Response createEnvironment(String payload, @PathParam("mimeType") String
ArrayList envError = envDataValid(inputEnv);
if (envError != null)
{
- return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Cannot create Consumer Environment.", "Missing or invalid data: "+envError), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.BAD_REQUEST.getStatusCode(), "Cannot create Consumer Environment.", "Missing or invalid data: "+envError), ResponseAction.CREATE, getInitialCustomResponseParameters());
}
ProviderEnvironment envInfo = getEnvironment();
@@ -154,7 +154,7 @@ public Response createEnvironment(String payload, @PathParam("mimeType") String
if (appEnvTemplate == null) // not good. No template known for this environment key
{
ErrorDetails error = new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "No environment template known for the given environment: "+envKey);
- return makeErrorResponse(error, ResponseAction.CREATE);
+ return makeErrorResponse(error, ResponseAction.CREATE, getInitialCustomResponseParameters());
}
// check if initial Authentication Token is valid for this environment template.
@@ -162,7 +162,7 @@ public Response createEnvironment(String payload, @PathParam("mimeType") String
if (!getAuthInfo().getAuthMethod().toString().equals(appEnvTemplate.getAuthMethod()))
{
ErrorDetails error = new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "Not Authorized.", "Invalid authentication method. Authentication method must be "+appEnvTemplate.getAuthMethod());
- return makeErrorResponse(error, ResponseAction.CREATE);
+ return makeErrorResponse(error, ResponseAction.CREATE, getInitialCustomResponseParameters());
}
// No validation of token required if it is bearer token because it was validated in getBearerTokenInfo()
@@ -172,7 +172,7 @@ public Response createEnvironment(String payload, @PathParam("mimeType") String
ErrorDetails errors = validateNoneBearerAuthToken(appEnvTemplate.getApplicationKey(), appEnvTemplate.getPassword());
if (errors != null) // we had an issue with the authentication => return error.
{
- return makeErrorResponse(errors, ResponseAction.CREATE);
+ return makeErrorResponse(errors, ResponseAction.CREATE, getInitialCustomResponseParameters());
}
}
@@ -191,7 +191,7 @@ public Response createEnvironment(String payload, @PathParam("mimeType") String
// Check if the response shall contain an error message rather than the environment XML.
if (envInfo.getEnvCreateConflictIsError())
{
- return makeErrorResponse(new ErrorDetails(Status.CONFLICT.getStatusCode(), Status.CONFLICT.getReasonPhrase(), "An environment '"+envInfo.getEnvironmentName()+"' for consumer '"+inputEnv.getConsumerName()+"' already exists. Cannot create it again."), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.CONFLICT.getStatusCode(), Status.CONFLICT.getReasonPhrase(), "An environment '"+envInfo.getEnvironmentName()+"' for consumer '"+inputEnv.getConsumerName()+"' already exists. Cannot create it again."), ResponseAction.CREATE, getInitialCustomResponseParameters());
}
else
{
@@ -205,7 +205,7 @@ public Response createEnvironment(String payload, @PathParam("mimeType") String
if (environment == null) // We had a problem. Error logged
{
- return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create environment for '"+envInfo.getEnvironmentName()+"' for consumer '"+inputEnv.getConsumerName()+"'.", "Internal System error. Please contact your system administrator."), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to create environment for '"+envInfo.getEnvironmentName()+"' for consumer '"+inputEnv.getConsumerName()+"'.", "Internal System error. Please contact your system administrator."), ResponseAction.CREATE, getInitialCustomResponseParameters());
}
else // Ensure local session token is set for later authentication
{
@@ -219,25 +219,25 @@ public Response createEnvironment(String payload, @PathParam("mimeType") String
{
logger.error("Failed to unmarshal payload into an environment: "+ ex.getMessage(), ex);
logger.error("Environment Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal environment payload: "+ ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal environment payload: "+ ex.getMessage()), ResponseAction.CREATE, getInitialCustomResponseParameters());
}
catch (UnsupportedMediaTypeExcpetion ex)
{
logger.error("Failed to unmarshal payload into an environment: "+ ex.getMessage(), ex);
logger.error("Environment Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to unmarshal environment payload: "+ ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to unmarshal environment payload: "+ ex.getMessage()), ResponseAction.CREATE, getInitialCustomResponseParameters());
}
catch (VerifyError ex)
{
logger.error("Security Token issue. See previous error log entries.", ex);
logger.error("Environment Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "Not authorized.", ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "Not authorized.", ex.getMessage()), ResponseAction.CREATE, getInitialCustomResponseParameters());
}
catch (Exception ex)
{
logger.error("Failed to create/retrieve environment session: "+ ex.getMessage(), ex);
logger.error("Environment Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal environment payload: "+ ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal environment payload: "+ ex.getMessage()), ResponseAction.CREATE, getInitialCustomResponseParameters());
}
}
@@ -261,11 +261,14 @@ public Response getEnvironment(@PathParam("id") String id,
}
catch (VerifyError ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "Not Authorized.", ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "Not Authorized.", ex.getMessage()), ResponseAction.QUERY, getInitialCustomResponseParameters());
}
// token already validated by getBearerTokenInfo() method above
- ErrorDetails errors = validSession(getAuthInfo(), false, tokenInfo);
+// ErrorDetails errors = validSession(getAuthInfo(), false, tokenInfo);
+
+ ErrorDetails errors = validateSession(false);
+
if (errors == null)
{
// If we get here then a session exists for the given security token and is now in the session
@@ -279,7 +282,7 @@ public Response getEnvironment(@PathParam("id") String id,
if (!id.equals(environment.getId()))
{
errors = new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Environment with id "+id+" does not exist.");
- return makeErrorResponse(errors, ResponseAction.QUERY);
+ return makeErrorResponse(errors, ResponseAction.QUERY, getInitialCustomResponseParameters());
}
return createEnvResponse(environment, Status.OK.getStatusCode(), ResponseAction.QUERY);
@@ -287,13 +290,13 @@ public Response getEnvironment(@PathParam("id") String id,
catch (Exception ex)
{
logger.error("Failed to retrieve environment with ID = "+id+": "+ ex.getMessage(), ex);
- return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Error accessing environment store: "+ ex.getMessage()), ResponseAction.QUERY);
+ return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Error accessing environment store: "+ ex.getMessage()), ResponseAction.QUERY, getInitialCustomResponseParameters());
}
}
else
{
logger.debug("Error Found: "+errors);
- return makeErrorResponse(errors, ResponseAction.QUERY);
+ return makeErrorResponse(errors, ResponseAction.QUERY, getInitialCustomResponseParameters());
}
}
@@ -317,11 +320,12 @@ public Response deleteEnvironment(@PathParam("id") String id,
}
catch (VerifyError ex)
{
- return makeErrorResponse(new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "Not Authorized.", ex.getMessage()), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.UNAUTHORIZED.getStatusCode(), "Not Authorized.", ex.getMessage()), ResponseAction.DELETE, getInitialCustomResponseParameters());
}
// token already validated by getBearerTokenInfo() method above
- ErrorDetails errors = validSession(getAuthInfo(), false, tokenInfo);
+// ErrorDetails errors = validSession(getAuthInfo(), false, tokenInfo);
+ ErrorDetails errors = validateSession(false);
if (errors == null)
{
try
@@ -335,30 +339,30 @@ public Response deleteEnvironment(@PathParam("id") String id,
if (!id.equals(environment.getId()))
{
errors = new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Environment with id "+id+" does not exist. No action taken.");
- return makeErrorResponse(errors, ResponseAction.DELETE);
+ return makeErrorResponse(errors, ResponseAction.DELETE, getInitialCustomResponseParameters());
}
if (getDirectEnvironmentManager().removeEnvironmentBySessionToken(sif3Session.getSessionToken(), true))
{
- return makeResopnseWithNoContent(false, ResponseAction.DELETE);
+ return makeResopnseWithNoContent(false, ResponseAction.DELETE, getInitialCustomResponseParameters());
}
else
{
logger.error("Environment with id "+id+" couldn't be deleted. See error log for details.");
errors = new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Environment with id "+id+" couldn't be deleted.");
- return makeErrorResponse(errors, ResponseAction.DELETE);
+ return makeErrorResponse(errors, ResponseAction.DELETE, getInitialCustomResponseParameters());
}
}
catch (Exception ex)
{
logger.error("Failed to retrieve & remove environment with ID = "+id+": "+ ex.getMessage(), ex);
- return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Error accessing environment store: "+ ex.getMessage()), ResponseAction.DELETE);
+ return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Error accessing environment store: "+ ex.getMessage()), ResponseAction.DELETE, getInitialCustomResponseParameters());
}
}
else
{
logger.debug("Error Found: "+errors);
- return makeErrorResponse(errors, ResponseAction.DELETE);
+ return makeErrorResponse(errors, ResponseAction.DELETE, getInitialCustomResponseParameters());
}
}
@@ -415,7 +419,7 @@ private ArrayList envDataValid(EnvironmentType environment)
private Response createEnvResponse(EnvironmentType environment, int statusCode, ResponseAction responseAction)
{
- return makeResponse(environment, statusCode, false, responseAction, getInfraMarshaller());
+ return makeResponse(environment, statusCode, false, responseAction, getInitialCustomResponseParameters(), getInfraMarshaller());
}
private void checkValue(String value, String elementName, ArrayList errors)
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/EventResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/EventResource.java
similarity index 96%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/EventResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/EventResource.java
index 8e982e31..889cfe7a 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/EventResource.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/EventResource.java
@@ -85,7 +85,7 @@ public Response createEvent(String eventPayload)
logger.debug("Create Event (REST POST) with input data: " + eventPayload);
}
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Events not supported.", "This DIRECT Environment implementation does not support events, yet."), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Events not supported.", "This DIRECT Environment implementation does not support events, yet."), ResponseAction.CREATE, null);
}
@Override
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/InfraResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/InfraResource.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/InfraResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/InfraResource.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/QueueResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/QueueResource.java
similarity index 92%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/QueueResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/QueueResource.java
index 2e138632..5113afac 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/QueueResource.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/QueueResource.java
@@ -137,7 +137,7 @@ public Response getAllQueues()
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, null);
}
QueueCollectionType queuesCollection = infraObjectFactory.createQueueCollectionType();
for (QueueType queue : queues.values())
@@ -148,11 +148,11 @@ public Response getAllQueues()
// {
// queues.getQueue().add(dummyQueue);
// }
- return makeResponse(queuesCollection, Status.OK.getStatusCode(), false, ResponseAction.QUERY, getInfraMarshaller());
+ return makeResponse(queuesCollection, Status.OK.getStatusCode(), false, ResponseAction.QUERY, null, getInfraMarshaller());
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.QUERY, null);
}
}
@@ -177,21 +177,21 @@ public Response getQueue(@PathParam("queueID") String queueID,
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, null);
}
QueueType queue = queues.get(queueID);
if (queue != null)
{
- return makeResponse(queue, Status.OK.getStatusCode(), false, ResponseAction.QUERY, getInfraMarshaller());
+ return makeResponse(queue, Status.OK.getStatusCode(), false, ResponseAction.QUERY, null, getInfraMarshaller());
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Queues with ID = "+queueID+" does not exist."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Queues with ID = "+queueID+" does not exist."), ResponseAction.QUERY, null);
}
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.QUERY, null);
}
}
@@ -214,7 +214,7 @@ public Response createQueue(String payload)
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.CREATE);
+ return makeErrorResponse(error, ResponseAction.CREATE, null);
}
try
{
@@ -223,24 +223,24 @@ public Response createQueue(String payload)
queues.put(outputQueue.getId(), outputQueue);
- return makeResponse(outputQueue, Status.CREATED.getStatusCode(), false, ResponseAction.CREATE, getInfraMarshaller());
+ return makeResponse(outputQueue, Status.CREATED.getStatusCode(), false, ResponseAction.CREATE, null, getInfraMarshaller());
}
catch (UnmarshalException ex)
{
logger.error("Failed to unmarshal payload into an QueueType: "+ ex.getMessage(), ex);
logger.error("Queue Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal queue payload: "+ ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal queue payload: "+ ex.getMessage()), ResponseAction.CREATE, null);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
logger.error("Failed to unmarshal payload into an QueueType: "+ ex.getMessage(), ex);
logger.error("Queue Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to unmarshal queue payload: "+ ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to unmarshal queue payload: "+ ex.getMessage()), ResponseAction.CREATE, null);
}
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.CREATE, null);
}
}
@@ -265,7 +265,7 @@ public Response removeQueue(@PathParam("queueID") String queueID,
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.DELETE);
+ return makeErrorResponse(error, ResponseAction.DELETE, null);
}
QueueType queue = queues.get(queueID);
@@ -274,16 +274,16 @@ public Response removeQueue(@PathParam("queueID") String queueID,
queues.remove(queue.getId());
numGetMessages = 0;
messageIDMap = new HashMap();
- return makeResopnseWithNoContent(false, ResponseAction.DELETE);
+ return makeResopnseWithNoContent(false, ResponseAction.DELETE, null);
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Queues with ID = "+queueID+" does not exist."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Queues with ID = "+queueID+" does not exist."), ResponseAction.DELETE, null);
}
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.DELETE, null);
}
}
@@ -312,7 +312,7 @@ public Response getNextMessage(@PathParam("queueID") String queueID,
logger.debug("Consumer ID = "+consumerID+" requested next message");
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, null);
}
QueueType queue = queues.get(queueID);
@@ -334,13 +334,13 @@ public Response getNextMessage(@PathParam("queueID") String queueID,
else
{
messageIDMap.put(consumerID, null);
- return makeResopnseWithNoContent(false, ResponseAction.QUERY);
+ return makeResopnseWithNoContent(false, ResponseAction.QUERY, null);
}
}
else // message id doesn't match
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Delete Message ID = "+getDeleteMessageId()+" is not the last delivered message."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Delete Message ID = "+getDeleteMessageId()+" is not the last delivered message."), ResponseAction.QUERY, null);
}
}
else // deleted Message ID not set. Return next message but don't increase message count
@@ -350,12 +350,12 @@ public Response getNextMessage(@PathParam("queueID") String queueID,
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Queues with ID = "+queueID+" does not exist."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Queues with ID = "+queueID+" does not exist."), ResponseAction.QUERY, null);
}
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.QUERY, null);
}
}
@@ -377,7 +377,7 @@ public Response removeMessageFromQueue(@PathParam("queueID") String queueID,
String consumerID = getSIFHeaderProperties().getHeaderProperty(RequestHeaderConstants.HDR_CONSUMER_ID);
logger.debug("Remove Message from Queue (REST DELETE - Single) with queueID = "+queueID+", URL Postfix mime type = '"+mimeType+"' and message with ID = "+getDeleteMessageId()+" requested by consumer = "+consumerID);
}
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Queues not supported.", "This DIRECT Environment implementation does not support queues, yet."), ResponseAction.DELETE, null);
}
public String getDeleteMessageId()
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/SubscriptionResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/SubscriptionResource.java
similarity index 89%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/SubscriptionResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/SubscriptionResource.java
index d94bd082..fe1d81f7 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/SubscriptionResource.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/SubscriptionResource.java
@@ -109,18 +109,18 @@ public Response getAllSubscriptions()
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, null);
}
SubscriptionCollectionType subscriptions = infraObjectFactory.createSubscriptionCollectionType();
for (SubscriptionType subscription : subscriptionsSet.values())
{
subscriptions.getSubscription().add(subscription);
}
- return makeResponse(subscriptions, Status.OK.getStatusCode(), false, ResponseAction.QUERY, getInfraMarshaller());
+ return makeResponse(subscriptions, Status.OK.getStatusCode(), false, ResponseAction.QUERY, null, getInfraMarshaller());
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.QUERY, null);
}
}
@@ -145,21 +145,21 @@ public Response getSubscription(@PathParam("subscriptionID") String subscription
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.QUERY);
+ return makeErrorResponse(error, ResponseAction.QUERY, null);
}
SubscriptionType subscription = subscriptionsSet.get(subscriptionID);
if (subscription != null)
{
- return makeResponse(subscription, Status.OK.getStatusCode(), false, ResponseAction.QUERY, getInfraMarshaller());
+ return makeResponse(subscription, Status.OK.getStatusCode(), false, ResponseAction.QUERY, null, getInfraMarshaller());
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Subscription with ID = "+subscriptionID+" does not exist."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Subscription with ID = "+subscriptionID+" does not exist."), ResponseAction.QUERY, null);
}
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.QUERY);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.QUERY, null);
}
}
@@ -182,7 +182,7 @@ public Response createSubscription(String payload)
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.CREATE);
+ return makeErrorResponse(error, ResponseAction.CREATE, null);
}
try
{
@@ -190,24 +190,24 @@ public Response createSubscription(String payload)
inputSubscription.setId(UUIDGenerator.getUUID());
subscriptionsSet.put(inputSubscription.getId(), inputSubscription);
- return makeResponse(inputSubscription, Status.CREATED.getStatusCode(), false, ResponseAction.CREATE, getInfraMarshaller());
+ return makeResponse(inputSubscription, Status.CREATED.getStatusCode(), false, ResponseAction.CREATE, null, getInfraMarshaller());
}
catch (UnmarshalException ex)
{
logger.error("Failed to unmarshal payload into an SubscriptionType: "+ ex.getMessage(), ex);
logger.error("Subscription Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal subscription payload: "+ ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Failed to unmarshal subscription payload: "+ ex.getMessage()), ResponseAction.CREATE, null);
}
catch (UnsupportedMediaTypeExcpetion ex)
{
logger.error("Failed to unmarshal payload into an SubscriptionType: "+ ex.getMessage(), ex);
logger.error("Subscription Payload: "+ payload);
- return makeErrorResponse( new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to unmarshal subscription payload: "+ ex.getMessage()), ResponseAction.CREATE);
+ return makeErrorResponse( new ErrorDetails(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode(), "Failed to unmarshal subscription payload: "+ ex.getMessage()), ResponseAction.CREATE, null);
}
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.CREATE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.CREATE, null);
}
}
@@ -232,22 +232,22 @@ public Response removeSubscription(@PathParam("subscriptionID") String subscript
ErrorDetails error = validSession(getAuthInfo(), false, null);
if (error != null) // Not allowed to access!
{
- return makeErrorResponse(error, ResponseAction.DELETE);
+ return makeErrorResponse(error, ResponseAction.DELETE, null);
}
SubscriptionType subscription = subscriptionsSet.get(subscriptionID);
if (subscription != null)
{
subscriptionsSet.remove(subscriptionID);
- return makeResopnseWithNoContent(false, ResponseAction.DELETE);
+ return makeResopnseWithNoContent(false, ResponseAction.DELETE, null);
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Subscription with ID = "+subscriptionID+" does not exist."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.NOT_FOUND.getStatusCode(), "Subscription with ID = "+subscriptionID+" does not exist."), ResponseAction.DELETE, null);
}
}
else
{
- return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.DELETE);
+ return makeErrorResponse(new ErrorDetails(Status.SERVICE_UNAVAILABLE.getStatusCode(), "Subscriptions not supported.", "This DIRECT Environment implementation does not support subscriptions, yet."), ResponseAction.DELETE, null);
}
}
}
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/audit/AuditableResource.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/audit/AuditableResource.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/audit/AuditableResource.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/audit/AuditableResource.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/helper/ServicePathQueryParser.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/helper/ServicePathQueryParser.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/resource/helper/ServicePathQueryParser.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/resource/helper/ServicePathQueryParser.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/AuditFilter.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/AuditFilter.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/AuditFilter.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/AuditFilter.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/ProviderServletContext.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/ProviderServletContext.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/ProviderServletContext.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/ProviderServletContext.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/audit/AuditRequestWrapper.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/audit/AuditRequestWrapper.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/audit/AuditRequestWrapper.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/audit/AuditRequestWrapper.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/audit/AuditResponseWrapper.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/audit/AuditResponseWrapper.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/audit/AuditResponseWrapper.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/audit/AuditResponseWrapper.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/audit/HttpHeaders.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/audit/HttpHeaders.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/audit/HttpHeaders.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/audit/HttpHeaders.java
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/io/RecordingInputStream.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/io/RecordingInputStream.java
similarity index 85%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/io/RecordingInputStream.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/io/RecordingInputStream.java
index dcc11c49..841953b2 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/io/RecordingInputStream.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/io/RecordingInputStream.java
@@ -22,6 +22,7 @@
import java.io.InputStream;
import javax.servlet.ServletInputStream;
+import javax.servlet.ReadListener;
/**
*
@@ -81,4 +82,22 @@ public String getContent()
{
return new String(byteArrayOutputStream.toByteArray());
}
+
+ // @Override
+ public boolean isFinished()
+ {
+ return false;
+ }
+
+ // @Override
+ public boolean isReady()
+ {
+ return false;
+ }
+
+ // @Override
+ public void setReadListener(ReadListener arg0)
+ {
+ throw new IllegalStateException();
+ }
}
diff --git a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/io/TeeOutputStream.java b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/io/TeeOutputStream.java
similarity index 87%
rename from SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/io/TeeOutputStream.java
rename to SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/io/TeeOutputStream.java
index ee898852..ef1013e2 100644
--- a/SIF3InfraREST/sif3InfraREST/src/sif3/infra/rest/web/io/TeeOutputStream.java
+++ b/SIF3InfraREST/SIF3REST/src/main/java/sif3/infra/rest/web/io/TeeOutputStream.java
@@ -21,6 +21,7 @@
import java.io.OutputStream;
import javax.servlet.ServletOutputStream;
+import javax.servlet.WriteListener;
/**
*
@@ -79,4 +80,16 @@ public void close() throws IOException
this.branch.close();
}
}
+
+ // @Override
+ public boolean isReady()
+ {
+ return false;
+ }
+
+ // @Override
+ public void setWriteListener(WriteListener arg0)
+ {
+ throw new IllegalStateException();
+ }
}
diff --git a/SIF3InfraREST/SIF3REST/src/main/resources/license.txt b/SIF3InfraREST/SIF3REST/src/main/resources/license.txt
new file mode 100644
index 00000000..86f77fb0
--- /dev/null
+++ b/SIF3InfraREST/SIF3REST/src/main/resources/license.txt
@@ -0,0 +1,13 @@
+ Copyright 2016 Systemic Pty Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software distributed under the License
+ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ or implied.
+ See the License for the specific language governing permissions and limitations under the License.
+
\ No newline at end of file
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestObjectServiceClient.java b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestObjectServiceClient.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestObjectServiceClient.java
rename to SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestObjectServiceClient.java
index a52c87dd..f1674ead 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestObjectServiceClient.java
+++ b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestObjectServiceClient.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.rest.client;
+package sif3.infra.rest.test.client;
import java.net.URI;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestQueueClient.java b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestQueueClient.java
similarity index 93%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestQueueClient.java
rename to SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestQueueClient.java
index 63914e76..f52ecdad 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestQueueClient.java
+++ b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestQueueClient.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.rest.client;
+package sif3.infra.rest.test.client;
import java.net.URI;
@@ -40,6 +40,8 @@ public class TestQueueClient
// private static final String PROP_FILE_NAME="StudentConsumer";
// private AdapterEnvironmentStore store = new AdapterEnvironmentStore(PROP_FILE_NAME);
+ private static final int CONSUMER_INSTANCE_ID = 0;
+
// Local
private static final String CONSUMER_ID = "StudentConsumer";
@@ -217,7 +219,7 @@ private String testGetNextMessage(QueueType queue, String deleteMsgID) throws Ex
System.out.println("Get Next Message...");
MessageClient clt = new MessageClient(ConsumerEnvironmentManager.getInstance(), new URI(queue.getQueueUri()));
- Response response = clt.getMessage(deleteMsgID, "Thread-1");
+ Response response = clt.getMessage(deleteMsgID, CONSUMER_INSTANCE_ID);
printResponse(response);
String nextMsgID = response.getHdrProperties().getHeaderProperty(ResponseHeaderConstants.HDR_MESSAGE_ID);
System.out.println("Next Available message is: "+nextMsgID);
@@ -231,7 +233,7 @@ private String testGetNextMessages(QueueType queue) throws Exception
MessageClient clt = new MessageClient(ConsumerEnvironmentManager.getInstance(), new URI(queue.getQueueUri()));
for (int i = 0; i<10; i++)
{
- Response response = clt.getMessage(deleteMsgID, "Thread-1");
+ Response response = clt.getMessage(deleteMsgID, CONSUMER_INSTANCE_ID);
deleteMsgID = response.getHdrProperties().getHeaderProperty(ResponseHeaderConstants.HDR_MESSAGE_ID);
System.out.println("Returned message ID is: "+deleteMsgID);
}
@@ -242,7 +244,7 @@ private void testRemoveMessage(QueueType queue, String deleteMsgID) throws Excep
{
System.out.println("Remove Message...");
MessageClient clt = new MessageClient(ConsumerEnvironmentManager.getInstance(), new URI(queue.getQueueUri()));
- printResponse(clt.removeMessage(deleteMsgID, "Thread-1"));
+ printResponse(clt.removeMessage(deleteMsgID, CONSUMER_INSTANCE_ID));
System.out.println("Remove Message done.");
}
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestSubscriptionClient.java b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestSubscriptionClient.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestSubscriptionClient.java
rename to SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestSubscriptionClient.java
index cdfacb5f..e514ded3 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/client/TestSubscriptionClient.java
+++ b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/client/TestSubscriptionClient.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.rest.client;
+package sif3.infra.rest.test.client;
import java.net.URI;
diff --git a/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/env/TestConsumerConnector.java b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/env/TestConsumerConnector.java
new file mode 100644
index 00000000..f65805a3
--- /dev/null
+++ b/SIF3InfraREST/SIF3REST/src/test/java/sif3/infra/rest/test/env/TestConsumerConnector.java
@@ -0,0 +1,83 @@
+package sif3.infra.rest.test.env;
+
+import sif3.common.persist.common.HibernateUtil;
+import sif3.infra.common.env.mgr.ConsumerEnvironmentManager;
+import sif3.infra.rest.env.connectors.ConsumerEnvironmentConnector;
+
+public class TestConsumerConnector
+{
+ private static final String CONSUMER_PROP_FILE_NAME = "StudentConsumer";
+ // private static final String CONSUMER_PROP_FILE_NAME = "BrokeredAttTrackerConsumer";
+ // private static final String CONSUMER_PROP_FILE_NAME = "QueueTestConsumer";
+ // private static final String CONSUMER_PROP_FILE_NAME = "SecureStudentConsumer";
+
+ private ConsumerEnvironmentConnector connector = null;
+ private ConsumerEnvironmentManager envMgr = null;
+
+ public TestConsumerConnector()
+ {
+ HibernateUtil.initialise(null);
+ envMgr = ConsumerEnvironmentManager.initialse(CONSUMER_PROP_FILE_NAME);
+ connector = new ConsumerEnvironmentConnector(envMgr);
+ }
+
+ private void testConnect()
+ {
+ System.out.println("Start Testing to connect to environment.");
+ try
+ {
+ boolean success = connector.connect();
+ if (success)
+ {
+ System.out.println("Successfully connected to environment " + envMgr.getEnvironmentInfo().getEnvironmentName());
+ }
+ else
+ {
+ System.out.println("Failed to connect to environment " + envMgr.getEnvironmentInfo().getEnvironmentName() + ". See error log for details.");
+
+ }
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ System.out.println("End Testing to connect to environment.");
+ }
+
+ private void testDisconnect()
+ {
+ System.out.println("Start Testing to disconnect from environment.");
+ try
+ {
+ boolean success = connector.disconnect(envMgr.getEnvironmentInfo().getRemoveEnvOnShutdown());
+ if (success)
+ {
+ System.out.println("Successfully disconnected from environment " + envMgr.getEnvironmentInfo().getEnvironmentName());
+ }
+ else
+ {
+ System.out.println("Failed to disconnect from environment " + envMgr.getEnvironmentInfo().getEnvironmentName() + ". See error log for details.");
+
+ }
+ HibernateUtil.shutdown();
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ System.out.println("End Testing to disconnect from environment.");
+
+ }
+
+ public static void main(String[] args)
+ {
+ TestConsumerConnector tester = new TestConsumerConnector();
+
+ System.out.println("Start Testing TestConsumerConnector...");
+
+ tester.testConnect();
+ tester.testDisconnect();
+
+ System.out.println("End Testing TestConsumerConnector.");
+ }
+}
diff --git a/SIF3InfraREST/TestData/inputData/StudentPersonals.gzip b/SIF3InfraREST/TestData/inputData/StudentPersonals.gzip
new file mode 100644
index 00000000..0c1d0ff9
Binary files /dev/null and b/SIF3InfraREST/TestData/inputData/StudentPersonals.gzip differ
diff --git a/SIF3InfraREST/TestData/inputData/StudentPersonals.xml b/SIF3InfraREST/TestData/inputData/StudentPersonals.xml
new file mode 100644
index 00000000..644d3ec6
--- /dev/null
+++ b/SIF3InfraREST/TestData/inputData/StudentPersonals.xml
@@ -0,0 +1,9731 @@
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 879
+
+
+ Barker
+ Bob
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ SNOWMAN
+ Frosty
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+ 123
+ KIND
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE01
+
+
+ Family Name Demo 1
+ First Name Demo 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 4471943
+
+
+ GARLOW
+ Bobby
+
+
+
+
+
+
+
+
+
+
+
+ 879
+
+
+ Barker
+ Bob
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 879
+
+
+ Barker
+ Bob
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ SPLocalID
+
+
+ TheFamilyName Dan
+ TheGivenNAme Dan
+
+
+
+
+
+
+
+
+
+
+
+ 19011
+
+
+ PETRIE
+ Tim
+
+
+
+
+ P
+
+
+
+
+
+
+ 19012
+
+
+ MCMAHON
+ Katherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 13862
+
+
+ MORGAN
+ Katherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 16363
+
+
+ COLBERT
+ Madelaine
+
+
+
+
+ P
+
+
+
+
+
+
+ 16368
+
+
+ SIDDANCE
+ Chloe
+
+
+
+
+ P
+
+
+
+
+
+
+ 16369
+
+
+ SAXTON
+ Sam
+
+
+
+
+ P
+
+
+
+
+
+
+ 15480
+
+
+ BARLOW
+ Sophie
+
+
+
+
+ P
+
+
+
+
+
+
+ 19022
+
+
+ YOUNGLY
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 15807
+
+
+ CLARKE
+ Harriet
+
+
+
+
+ P
+
+
+
+
+
+
+ 50343
+
+
+ KEEFE
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 33521
+
+
+ ORETTI
+ Natalie
+
+
+
+
+ P
+
+
+
+
+
+
+ 16381
+
+
+ ARKENT
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 16398
+
+
+ FROTCHY
+ Sophie
+
+
+
+
+ P
+
+
+
+
+
+
+ 15673
+
+
+ STEVENS
+ Thomas
+
+
+
+
+ P
+
+
+
+
+
+
+ 14957
+
+
+ PICKUP
+ Rebecca
+
+
+
+
+ P
+
+
+
+
+
+
+ 45822
+
+
+ SNOWBERG
+ Billy
+
+
+
+
+ P
+
+
+
+
+
+
+ 19234
+
+
+ KALIL
+ Reece
+
+
+
+
+ P
+
+
+
+
+
+
+ 19262
+
+
+ TATTERSALL
+ Lydia
+
+
+
+
+ P
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 49248
+
+
+ KIMMOT
+ Eve
+
+
+
+
+ P
+
+
+
+
+
+
+ 49265
+
+
+ FRAZER
+ Oliver
+
+
+
+
+ P
+
+
+
+
+
+
+ 49278
+
+
+ WICKHAM
+ Radd
+
+
+
+
+ P
+
+
+
+
+
+
+ 19464
+
+
+ WHITE
+ Olivia
+
+
+
+
+ P
+
+
+
+
+
+
+ 18921
+
+
+ WRIGHT
+ Brittany
+
+
+
+
+ P
+
+
+
+
+
+
+ 19498
+
+
+ FRANKLIN
+ Caitlin
+
+
+
+
+ P
+
+
+
+
+
+
+ 18930
+
+
+ TOWNSEND
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 18933
+
+
+ SPENTLEY
+ Michaela
+
+
+
+
+ P
+
+
+
+
+
+
+ 14205
+
+
+ BROOKS
+ Leon
+
+
+
+
+ P
+
+
+
+
+
+
+ 14214
+
+
+ O'REGAN
+ Anna
+
+
+
+
+ P
+
+
+
+
+
+
+ 18950
+
+
+ WISEMAN
+ Jack
+
+
+
+
+ P
+
+
+
+
+
+
+ 14220
+
+
+ HOLLIS
+ George
+
+
+
+
+ P
+
+
+
+
+
+
+ 14224
+
+
+ BROWNE
+ Camille
+
+
+
+
+ P
+
+
+
+
+
+
+ 49668
+
+
+ PARKER
+ Gemma
+
+
+
+
+ P
+
+
+
+
+
+
+ 49689
+
+
+ SCOTT
+ Matthew
+
+
+
+
+ P
+
+
+
+
+
+
+ 14257
+
+
+ EVANS
+ Alex
+
+
+
+
+ P
+
+
+
+
+
+
+ 50003
+
+
+ VANDERSON
+ Christina
+
+
+
+
+ P
+
+
+
+
+
+
+ 15158
+
+
+ FREEMONT
+ Mary
+
+
+
+
+ P
+
+
+
+
+
+
+ 19890
+
+
+ JAMES
+ Isaac
+
+
+
+
+ P
+
+
+
+
+
+
+ 13397
+
+
+ POPE
+ Eden
+
+
+
+
+ P
+
+
+
+
+
+
+ 30549
+
+
+ GREGORY
+ Lilian
+
+
+
+
+ P
+
+
+
+
+
+
+ 16408
+
+
+ FARRELL
+ Louis
+
+
+
+
+ P
+
+
+
+
+
+
+ 17131
+
+
+ WELLS
+ Chris
+
+
+
+
+ P
+
+
+
+
+
+
+ 31479
+
+
+ LEARY
+ Trent
+
+
+
+
+ P
+
+
+
+
+
+
+ 16437
+
+
+ MERRITON
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 14827
+
+
+ BRAY
+ Hayden
+
+
+
+
+ P
+
+
+
+
+
+
+ 16444
+
+
+ SCULLY
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 16446
+
+
+ WRIGHTSON
+ Renee
+
+
+
+
+ P
+
+
+
+
+
+
+ 16449
+
+
+ WILSON
+ Marcus
+
+
+
+
+ P
+
+
+
+
+
+
+ 14842
+
+
+ GIBSON
+ Denis
+
+
+
+
+ P
+
+
+
+
+
+
+ 14845
+
+
+ HUTCHIN
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 14848
+
+
+ KEENE
+ Sam
+
+
+
+
+ P
+
+
+
+
+
+
+ 16460
+
+
+ MARKS
+ Peter
+
+
+
+
+ P
+
+
+
+
+
+
+ 14692
+
+
+ KOUROST
+ Lucy
+
+
+
+
+ P
+
+
+
+
+
+
+ 17511
+
+
+ JOHNSON
+ Josi
+
+
+
+
+ P
+
+
+
+
+
+
+ 16489
+
+
+ POULOSSIE
+ Taylor
+
+
+
+
+ P
+
+
+
+
+
+
+ 17531
+
+
+ BRADFORD
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 52075
+
+
+ VONLEY
+ Edwina
+
+
+
+
+ P
+
+
+
+
+
+
+ 17716
+
+
+ CORMACK
+ Annette
+
+
+
+
+ P
+
+
+
+
+
+
+ 47379
+
+
+ ANDERS
+ Isabella
+
+
+
+
+ P
+
+
+
+
+
+
+ 17727
+
+
+ COLEMAN
+ Brittany
+
+
+
+
+ P
+
+
+
+
+
+
+ 49501
+
+
+ FRASER
+ Karl
+
+
+
+
+ P
+
+
+
+
+
+
+ 13027
+
+
+ TEALE
+ Isabelle
+
+
+
+
+ P
+
+
+
+
+
+
+ 13033
+
+
+ INGLISPO
+ Avalon
+
+
+
+
+ P
+
+
+
+
+
+
+ 49196
+
+
+ PICKERING
+ Katrina
+
+
+
+
+ P
+
+
+
+
+
+
+ 25147
+
+
+ JAGGERS
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 19382
+
+
+ LITTLE
+ Mark
+
+
+
+
+ P
+
+
+
+
+
+
+ 49700
+
+
+ DOBELL
+ Natalie
+
+
+
+
+ P
+
+
+
+
+
+
+ 18874
+
+
+ MORLEY
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 15048
+
+
+ ALLENBY
+ Eliza
+
+
+
+
+ P
+
+
+
+
+
+
+ 14164
+
+
+ MCWILLIAM
+ Taylor
+
+
+
+
+ P
+
+
+
+
+
+
+ 14167
+
+
+ READ
+ Tessa
+
+
+
+
+ P
+
+
+
+
+
+
+ 14176
+
+
+ HOLDEN
+ Christina
+
+
+
+
+ P
+
+
+
+
+
+
+ 49932
+
+
+ CONNERY
+ John
+
+
+
+
+ P
+
+
+
+
+
+
+ 14501
+
+
+ SWEETLEY
+ Sally
+
+
+
+
+ P
+
+
+
+
+
+
+ 14186
+
+
+ HOGAN
+ Jack
+
+
+
+
+ P
+
+
+
+
+
+
+ 49945
+
+
+ BLACKETT
+ Ishbel
+
+
+
+
+ P
+
+
+
+
+
+
+ 45082
+
+
+ DEVLIN
+ Bella
+
+
+
+
+ P
+
+
+
+
+
+
+ 12771
+
+
+ LANDISH
+ Amy
+
+
+
+
+ P
+
+
+
+
+
+
+ 12774
+
+
+ ROBERTSON
+ Roger
+
+
+
+
+ P
+
+
+
+
+
+
+ 46136
+
+
+ CORR
+ Anthea
+
+
+
+
+ P
+
+
+
+
+
+
+ 12783
+
+
+ UPTON
+ Alex
+
+
+
+
+ P
+
+
+
+
+
+
+ 17057
+
+
+ HAMILTON
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 17066
+
+
+ AUGUSTINO
+ Gerry
+
+
+
+
+ P
+
+
+
+
+
+
+ 17067
+
+
+ HANDEL
+ Jessica
+
+
+
+
+ P
+
+
+
+
+
+
+ 16342
+
+
+ MCCARTHY
+ Carl
+
+
+
+
+ P
+
+
+
+
+
+
+ 16347
+
+
+ HILLTON
+ Shane
+
+
+
+
+ P
+
+
+
+
+
+
+ 17070
+
+
+ MCALL
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 19002
+
+
+ BROWN
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ 17075
+
+
+ LEE
+ Caitlin
+
+
+
+
+ P
+
+
+
+
+
+
+ 17078
+
+
+ SHELDON
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 17079
+
+
+ RICHARDSON
+ Isabel
+
+
+
+
+ P
+
+
+
+
+
+
+ 17402
+
+
+ OILITTY
+ Abeba
+
+
+
+
+ P
+
+
+
+
+
+
+ 16524
+
+
+ BLACK
+ Katrina
+
+
+
+
+ P
+
+
+
+
+
+
+ 17268
+
+
+ ROBERTSON
+ Cassintha
+
+
+
+
+ P
+
+
+
+
+
+
+ 16543
+
+
+ MANNERS
+ Madeleine
+
+
+
+
+ P
+
+
+
+
+
+
+ 47253
+
+
+ AITKEN
+ Jonathon
+
+
+
+
+ P
+
+
+
+
+
+
+ 17452
+
+
+ PRAIT
+ Robert
+
+
+
+
+ P
+
+
+
+
+
+
+ 18509
+
+
+ SLIVERS
+ Damien
+
+
+
+
+ P
+
+
+
+
+
+
+ 28847
+
+
+ LENTEN
+ Jessie
+
+
+
+
+ P
+
+
+
+
+
+
+ 49052
+
+
+ ARMSTRONG
+ Leroy
+
+
+
+
+ P
+
+
+
+
+
+
+ 17477
+
+
+ LELLAN
+ Daniel
+
+
+
+
+ P
+
+
+
+
+
+
+ 16751
+
+
+ CONNOR
+ Jordan
+
+
+
+
+ P
+
+
+
+
+
+
+ 16596
+
+
+ KELLY
+ Chris
+
+
+
+
+ P
+
+
+
+
+
+
+ 14995
+
+
+ CLANCY
+ Olivia
+
+
+
+
+ P
+
+
+
+
+
+
+ 14998
+
+
+ SLACK
+ Poppy
+
+
+
+
+ P
+
+
+
+
+
+
+ 49241
+
+
+ WATERBERG
+ Sara
+
+
+
+
+ P
+
+
+
+
+
+
+ 50589
+
+
+ CLAYTON
+ Kendall
+
+
+
+
+ P
+
+
+
+
+
+
+ 16784
+
+
+ HUNTER
+ Karl
+
+
+
+
+ P
+
+
+
+
+
+
+ 19617
+
+
+ PARK
+ Maxine
+
+
+
+
+ P
+
+
+
+
+
+
+ 19618
+
+
+ AUGUSTINE
+ Anne
+
+
+
+
+ P
+
+
+
+
+
+
+ 18580
+
+
+ WALTERS
+ Kate
+
+
+
+
+ P
+
+
+
+
+
+
+ 18589
+
+
+ BEST
+ Nathan
+
+
+
+
+ P
+
+
+
+
+
+
+ 19800
+
+
+ QUAINTEL
+ Jane
+
+
+
+
+ P
+
+
+
+
+
+
+ 18765
+
+
+ BROWN
+ Bradley
+
+
+
+
+ P
+
+
+
+
+
+
+ 51861
+
+
+ PRIDE
+ Melissa
+
+
+
+
+ P
+
+
+
+
+
+
+ 19665
+
+
+ BROADFOOT
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 14219
+
+
+ MCWILLIAM
+ Patrick
+
+
+
+
+ P
+
+
+
+
+
+
+ 19674
+
+
+ CRAIGS
+ Richard
+
+
+
+
+ P
+
+
+
+
+
+
+ 19675
+
+
+ ALLSOPP
+ Sophia
+
+
+
+
+ P
+
+
+
+
+
+
+ 13171
+
+
+ WOODHOUSE
+ Madeline
+
+
+
+
+ P
+
+
+
+
+
+
+ 14422
+
+
+ SMITH
+ Jessica
+
+
+
+
+ P
+
+
+
+
+
+
+ 14261
+
+
+ BAILEY
+ Audrey
+
+
+
+
+ P
+
+
+
+
+
+
+ 14262
+
+
+ BALL
+ Jessica
+
+
+
+
+ P
+
+
+
+
+
+
+ 14264
+
+
+ MURPHY
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 15324
+
+
+ KILK
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 45308
+
+
+ CHOY
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 52991
+
+
+ MILLS
+ Olivia
+
+
+
+
+ P
+
+
+
+
+
+
+ 50039
+
+
+ PERTLY
+ Caitlin
+
+
+
+
+ P
+
+
+
+
+
+
+ 44278
+
+
+ SLEDGE
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 49895
+
+
+ GERRICK
+ Stephanie
+
+
+
+
+ P
+
+
+
+
+
+
+ 15190
+
+
+ WHITE
+ Amy
+
+
+
+
+ P
+
+
+
+
+
+
+ 16083
+
+
+ MACK
+ Emilie
+
+
+
+
+ P
+
+
+
+
+
+
+ 46062
+
+
+ PERKINS
+ Ellen
+
+
+
+
+ P
+
+
+
+
+
+
+ 15541
+
+
+ SLANOS
+ Madeleine
+
+
+
+
+ P
+
+
+
+
+
+
+ 50088
+
+
+ OAKS
+ Anna
+
+
+
+
+ P
+
+
+
+
+
+
+ 15559
+
+
+ SUNTOGAS
+ Monique
+
+
+
+
+ P
+
+
+
+
+
+
+ 17504
+
+
+ LAMBERT
+ Tamsin
+
+
+
+
+ P
+
+
+
+
+
+
+ 15736
+
+
+ BEALE
+ Tobias
+
+
+
+
+ P
+
+
+
+
+
+
+ 14861
+
+
+ CASTLES
+ Angela
+
+
+
+
+ P
+
+
+
+
+
+
+ 14864
+
+
+ DANIELS
+ Natalie
+
+
+
+
+ P
+
+
+
+
+
+
+ 17362
+
+
+ CHIN
+ Chloe
+
+
+
+
+ P
+
+
+
+
+
+
+ 17525
+
+
+ SWINSLY
+ Christina
+
+
+
+
+ P
+
+
+
+
+
+
+ 14870
+
+
+ ROBSON
+ Eleanor
+
+
+
+
+ P
+
+
+
+
+
+
+ 16803
+
+
+ SMITH
+ Michaela
+
+
+
+
+ P
+
+
+
+
+
+
+ 16483
+
+
+ SHEPHERD
+ Ashley
+
+
+
+
+ P
+
+
+
+
+
+
+ 16806
+
+
+ WALKER
+ Hannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 47352
+
+
+ CHILCOKE
+ Peter
+
+
+
+
+ P
+
+
+
+
+
+
+ 16492
+
+
+ MUTCH
+ Steven
+
+
+
+
+ P
+
+
+
+
+
+
+ 16495
+
+
+ MURRANT
+ Grace
+
+
+
+
+ P
+
+
+
+
+
+
+ 16498
+
+
+ LILLY
+ Eliza
+
+
+
+
+ P
+
+
+
+
+
+
+ 50477
+
+
+ MENDLE
+ Rebecca
+
+
+
+
+ P
+
+
+
+
+
+
+ 49303
+
+
+ HATCHER
+ Angela
+
+
+
+
+ P
+
+
+
+
+
+
+ 16834
+
+
+ SCHORT
+ Michael
+
+
+
+
+ P
+
+
+
+
+
+
+ 16843
+
+
+ HOLLINGS
+ Alexandra
+
+
+
+
+ P
+
+
+
+
+
+
+ 16846
+
+
+ MORRISON
+ Anthony
+
+
+
+
+ P
+
+
+
+
+
+
+ 16848
+
+
+ JARRETT
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 19502
+
+
+ WILSON
+ Aaron
+
+
+
+
+ P
+
+
+
+
+
+
+ 16851
+
+
+ PERRY
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 16854
+
+
+ BARTER
+ Charles
+
+
+
+
+ P
+
+
+
+
+
+
+ 52435
+
+
+ NICHOLS
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 16855
+
+
+ FARRUGIA
+ Tess
+
+
+
+
+ P
+
+
+
+
+
+
+ 33683
+
+
+ MAY
+ Lucy
+
+
+
+
+ P
+
+
+
+
+
+
+ 16864
+
+
+ DART
+ Madison
+
+
+
+
+ P
+
+
+
+
+
+
+ 18644
+
+
+ JONES
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 19722
+
+
+ STOKES
+ Matilda
+
+
+
+
+ P
+
+
+
+
+
+
+ 19738
+
+
+ PULRASKY
+ Catriona
+
+
+
+
+ P
+
+
+
+
+
+
+ 13236
+
+
+ RYAN
+ Jude
+
+
+
+
+ P
+
+
+
+
+
+
+ 52661
+
+
+ SONGTOU
+ Lily
+
+
+
+
+ P
+
+
+
+
+
+
+ 19900
+
+
+ RAMSEND
+ Amy
+
+
+
+
+ P
+
+
+
+
+
+
+ 19741
+
+
+ GRUMLEY
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 19744
+
+
+ ANDERSON
+ Paul
+
+
+
+
+ P
+
+
+
+
+
+
+ 19763
+
+
+ BROKON
+ Sebastian
+
+
+
+
+ P
+
+
+
+
+
+
+ 19932
+
+
+ CLEARY
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 49775
+
+
+ BEARD
+ Abbey
+
+
+
+
+ P
+
+
+
+
+
+
+ 19967
+
+
+ JARSON
+ Jeremy
+
+
+
+
+ P
+
+
+
+
+
+
+ 15078
+
+
+ COOTE
+ Georgia
+
+
+
+
+ P
+
+
+
+
+
+
+ 14545
+
+
+ EDWARDS
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 15289
+
+
+ AXLE
+ Rachel
+
+
+
+
+ P
+
+
+
+
+
+
+ 14567
+
+
+ SHELTERBY
+ Rebecca
+
+
+
+
+ P
+
+
+
+
+
+
+ 16341
+
+
+ MADSEN
+ Grant
+
+
+
+
+ P
+
+
+
+
+
+
+ 18112
+
+
+ SUPERRO
+ Ellie
+
+
+
+
+ P
+
+
+
+
+
+
+ 16504
+
+
+ MURRAY
+ Naomi
+
+
+
+
+ P
+
+
+
+
+
+
+ 50158
+
+
+ GIBSON
+ Joel
+
+
+
+
+ P
+
+
+
+
+
+
+ 16514
+
+
+ RAYE
+ Bryson
+
+
+
+
+ P
+
+
+
+
+
+
+ 26691
+
+
+ STONER
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 30865
+
+
+ GLADSTONE
+ Angela
+
+
+
+
+ P
+
+
+
+
+
+
+ 50188
+
+
+ MAGELL
+ Nicholas
+
+
+
+
+ P
+
+
+
+
+
+
+ 17266
+
+
+ PARSONS
+ Xaviour
+
+
+
+
+ P
+
+
+
+
+
+
+ 30879
+
+
+ QUINN
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 33535
+
+
+ KELLY
+ Frances
+
+
+
+
+ P
+
+
+
+
+
+
+ 18322
+
+
+ JONES
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 16718
+
+
+ BEARD
+ Marcus
+
+
+
+
+ P
+
+
+
+
+
+
+ 46376
+
+
+ KEATING
+ Natalie
+
+
+
+
+ P
+
+
+
+
+
+
+ 29717
+
+
+ CHITA
+ Madeleine
+
+
+
+
+ P
+
+
+
+
+
+
+ 23211
+
+
+ ALBERTS
+ Ella
+
+
+
+
+ P
+
+
+
+
+
+
+ 18188
+
+
+ WEBSTER
+ Mathew
+
+
+
+
+ P
+
+
+
+
+
+
+ 34612
+
+
+ WALSH
+ Michael
+
+
+
+
+ P
+
+
+
+
+
+
+ 34290
+
+
+ WHITELY
+ Paul
+
+
+
+
+ P
+
+
+
+
+
+
+ 16931
+
+
+ ROBERTS
+ Elizabeth
+
+
+
+
+ P
+
+
+
+
+
+
+ 54129
+
+
+ DONNELLY
+ Ben
+
+
+
+
+ P
+
+
+
+
+
+
+ 24314
+
+
+ ABBOUD
+ Justin
+
+
+
+
+ P
+
+
+
+
+
+
+ 78341
+
+
+ THINN
+ Chrissie
+
+
+
+
+ P
+
+
+
+
+
+
+ 36421
+
+
+ HOLT
+ Donna
+
+
+
+
+ P
+
+
+
+
+
+
+ 17849
+
+
+ MOONEY
+ Jane
+
+
+
+
+ P
+
+
+
+
+
+
+ 18579
+
+
+ DAVIDSON
+ Sebastian
+
+
+
+
+ P
+
+
+
+
+
+
+ 19467
+
+
+ CASULAN
+ Shane
+
+
+
+
+ P
+
+
+
+
+
+
+ 36457
+
+
+ PATRICK
+ Rama
+
+
+
+
+ P
+
+
+
+
+
+
+ 25237
+
+
+ MAHER
+ Chris
+
+
+
+
+ P
+
+
+
+
+
+
+ 67321
+
+
+ BARLOTTE
+ Amy
+
+
+
+
+ P
+
+
+
+
+
+
+ 56101
+
+
+ COOPER
+ Ryan
+
+
+
+
+ P
+
+
+
+
+
+
+ 25407
+
+
+ TAYLOR
+ Hannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 48572
+
+
+ SALEM
+ Melanie
+
+
+
+
+ P
+
+
+
+
+
+
+ 19482
+
+
+ HITCHCOCK
+ Peter
+
+
+
+
+ P
+
+
+
+
+
+
+ 25253
+
+
+ HOLT
+ Stephanie
+
+
+
+
+ P
+
+
+
+
+
+
+ 18936
+
+
+ TIBBITT
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 18937
+
+
+ DUDLEY
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ 25269
+
+
+ WORTHY
+ Jason
+
+
+
+
+ P
+
+
+
+
+
+
+ 49644
+
+
+ TRAVERS
+ Suzanne
+
+
+
+
+ P
+
+
+
+
+
+
+ 25437
+
+
+ WHIPP
+ Rose
+
+
+
+
+ P
+
+
+
+
+
+
+ 48936
+
+
+ HARKNESS
+ Nathan
+
+
+
+
+ P
+
+
+
+
+
+
+ 13506
+
+
+ PINCHLY
+ Jennifer
+
+
+
+
+ P
+
+
+
+
+
+
+ 25465
+
+
+ NORTHEY
+ Isabella
+
+
+
+
+ P
+
+
+
+
+
+
+ 26197
+
+
+ FARRUGIA
+ Paul
+
+
+
+
+ P
+
+
+
+
+
+
+ 74200
+
+
+ DOYLE
+ Paula
+
+
+
+
+ P
+
+
+
+
+
+
+ 30521
+
+
+ SENATTA
+ Hanna
+
+
+
+
+ P
+
+
+
+
+
+
+ 31251
+
+
+ MAYE
+ Belinda
+
+
+
+
+ P
+
+
+
+
+
+
+ 14270
+
+
+ LEWING
+ Linda
+
+
+
+
+ P
+
+
+
+
+
+
+ 29038
+
+
+ PERT
+ Oliver
+
+
+
+
+ P
+
+
+
+
+
+
+ 13551
+
+
+ MARKS
+ Dominic
+
+
+
+
+ P
+
+
+
+
+
+
+ 13554
+
+
+ WATSON
+ Samantha
+
+
+
+
+ P
+
+
+
+
+
+
+ 15166
+
+
+ HUGHES
+ Grant
+
+
+
+
+ P
+
+
+
+
+
+
+ 52982
+
+
+ MITCHELL
+ Justin
+
+
+
+
+ P
+
+
+
+
+
+
+ 50026
+
+
+ MUNRO
+ Hannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 28329
+
+
+ HEATH
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 14618
+
+
+ MITCHELL
+ Simone
+
+
+
+
+ P
+
+
+
+
+
+
+ 15500
+
+
+ STEPHENS
+ Michaela
+
+
+
+
+ P
+
+
+
+
+
+
+ 15509
+
+
+ DUNTERBY
+ Jason
+
+
+
+
+ P
+
+
+
+
+
+
+ 25853
+
+
+ CATERA
+ Olivia
+
+
+
+
+ P
+
+
+
+
+
+
+ 30737
+
+
+ OAKES
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 51107
+
+
+ CHONG
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 34121
+
+
+ SANDERSON
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ 30581
+
+
+ SHERIDAN
+ Daniel
+
+
+
+
+ P
+
+
+
+
+
+
+ 14484
+
+
+ CHARMERS
+ Emiko
+
+
+
+
+ P
+
+
+
+
+
+
+ 15538
+
+
+ MAY
+ Madeleine
+
+
+
+
+ P
+
+
+
+
+
+
+ 25871
+
+
+ SHORT
+ Naomi
+
+
+
+
+ P
+
+
+
+
+
+
+ 30597
+
+
+ PARKER
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 56902
+
+
+ HUNTER
+ Damien
+
+
+
+
+ P
+
+
+
+
+
+
+ 16457
+
+
+ HAMPERS
+ Cassandra
+
+
+
+
+ P
+
+
+
+
+
+
+ 18237
+
+
+ MESSENGER
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 43790
+
+
+ WORTHINGTON
+ Rachel
+
+
+
+
+ P
+
+
+
+
+
+
+ 50440
+
+
+ LANGLEY
+ Ben
+
+
+
+
+ P
+
+
+
+
+
+
+ 18246
+
+
+ CARROLL
+ Lara
+
+
+
+
+ P
+
+
+
+
+
+
+ 19131
+
+
+ SANDERS
+ Nathan
+
+
+
+
+ P
+
+
+
+
+
+
+ 14873
+
+
+ SMITH
+ Holly
+
+
+
+
+ P
+
+
+
+
+
+
+ 35243
+
+
+ DODDS
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 14880
+
+
+ BYRNE
+ Michelle
+
+
+
+
+ P
+
+
+
+
+
+
+ 31875
+
+
+ NEWHAM
+ Travers
+
+
+
+
+ P
+
+
+
+
+
+
+ 14896
+
+
+ WELLS
+ Gemma
+
+
+
+
+ P
+
+
+
+
+
+
+ 17392
+
+
+ CRUSOE
+ Joel
+
+
+
+
+ P
+
+
+
+
+
+
+ 17719
+
+
+ CORTELL
+ Marcus
+
+
+
+
+ P
+
+
+
+
+
+
+ 48430
+
+
+ MCLAUGHLIN
+ Paul
+
+
+
+
+ P
+
+
+
+
+
+
+ 51381
+
+
+ OBRIEN
+ Jason
+
+
+
+
+ P
+
+
+
+
+
+
+ 29855
+
+
+ BATTRE
+ Sasha
+
+
+
+
+ P
+
+
+
+
+
+
+ 19362
+
+
+ BREWER
+ Belinda
+
+
+
+
+ P
+
+
+
+
+
+
+ 16874
+
+
+ GARDNER
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 18813
+
+
+ MUNDEY
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 34598
+
+
+ BORG
+ Cate
+
+
+
+
+ P
+
+
+
+
+
+
+ 25315
+
+
+ PROLECHI
+ Alice
+
+
+
+
+ P
+
+
+
+
+
+
+ 78474
+
+
+ KHOURY
+ Leon
+
+
+
+
+ P
+
+
+
+
+
+
+ 25179
+
+
+ AGOSTINO
+ George
+
+
+
+
+ P
+
+
+
+
+
+
+ 51934
+
+
+ WILKINS
+ Alannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 15002
+
+
+ MCWILLIAM
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 52672
+
+
+ STONER
+ Gabriella
+
+
+
+
+ P
+
+
+
+
+
+
+ 14307
+
+
+ BUNTING
+ Kathleen
+
+
+
+
+ P
+
+
+
+
+
+
+ 13426
+
+
+ WILLIAMS
+ Elizabeth
+
+
+
+
+ P
+
+
+
+
+
+
+ 49749
+
+
+ KELLY
+ Kelly
+
+
+
+
+ P
+
+
+
+
+
+
+ 36754
+
+
+ YOUNES
+ Mark
+
+
+
+
+ P
+
+
+
+
+
+
+ 45023
+
+
+ PEROSIN
+ Daniel
+
+
+
+
+ P
+
+
+
+
+
+
+ 13443
+
+
+ LLOYDS
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 13288
+
+
+ BELL
+ Sean
+
+
+
+
+ P
+
+
+
+
+
+
+ 23784
+
+
+ AUSTIN
+ Melanie
+
+
+
+
+ P
+
+
+
+
+
+
+ 30613
+
+
+ GARDINER
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 16128
+
+
+ COLBERG
+ Rebecca
+
+
+
+
+ P
+
+
+
+
+
+
+ 13636
+
+
+ DAVENPORT
+ Madeleine
+
+
+
+
+ P
+
+
+
+
+
+
+ 25905
+
+
+ BIRD
+ Stephanie
+
+
+
+
+ P
+
+
+
+
+
+
+ 15092
+
+
+ ISAACS
+ Fiona
+
+
+
+
+ P
+
+
+
+
+
+
+ 32096
+
+
+ Phillip
+ WARDLE.
+
+
+
+
+ P
+
+
+
+
+
+
+ 15601
+
+
+ SIMMONS
+ Dean
+
+
+
+
+ P
+
+
+
+
+
+
+ 51025
+
+
+ NEWMAN
+ Gabriella
+
+
+
+
+ P
+
+
+
+
+
+
+ 26677
+
+
+ PAULS
+ Samantha
+
+
+
+
+ P
+
+
+
+
+
+
+ 47211
+
+
+ SMITH
+ Bradley
+
+
+
+
+ P
+
+
+
+
+
+
+ 14589
+
+
+ BUTCHER
+ Audrey
+
+
+
+
+ P
+
+
+
+
+
+
+ 15638
+
+
+ ROBERTS
+ Georgia
+
+
+
+
+ P
+
+
+
+
+
+
+ 17411
+
+
+ CATCHPOLE
+ William
+
+
+
+
+ P
+
+
+
+
+
+
+ 15646
+
+
+ NOOSE
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 19029
+
+
+ MABELL
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 15652
+
+
+ PINTER
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 31593
+
+
+ PROTTER
+ Reece
+
+
+
+
+ P
+
+
+
+
+
+
+ 53006
+
+
+ DORGE
+ Bradley
+
+
+
+
+ P
+
+
+
+
+
+
+ 15659
+
+
+ GUERIN
+ Scott
+
+
+
+
+ P
+
+
+
+
+
+
+ 28651
+
+
+ LEE
+ Chloe
+
+
+
+
+ P
+
+
+
+
+
+
+ 15670
+
+
+ TAILOW
+ Travers
+
+
+
+
+ P
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
+ 28669
+
+
+ PLAYTON
+ Madeleine
+
+
+
+
+ P
+
+
+
+
+
+
+ 52300
+
+
+ TOOHEY
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ 51422
+
+
+ SAINTSON
+ Charles
+
+
+
+
+ P
+
+
+
+
+
+
+ 18185
+
+
+ HAYES
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 29575
+
+
+ ALLSOPP
+ Vivienne
+
+
+
+
+ P
+
+
+
+
+
+
+ 29901
+
+
+ BURNS
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 18523
+
+
+ HARDY
+ Joel
+
+
+
+
+ P
+
+
+
+
+
+
+ 50568
+
+
+ KAWATA
+ Tim
+
+
+
+
+ P
+
+
+
+
+
+
+ SPLocalID
+
+
+ TheFamilyName Dan
+ TheGivenNAme Dan
+
+
+
+
+
+
+
+
+
+
+
+ 46740
+
+
+ BENNETT
+ Kirsten
+
+
+
+
+ P
+
+
+
+
+
+
+ 48517
+
+
+ SMITH
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ 16937
+
+
+ PENFOLD
+ Victoria
+
+
+
+
+ P
+
+
+
+
+
+
+ 18387
+
+
+ PLAYFAIR
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 52362
+
+
+ FENNEY
+ Hannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 50598
+
+
+ CLAYTON
+ Craig
+
+
+
+
+ P
+
+
+
+
+
+
+ 16950
+
+
+ QUINN
+ Thea
+
+
+
+
+ P
+
+
+
+
+
+
+ 16956
+
+
+ WILLIAMS
+ Annette
+
+
+
+
+ P
+
+
+
+
+
+
+ 17847
+
+
+ STRAUSS
+ Jack
+
+
+
+
+ P
+
+
+
+
+
+
+ 16964
+
+
+ BLATCH
+ Sean
+
+
+
+
+ P
+
+
+
+
+
+
+ 18578
+
+
+ LEETON
+ Monica
+
+
+
+
+ P
+
+
+
+
+
+
+ 16970
+
+
+ CARTER
+ Sean
+
+
+
+
+ P
+
+
+
+
+
+
+ 16987
+
+
+ FRANCIS
+ Belinda
+
+
+
+
+ P
+
+
+
+
+
+
+ 49638
+
+
+ COPE
+ Vanessa
+
+
+
+
+ P
+
+
+
+
+
+
+ 19666
+
+
+ HILTON
+ Paula
+
+
+
+
+ P
+
+
+
+
+
+
+ 19669
+
+
+ BARBER
+ Eliza
+
+
+
+
+ P
+
+
+
+
+
+
+ 19670
+
+
+ O'DOHERTY
+ Rosalie
+
+
+
+
+ P
+
+
+
+
+
+
+ 19671
+
+
+ CHESSOR
+ Alexandra
+
+
+
+
+ P
+
+
+
+
+
+
+ 31219
+
+
+ DOWDELL
+ Tim
+
+
+
+
+ P
+
+
+
+
+
+
+ 19698
+
+
+ WORTH
+ Patrick
+
+
+
+
+ P
+
+
+
+
+
+
+ 18972
+
+
+ MORRIS
+ Annabelle
+
+
+
+
+ P
+
+
+
+
+
+
+ 18973
+
+
+ LUCAS
+ Patrick
+
+
+
+
+ P
+
+
+
+
+
+
+ 20016
+
+
+ BUSH
+ Anna
+
+
+
+
+ P
+
+
+
+
+
+
+ 52955
+
+
+ HAULSEN
+ Billy
+
+
+
+
+ P
+
+
+
+
+
+
+ 14425
+
+
+ LETTS
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 48975
+
+
+ LOOREY
+ Cassandra
+
+
+
+
+ P
+
+
+
+
+
+
+ 14269
+
+
+ BRADFORD
+ Jess
+
+
+
+
+ P
+
+
+
+
+
+
+ 19884
+
+
+ CHAN
+ Alice
+
+
+
+
+ P
+
+
+
+
+
+
+ 20056
+
+
+ GEORGES
+ Tess
+
+
+
+
+ P
+
+
+
+
+
+
+ 27601
+
+
+ CAIN
+ Georgia
+
+
+
+
+ P
+
+
+
+
+
+
+ 13735
+
+
+ WALL
+ Cassandra
+
+
+
+
+ P
+
+
+
+
+
+
+ 20073
+
+
+ JONES
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 46222
+
+
+ MANDERS
+ Helen
+
+
+
+
+ P
+
+
+
+
+
+
+ 13755
+
+
+ WOOD
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 13756
+
+
+ LOPEZ
+ Mark
+
+
+
+
+ P
+
+
+
+
+
+
+ 45500
+
+
+ JOHNSON
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 16090
+
+
+ WOODS
+ Sean
+
+
+
+
+ P
+
+
+
+
+
+
+ 13766
+
+
+ BAKER
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 14659
+
+
+ BAILEY
+ Joel
+
+
+
+
+ P
+
+
+
+
+
+
+ 15383
+
+
+ LANDISH
+ Sebastian
+
+
+
+
+ P
+
+
+
+
+
+
+ 13783
+
+
+ SIMMONS
+ Caithness
+
+
+
+
+ P
+
+
+
+
+
+
+ 18218
+
+
+ WHITWORTH
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 46272
+
+
+ WITENKO
+ Jessica
+
+
+
+
+ P
+
+
+
+
+
+
+ 29617
+
+
+ SMITH
+ Rachel
+
+
+
+
+ P
+
+
+
+
+
+
+ 17528
+
+
+ TAINNEY
+ William
+
+
+
+
+ P
+
+
+
+
+
+
+ 29631
+
+
+ HARVEY
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 28911
+
+
+ PETERSON
+ Caitlin
+
+
+
+
+ P
+
+
+
+
+
+
+ 17372
+
+
+ COOPER
+ Julie
+
+
+
+
+ P
+
+
+
+
+
+
+ 29647
+
+
+ BARNES
+ Thomas
+
+
+
+
+ P
+
+
+
+
+
+
+ 28927
+
+
+ STORM
+ Paul
+
+
+
+
+ P
+
+
+
+
+
+
+ 16824
+
+
+ BACONI
+ Nathan
+
+
+
+
+ P
+
+
+
+
+
+
+ 18276
+
+
+ SHARPE
+ Chelsea
+
+
+
+
+ P
+
+
+
+
+
+
+ 18439
+
+
+ SIMPSON
+ Alex
+
+
+
+
+ P
+
+
+
+
+
+
+ 14898
+
+
+ PELLET
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 29661
+
+
+ GREEN
+ Paula
+
+
+
+
+ P
+
+
+
+
+
+
+ 18283
+
+
+ JONES
+ Isabella
+
+
+
+
+ P
+
+
+
+
+
+
+ 16837
+
+
+ SHORT
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 29675
+
+
+ WISEMAN
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 18615
+
+
+ LYONS
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 18458
+
+
+ MACDONALD
+ Monica
+
+
+
+
+ P
+
+
+
+
+
+
+ 47391
+
+
+ CROFT
+ Laura
+
+
+
+
+ P
+
+
+
+
+
+
+ 51391
+
+
+ DUNNE
+ Demi
+
+
+
+
+ P
+
+
+
+
+
+
+ 26201
+
+
+ KENDALL
+ Daniela
+
+
+
+
+ P
+
+
+
+
+
+
+ 19723
+
+
+ GRESHAM
+ Bronwyn
+
+
+
+
+ P
+
+
+
+
+
+
+ 19732
+
+
+ TREVITT
+ Robert
+
+
+
+
+ P
+
+
+
+
+
+
+ 19579
+
+
+ ALLENBY
+ Nicholas
+
+
+
+
+ P
+
+
+
+
+
+
+ 51954
+
+
+ CURTLISH
+ Georgia
+
+
+
+
+ P
+
+
+
+
+
+
+ 45018
+
+
+ SARA
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 30253
+
+
+ ELLIS
+ Dean
+
+
+
+
+ P
+
+
+
+
+
+
+ 14329
+
+
+ LOYAL
+ Scott
+
+
+
+
+ P
+
+
+
+
+
+
+ 19780
+
+
+ STEWART
+ Lisa
+
+
+
+
+ P
+
+
+
+
+
+
+ 14334
+
+
+ MASTERTON
+ Chris
+
+
+
+
+ P
+
+
+
+
+
+
+ 17017
+
+
+ PARRY
+ Lisa
+
+
+
+
+ P
+
+
+
+
+
+
+ 17030
+
+
+ BOYLE
+ Karina
+
+
+
+
+ P
+
+
+
+
+
+
+ 17037
+
+
+ ADAMS
+ Kristie
+
+
+
+
+ P
+
+
+
+
+
+
+ 28603
+
+
+ CHEN
+ Elizabeth
+
+
+
+
+ P
+
+
+
+
+
+
+ 15616
+
+
+ POTTERS
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 28619
+
+
+ CRAIG
+ Luke
+
+
+
+
+ P
+
+
+
+
+
+
+ 15625
+
+
+ CLAYTON
+ Robert
+
+
+
+
+ P
+
+
+
+
+
+
+ 15628
+
+
+ BURTON
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 14901
+
+
+ SOUTOUS
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 44724
+
+
+ STUMPS
+ Julie
+
+
+
+
+ P
+
+
+
+
+
+
+ 14914
+
+
+ GRANT
+ Eloise
+
+
+
+
+ P
+
+
+
+
+
+
+ 17414
+
+
+ COLBRA
+ Brendan
+
+
+
+
+ P
+
+
+
+
+
+
+ 19040
+
+
+ ROBINSON
+ Steven
+
+
+
+
+ P
+
+
+
+
+
+
+ 15665
+
+
+ BRAND
+ Jessica
+
+
+
+
+ P
+
+
+
+
+
+
+ 30889
+
+
+ VAZQUEZ
+ Vanessa
+
+
+
+
+ P
+
+
+
+
+
+
+ 16736
+
+
+ MESSENGER
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 8000
+
+
+ JAMES
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 14979
+
+
+ SLACK
+ Bronwyn
+
+
+
+
+ P
+
+
+
+
+
+
+ 19242
+
+
+ NEWTON
+ Luke
+
+
+
+
+ P
+
+
+
+
+
+
+ 19246
+
+
+ WAKELEY
+ Anthony
+
+
+
+
+ P
+
+
+
+
+
+
+ 18365
+
+
+ DOHERTY
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 18367
+
+
+ BROOKS
+ Clare
+
+
+
+
+ P
+
+
+
+
+
+
+ 18370
+
+
+ SWIMMER
+ Julianne
+
+
+
+
+ P
+
+
+
+
+
+
+ 16924
+
+
+ LAMB
+ Aaron
+
+
+
+
+ P
+
+
+
+
+
+
+ 49084
+
+
+ English
+ Annette
+
+
+
+
+ P
+
+
+
+
+
+
+ 29935
+
+
+ MCMAHON
+ Sophie
+
+
+
+
+ P
+
+
+
+
+
+
+ 18390
+
+
+ MOUNTAIL
+ Tessa
+
+
+
+
+ P
+
+
+
+
+
+
+ 18567
+
+
+ RICHARDS
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 48542
+
+
+ STOCKS
+ Jason
+
+
+
+
+ P
+
+
+
+
+
+
+ 16980
+
+
+ JOHNSON
+ Tessa
+
+
+
+
+ P
+
+
+
+
+
+
+ 48571
+
+
+ ELLIFF
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 19803
+
+
+ BOURTELLI
+ Suzanne
+
+
+
+
+ P
+
+
+
+
+
+
+ 16995
+
+
+ APPLESEED
+ Belinda
+
+
+
+
+ P
+
+
+
+
+
+
+ 48905
+
+
+ LEE
+ Skye
+
+
+
+
+ P
+
+
+
+
+
+
+ 19495
+
+
+ JENKINS
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 18938
+
+
+ DUDLEY
+ Kate
+
+
+
+
+ P
+
+
+
+
+
+
+ 30145
+
+
+ TRAMMALL
+ Jack
+
+
+
+
+ P
+
+
+
+
+
+
+ 48592
+
+
+ MUNNS
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 25601
+
+
+ WONG
+ Mark
+
+
+
+
+ P
+
+
+
+
+
+
+ 25621
+
+
+ MALLETT
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 48955
+
+
+ CALDER
+ Chris
+
+
+
+
+ P
+
+
+
+
+
+
+ 30189
+
+
+ PENNELL
+ Mathew
+
+
+
+
+ P
+
+
+
+
+
+
+ 30367
+
+
+ STOKES
+ Chris
+
+
+
+
+ P
+
+
+
+
+
+
+ 48980
+
+
+ LAWES
+ Suzanne
+
+
+
+
+ P
+
+
+
+
+
+
+ 15167
+
+
+ WHITTAKER
+ Mary
+
+
+
+
+ P
+
+
+
+
+
+
+ 48991
+
+
+ SANDS
+ Robert
+
+
+
+
+ P
+
+
+
+
+
+
+ 46038
+
+
+ HEATHER
+ Alison
+
+
+
+
+ P
+
+
+
+
+
+
+ 30717
+
+
+ HUNT
+ Errol
+
+
+
+
+ P
+
+
+
+
+
+
+ 46046
+
+
+ COLEMAN
+ Jay
+
+
+
+
+ P
+
+
+
+
+
+
+ 28345
+
+
+ FOGARTY
+ Isaac
+
+
+
+
+ P
+
+
+
+
+
+
+ 18012
+
+
+ GELLING
+ Greta
+
+
+
+
+ P
+
+
+
+
+
+
+ 16087
+
+
+ AMARA
+ Annabel
+
+
+
+
+ P
+
+
+
+
+
+
+ 29407
+
+
+ MONTGOMERY
+ Eleanor
+
+
+
+
+ P
+
+
+
+
+
+
+ 20097
+
+
+ THOMAS
+ Tess
+
+
+
+
+ P
+
+
+
+
+
+
+ 33097
+
+
+ DENTON
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 29427
+
+
+ MURRAY
+ Wesley
+
+
+
+
+ P
+
+
+
+
+
+
+ 45538
+
+
+ SASSEN
+ Samantha
+
+
+
+
+ P
+
+
+
+
+
+
+ 13793
+
+
+ BLACK
+ Claire
+
+
+
+
+ P
+
+
+
+
+
+
+ 19113
+
+
+ GARDNER
+ Kathy
+
+
+
+
+ P
+
+
+
+
+
+
+ 16464
+
+
+ PIERCE
+ Michaela
+
+
+
+
+ P
+
+
+
+
+
+
+ 26961
+
+
+ RUSHITI
+ Oliver
+
+
+
+
+ P
+
+
+
+
+
+
+ 15742
+
+
+ BURTON
+ David
+
+
+
+
+ P
+
+
+
+
+
+
+ 16632
+
+
+ BEARD
+ Marcus
+
+
+
+
+ P
+
+
+
+
+
+
+ 16638
+
+
+ WILLIAMS
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 28759
+
+
+ CAPONA
+ Briony
+
+
+
+
+ P
+
+
+
+
+
+
+ 16656
+
+
+ KEEFE
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 19153
+
+
+ HUMPHERY
+ Saul
+
+
+
+
+ P
+
+
+
+
+
+
+ 14897
+
+
+ BRAY
+ Sue
+
+
+
+
+ P
+
+
+
+
+
+
+ 16676
+
+
+ HART
+ Vanessa
+
+
+
+
+ P
+
+
+
+
+
+
+ 48423
+
+
+ SUIEY
+ Lucinda
+
+
+
+
+ P
+
+
+
+
+
+
+ 16682
+
+
+ WILLIAMS
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 48602
+
+
+ GULLIVER
+ Sara
+
+
+
+
+ P
+
+
+
+
+
+
+ 19350
+
+
+ HEATH
+ Grace
+
+
+
+
+ P
+
+
+
+
+
+
+ 48465
+
+
+ SLOAN
+ Rebecca
+
+
+
+
+ P
+
+
+
+
+
+
+ 30023
+
+
+ EVERETT
+ Samantha
+
+
+
+
+ P
+
+
+
+
+
+
+ 48473
+
+
+ WHITWORTH
+ Joanne
+
+
+
+
+ P
+
+
+
+
+
+
+ 48476
+
+
+ LANG
+ Anthony
+
+
+
+
+ P
+
+
+
+
+
+
+ 49360
+
+
+ WOOD
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 48668
+
+
+ BEACHLEY
+ Charlotte
+
+
+
+
+ P
+
+
+
+
+
+
+ 19576
+
+
+ LAMBERT
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 48673
+
+
+ BAILES
+ Philip
+
+
+
+
+ P
+
+
+
+
+
+
+ 18867
+
+
+ MATTHEWS
+ Skye
+
+
+
+
+ P
+
+
+
+
+
+
+ 18887
+
+
+ FOILS
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ 18888
+
+
+ SIMONS
+ Daniela
+
+
+
+
+ P
+
+
+
+
+
+
+ 25547
+
+
+ EVANS
+ Scott
+
+
+
+
+ P
+
+
+
+
+
+
+ 48878
+
+
+ LAWE
+ Philip
+
+
+
+
+ P
+
+
+
+
+
+
+ 44304
+
+
+ PARTU
+ Alicia
+
+
+
+
+ P
+
+
+
+
+
+
+ 30443
+
+
+ ADDISON
+ Nicholas
+
+
+
+
+ P
+
+
+
+
+
+
+ 25567
+
+
+ GILES
+ Holly
+
+
+
+
+ P
+
+
+
+
+
+
+ 14346
+
+
+ ROBERTSON
+ Stephanie
+
+
+
+
+ P
+
+
+
+
+
+
+ 17005
+
+
+ PALIBO
+ Damien
+
+
+
+
+ P
+
+
+
+
+
+
+ 31509
+
+
+ SAMPSON
+ Johanna
+
+
+
+
+ P
+
+
+
+
+
+
+ 50101
+
+
+ BECK
+ Mark
+
+
+
+
+ P
+
+
+
+
+
+
+ 15412
+
+
+ GRANDE
+ Dean
+
+
+
+
+ P
+
+
+
+
+
+
+ 28413
+
+
+ JOYCE
+ Dominic
+
+
+
+
+ P
+
+
+
+
+
+
+ 30491
+
+
+ EVALL
+ Scott
+
+
+
+
+ P
+
+
+
+
+
+
+ 14393
+
+
+ GLADSTONE
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 14395
+
+
+ TAYLOR
+ Shelley
+
+
+
+
+ P
+
+
+
+
+
+
+ 31541
+
+
+ KENNEY
+ Mathew
+
+
+
+
+ P
+
+
+
+
+
+
+ 14727
+
+
+ HOLAK
+ Alison
+
+
+
+
+ P
+
+
+
+
+
+
+ 44718
+
+
+ HABIB
+ Ebony
+
+
+
+
+ P
+
+
+
+
+
+
+ 14907
+
+
+ ROBSON
+ Peter
+
+
+
+
+ P
+
+
+
+
+
+
+ 51054
+
+
+ WALTERS
+ Jessica
+
+
+
+
+ P
+
+
+
+
+
+
+ 52104
+
+
+ LEE
+ Brent
+
+
+
+
+ P
+
+
+
+
+
+
+ 15800
+
+
+ DEVON
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 14762
+
+
+ BOLLS
+ Georgia
+
+
+
+
+ P
+
+
+
+
+
+
+ 14929
+
+
+ MINNETT
+ Anthony
+
+
+
+
+ P
+
+
+
+
+
+
+ 19031
+
+
+ MCGRATH
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 29531
+
+
+ PERRON
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 52130
+
+
+ KATAWA
+ Madeleine
+
+
+
+
+ P
+
+
+
+
+
+
+ 29547
+
+
+ CHANG
+ Kathy
+
+
+
+
+ P
+
+
+
+
+
+
+ 15837
+
+
+ WENTWORTH
+ Kaitlin
+
+
+
+
+ P
+
+
+
+
+
+
+ 16565
+
+
+ AUGUSTINE
+ Jason
+
+
+
+
+ P
+
+
+
+
+
+
+ 19060
+
+
+ BEGG
+ Mathew
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ P
+
+
+
+
+
+
+ 51265
+
+
+ HARTLEY
+ Brendan
+
+
+
+
+ P
+
+
+
+
+
+
+ 18502
+
+
+ MOON
+ Christine
+
+
+
+
+ P
+
+
+
+
+
+
+ 52319
+
+
+ LEUNG
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 15694
+
+
+ HARDY
+ Nicola
+
+
+
+
+ P
+
+
+
+
+
+
+ 17468
+
+
+ RIDDELL
+ Briony
+
+
+
+
+ P
+
+
+
+
+
+
+ 8004
+
+
+ WISHART
+ Natasha
+
+
+
+
+ P
+
+
+
+
+
+
+ 19083
+
+
+ NAGATA
+ Michaela
+
+
+
+
+ P
+
+
+
+
+
+
+ 19086
+
+
+ WATSON
+ Sara
+
+
+
+
+ P
+
+
+
+
+
+
+ 8012
+
+
+ BETTS
+ Linda
+
+
+
+
+ P
+
+
+
+
+
+
+ 17480
+
+
+ SUMMER
+ Luke
+
+
+
+
+ P
+
+
+
+
+
+
+ 8021
+
+
+ MONK
+ Sean
+
+
+
+
+ P
+
+
+
+
+
+
+ 18376
+
+
+ BROADFOOT
+ Elise
+
+
+
+
+ P
+
+
+
+
+
+
+ 50577
+
+
+ FRIEND
+ Caroline
+
+
+
+
+ P
+
+
+
+
+
+
+ 8036
+
+
+ O'DOHERTY
+ Samantha
+
+
+
+
+ P
+
+
+
+
+
+
+ 19274
+
+
+ BARNES
+ Peter
+
+
+
+
+ P
+
+
+
+
+
+
+ 17828
+
+
+ TORR
+ Hannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 49093
+
+
+ RYDER
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 49452
+
+
+ BURNS
+ Kate
+
+
+
+
+ P
+
+
+
+
+
+
+ 49614
+
+
+ SHAYNE
+ Hannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 52562
+
+
+ MARKS
+ Eleanor
+
+
+
+
+ P
+
+
+
+
+
+
+ 48586
+
+
+ MONEY
+ Isaac
+
+
+
+
+ P
+
+
+
+
+
+
+ 48914
+
+
+ CHATHAM
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ 19833
+
+
+ STANNARD
+ Rachel
+
+
+
+
+ P
+
+
+
+
+
+
+ 15109
+
+
+ WALL
+ Katherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 49826
+
+
+ WARNER
+ Stephanie
+
+
+
+
+ P
+
+
+
+
+
+
+ 31061
+
+
+ SHARPE
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 49837
+
+
+ DUTCH
+ Lauren
+
+
+
+
+ P
+
+
+
+
+
+
+ 49680
+
+
+ HENDRICH
+ Danielle
+
+
+
+
+ P
+
+
+
+
+
+
+ 20017
+
+
+ BURTON
+ Evelyn
+
+
+
+
+ P
+
+
+
+
+
+
+ 49859
+
+
+ SIMPSON
+ Johanna
+
+
+
+
+ P
+
+
+
+
+
+
+ 49883
+
+
+ OAKLEY
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 45162
+
+
+ MCPHERSON
+ Alison
+
+
+
+
+ P
+
+
+
+
+
+
+ 30729
+
+
+ SPOONER
+ Chris
+
+
+
+
+ P
+
+
+
+
+
+
+ 13912
+
+
+ PETERS
+ Emma
+
+
+
+
+ P
+
+
+
+
+
+
+ E1000
+
+
+ WHIPPS
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 33073
+
+
+ INNES
+ Robert
+
+
+
+
+ P
+
+
+
+
+
+
+ 17302
+
+
+ TURNER
+ Josephine
+
+
+
+
+ P
+
+
+
+
+
+
+ 17305
+
+
+ HARPE
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 45510
+
+
+ LEE
+ Tim
+
+
+
+
+ P
+
+
+
+
+
+
+ 17311
+
+
+ LLEWELYN
+ Dean
+
+
+
+
+ P
+
+
+
+
+
+
+ 14836
+
+
+ COSTA
+ Georgia
+
+
+
+
+ P
+
+
+
+
+
+
+ 19103
+
+
+ SKINNER
+ Elizabeth
+
+
+
+
+ P
+
+
+
+
+
+
+ 17340
+
+
+ BURNS
+ Annabel
+
+
+
+
+ P
+
+
+
+
+
+
+ 17349
+
+
+ FIELDS
+ Lucinda
+
+
+
+
+ P
+
+
+
+
+
+
+ 48051
+
+
+ WHITE
+ Claire
+
+
+
+
+ P
+
+
+
+
+
+
+ 15748
+
+
+ BURCH
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 30961
+
+
+ CRAIG
+ Andrew
+
+
+
+
+ P
+
+
+
+
+
+
+ 18407
+
+
+ CRAIG
+ Holly
+
+
+
+
+ P
+
+
+
+
+
+
+ 15923
+
+
+ JOHNSON
+ William
+
+
+
+
+ P
+
+
+
+
+
+
+ 19311
+
+
+ GLADSTONE
+ Natalie
+
+
+
+
+ P
+
+
+
+
+
+
+ 17542
+
+
+ BROWN
+ Emily
+
+
+
+
+ P
+
+
+
+
+
+
+ 19159
+
+
+ RALEIGH
+ Georgia
+
+
+
+
+ P
+
+
+
+
+
+
+ 45916
+
+
+ MUIR
+ Peter
+
+
+
+
+ P
+
+
+
+
+
+
+ 52255
+
+
+ TURNER
+ Hannah
+
+
+
+
+ P
+
+
+
+
+
+
+ 18445
+
+
+ EAGLE
+ Amelia
+
+
+
+
+ P
+
+
+
+
+
+
+ 49150
+
+
+ GALLETTA
+ Elisha
+
+
+
+
+ P
+
+
+
+
+
+
+ 18294
+
+
+ BIRD
+ Katharine
+
+
+
+
+ P
+
+
+
+
+
+
+ 49178
+
+
+ SARGENT
+ Nicholas
+
+
+
+
+ P
+
+
+
+
+
+
+ 29699
+
+
+ BOYLE
+ Chelsea
+
+
+
+
+ P
+
+
+
+
+
+
+ 18803
+
+
+ LONG
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 18806
+
+
+ DAWSON
+ Grace
+
+
+
+
+ P
+
+
+
+
+
+
+ 49514
+
+
+ ROUDY
+ Beth
+
+
+
+
+ P
+
+
+
+
+
+
+ 18490
+
+
+ PLEASANT
+ Nichola
+
+
+
+
+ P
+
+
+
+
+
+
+ 29889
+
+
+ MORNEY
+ Mathew
+
+
+
+
+ P
+
+
+
+
+
+
+ 46887
+
+
+ PATEL
+ Joshua
+
+
+
+
+ P
+
+
+
+
+
+
+ 17795
+
+
+ STANHOPE
+ Elisabeth
+
+
+
+
+ P
+
+
+
+
+
+
+ 52814
+
+
+ WATT
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 15008
+
+
+ LAURIE
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 15014
+
+
+ STUART
+ Meryn
+
+
+
+
+ P
+
+
+
+
+
+
+ 49723
+
+
+ ROBERTSON
+ James
+
+
+
+
+ P
+
+
+
+
+
+
+ 49734
+
+
+ MILLER
+ Heidi
+
+
+
+
+ P
+
+
+
+
+
+
+ 49748
+
+
+ THOMPSON
+ Charlotte
+
+
+
+
+ P
+
+
+
+
+
+
+ 15202
+
+
+ MERCHANT
+ Margaret
+
+
+
+
+ P
+
+
+
+
+
+
+ 26269
+
+
+ DUDLEY
+ Eleanor
+
+
+
+
+ P
+
+
+
+
+
+
+ 52868
+
+
+ JOLLY
+ Catherine
+
+
+
+
+ P
+
+
+
+
+
+
+ 49766
+
+
+ BAPTISTA
+ Dean
+
+
+
+
+ P
+
+
+
+
+
+
+ 16109
+
+
+ WONG
+ Rebekah
+
+
+
+
+ P
+
+
+
+
+
+
+ 16112
+
+
+ MIKALAUSKAS
+ Brittany
+
+
+
+
+ P
+
+
+
+
+
+
+ 50111
+
+
+ UTHRIE
+ Annabelle
+
+
+
+
+ P
+
+
+
+
+
+
+ 45244
+
+
+ DEVLIN
+ Annabel
+
+
+
+
+ P
+
+
+
+
+
+
+ 17047
+
+
+ SANDERSON
+ Nathan
+
+
+
+
+ P
+
+
+
+
+
+
+ 31537
+
+
+ KENNEY
+ Adam
+
+
+
+
+ P
+
+
+
+
+
+
+ 14394
+
+
+ HANSON
+ Angelique
+
+
+
+
+ P
+
+
+
+
+
+
+ 31703
+
+
+ ALEXANDER
+ Samantha
+
+
+
+
+ P
+
+
+
+
+
+
+ 50144
+
+
+ DRYSER
+ Robert
+
+
+
+
+ P
+
+
+
+
+
+
+ 17060
+
+
+ COURT
+ Kevin
+
+
+
+
+ P
+
+
+
+
+
+
+ 45274
+
+
+ WHIPPS
+ Sarah
+
+
+
+
+ P
+
+
+
+
+
+
+ 879
+
+
+ Barker
+ Bob
+
+
+
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SIF3InfraREST/TestData/inputData/events.gzip b/SIF3InfraREST/TestData/inputData/events.gzip
new file mode 100644
index 00000000..8db7d338
Binary files /dev/null and b/SIF3InfraREST/TestData/inputData/events.gzip differ
diff --git a/SIF3InfraREST/TestData/inputData/events.xml b/SIF3InfraREST/TestData/inputData/events.xml
new file mode 100644
index 00000000..88fe3416
--- /dev/null
+++ b/SIF3InfraREST/TestData/inputData/events.xml
@@ -0,0 +1,101 @@
+###
+StudentPersonals
+###
+
+
+ 879
+
+
+ Barker
+ Bob
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###
+StudentPersonals
+###
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+###
+StudentPersonals
+###
+
+
+ 98765
+
+
+ DAVEY
+ Tim
+
+
+
+
+
+
+
+
+###
+SchoolInfos
+###
+
+
+ E1013
+ 01011234
+ Pri/Sec
+ 1.0
+ NG
+ Y
+ S
+ 0003
+ 2171
+
+
diff --git a/SIF3InfraREST/TestData/xml/input/.gitignore b/SIF3InfraREST/TestData/xml/input/.gitignore
new file mode 100644
index 00000000..8a4bc288
--- /dev/null
+++ b/SIF3InfraREST/TestData/xml/input/.gitignore
@@ -0,0 +1,2 @@
+/environment_play.xml
+/test.xml
diff --git a/SIF3InfraREST/TestData/xml/input/SchoolInfos.xml b/SIF3InfraREST/TestData/xml/input/SchoolInfos.xml
index c24c629f..734131c5 100644
--- a/SIF3InfraREST/TestData/xml/input/SchoolInfos.xml
+++ b/SIF3InfraREST/TestData/xml/input/SchoolInfos.xml
@@ -1,4 +1,4 @@
-
+
E1013
01011234
diff --git a/SIF3InfraREST/TestData/xml/input/StudentPersonals.xml b/SIF3InfraREST/TestData/xml/input/StudentPersonals.xml
index 178be9d5..dbb1e474 100644
--- a/SIF3InfraREST/TestData/xml/input/StudentPersonals.xml
+++ b/SIF3InfraREST/TestData/xml/input/StudentPersonals.xml
@@ -1,4 +1,4 @@
-
+
98765
diff --git a/SIF3InfraREST/TestData/xml/input/TeachingGroups.xml b/SIF3InfraREST/TestData/xml/input/TeachingGroups.xml
index f25601e2..7c567d5a 100644
--- a/SIF3InfraREST/TestData/xml/input/TeachingGroups.xml
+++ b/SIF3InfraREST/TestData/xml/input/TeachingGroups.xml
@@ -1,4 +1,4 @@
-
+
2008
20087ASPN
diff --git a/SIF3InfraREST/TestData/xml/output/.gitignore b/SIF3InfraREST/TestData/xml/output/.gitignore
new file mode 100644
index 00000000..9b5966d8
--- /dev/null
+++ b/SIF3InfraREST/TestData/xml/output/.gitignore
@@ -0,0 +1,4 @@
+/StudentDailyAttendanceConsumer 1.log
+/StudentDailyAttendanceConsumer 2.log
+/StudentPersonalConsumer 1.log
+/StudentPersonalConsumer 2.log
diff --git a/SIF3InfraREST/TestData/xml/output/environment_large.xml b/SIF3InfraREST/TestData/xml/output/environment_large.xml
index 691dd229..6124510c 100644
--- a/SIF3InfraREST/TestData/xml/output/environment_large.xml
+++ b/SIF3InfraREST/TestData/xml/output/environment_large.xml
@@ -1,4 +1,4 @@
-
+
2e5dd3ca282fc8ddb3d08dcacc407e8a
auTestSolution
@@ -14,8 +14,8 @@
http://www.SIFinfo.org/au/datamodel/1.3
REST
- NSIP EDU
- NSIP Edu SIF Demo
+ NSIP EDU (JÅ’RG)
+ NSIP Edu SIF DÉMO
diff --git a/SIF3InfraREST/ant.properties b/SIF3InfraREST/ant.properties
deleted file mode 100644
index 75b47c61..00000000
--- a/SIF3InfraREST/ant.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-deploy.install.dir=C:/Tomcat/Tomcat-7.0.59/webapps
-
-builddir=build
-setup=test
-
-app.name=SIF3InfraREST
-frameworkversion=v0.9.0-beta
-sifinfraversion=3.1
-#javaversion=1.7
-jarprefix=sif
-
diff --git a/SIF3InfraREST/build.xml b/SIF3InfraREST/build.xml
deleted file mode 100644
index a5b24ad9..00000000
--- a/SIF3InfraREST/build.xml
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SIF3InfraREST/build/.gitignore b/SIF3InfraREST/build/.gitignore
new file mode 100644
index 00000000..840e7d31
--- /dev/null
+++ b/SIF3InfraREST/build/.gitignore
@@ -0,0 +1 @@
+/classes/
diff --git a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/StudentDailyAttendanceConsumer.java b/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/StudentDailyAttendanceConsumer.java
deleted file mode 100644
index e284ab8f..00000000
--- a/SIF3InfraREST/demo/src/systemic/sif3/demo/rest/consumer/StudentDailyAttendanceConsumer.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * StudentDailyAttendanceConsumer.java
- * Created: 08/05/2014
- *
- * Copyright 2014 Systemic Pty Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied.
- * See the License for the specific language governing permissions and limitations under the License.
- */
-
-package systemic.sif3.demo.rest.consumer;
-
-import java.util.List;
-
-import sif.dd.au30.model.StudentDailyAttendanceCollectionType;
-import sif3.common.conversion.ModelObjectInfo;
-import sif3.common.header.HeaderValues.EventAction;
-import sif3.common.header.HeaderValues.UpdateType;
-import sif3.common.model.SIFEvent;
-import sif3.common.model.ServiceInfo;
-import systemic.sif3.demo.rest.ModelObjectConstants;
-
-/**
- * @author Joerg Huber
- *
- */
-public class StudentDailyAttendanceConsumer extends AUDataModelEventConsumer
-{
- public StudentDailyAttendanceConsumer()
- {
- super();
- }
-
- /*
- * Here I could override/filter the event services I am interested in. Right now I do nothing and return them as they
- * are. Note this overriding is optional.
- *
- * (non-Javadoc)
- * @see sif3.infra.rest.consumer.AbstractEventConsumer#filterEventServices(java.util.List)
- */
- @Override
- public List filterEventServices(List envEventServices)
- {
- return envEventServices;
- }
-
- /* (non-Javadoc)
- * @see sif3.common.interfaces.EventConsumer#createEventObject(java.lang.Object, sif3.common.header.HeaderValues.EventAction, sif3.common.header.HeaderValues.UpdateType)
- */
- @Override
- public SIFEvent createEventObject(Object sifObjectList, EventAction eventAction, UpdateType updateType)
- {
- if (sifObjectList != null)
- {
- if (sifObjectList instanceof StudentDailyAttendanceCollectionType)
- {
- int size = ((StudentDailyAttendanceCollectionType)sifObjectList).getStudentDailyAttendance().size();
- return new SIFEvent((StudentDailyAttendanceCollectionType)sifObjectList, eventAction, updateType, size);
- }
- else
- {
- logger.error("The given event data is not of type StudentCollectionType as expected. Cannot create event object. Return null");
- }
- }
- else
- {
- logger.error("The given event data is null. Cannot create event object. Return null");
- }
- return null; // if something is wrong then we get here.
- }
-
- /*
- * (non-Javadoc)
- * @see sif3.common.interfaces.DataModelLink#getSingleObjectClassInfo()
- */
- public ModelObjectInfo getSingleObjectClassInfo()
- {
- return ModelObjectConstants.STUDENT_DAILY_ATTENDANCE;
- }
-
- /*
- * (non-Javadoc)
- * @see sif3.common.interfaces.DataModelLink#getMultiObjectClassInfo()
- */
- public ModelObjectInfo getMultiObjectClassInfo()
- {
- return ModelObjectConstants.STUDENT_DAILY_ATTENDANCES;
- }
-
- /*
- * (non-Javadoc)
- * @see sif3.infra.rest.consumer.AbstractConsumer#shutdown()
- */
- public void shutdown()
- {
- //Nothing to do at this stage
- }
-}
diff --git a/SIF3InfraREST/documentation/UseCases/HITS/SIF3 Framework Consumer and HITS.docx b/SIF3InfraREST/documentation/UseCases/HITS/SIF3 Framework Consumer and HITS.docx
index 826e7a87..841bfb38 100644
Binary files a/SIF3InfraREST/documentation/UseCases/HITS/SIF3 Framework Consumer and HITS.docx and b/SIF3InfraREST/documentation/UseCases/HITS/SIF3 Framework Consumer and HITS.docx differ
diff --git a/SIF3InfraREST/documentation/UseCases/RICOne/RICOne.xml b/SIF3InfraREST/documentation/UseCases/RICOne/RICOne.xml
new file mode 100644
index 00000000..3012f5fa
--- /dev/null
+++ b/SIF3InfraREST/documentation/UseCases/RICOne/RICOne.xml
@@ -0,0 +1,19 @@
+
+
+
+ Bearer
+
+
+
+
+
+ 3.1
+ http://www.sifassociation.org/datamodel/na/3.3
+ REST
+
+ Systemic Pty Ltd
+ RICOne Consumer
+ 0.1alpha
+
+
+
\ No newline at end of file
diff --git a/SIF3InfraREST/documentation/UseCases/RICOne/RICOneSecurityService.java b/SIF3InfraREST/documentation/UseCases/RICOne/RICOneSecurityService.java
new file mode 100644
index 00000000..dc1b89f6
--- /dev/null
+++ b/SIF3InfraREST/documentation/UseCases/RICOne/RICOneSecurityService.java
@@ -0,0 +1,111 @@
+/*
+ * RICOneSecurityService.java
+ * Created: 26 Jul 2016
+ *
+ * Copyright 2016 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package systemic.sif3.demo.security;
+
+import org.apache.log4j.Logger;
+
+import au.com.systemic.framework.utils.AdvancedProperties;
+import riconeapi.common.Authenticator;
+import riconeapi.models.authentication.DecodedToken;
+import sif3.common.model.EnvironmentKey;
+import sif3.common.model.RequestMetadata;
+import sif3.common.model.security.TokenCoreInfo;
+import sif3.common.model.security.TokenInfo;
+import sif3.common.security.AbstractSecurityService;
+
+/**
+ * @author Joerg Huber
+ *
+ */
+public class RICOneSecurityService extends AbstractSecurityService
+{
+ protected final Logger logger = Logger.getLogger(getClass());
+
+ private final static String AOUTH_URL_PROP_NAME = "ricOne.authUrl";
+ /**
+ * @param properties
+ */
+ public RICOneSecurityService(AdvancedProperties properties)
+ {
+ super(properties);
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("RICOneSecurityService Constructor called with property: " + getServiceProperties());
+ }
+
+ }
+
+ /*
+ * Because we use this class from a consumer only we can null out the method.
+ *
+ * (non-Javadoc)
+ * @see sif3.common.security.AbstractSecurityService#validateToken(java.lang.String, sif3.common.model.RequestMetadata)
+ */
+ @Override
+ public boolean validateToken(String securityToken, RequestMetadata requestMetadata)
+ {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see sif3.common.security.AbstractSecurityService#getTokenInfo(java.lang.String, sif3.common.model.RequestMetadata)
+ */
+ @Override
+ public TokenInfo getTokenInfo(String securityToken, RequestMetadata requestMetadata)
+ {
+ Authenticator ricOneAuthenticator = Authenticator.getInstance();
+ DecodedToken decodedToken = ricOneAuthenticator.getDecodedToken(securityToken);
+
+ TokenInfo tokenInfo = new TokenInfo(securityToken, decodedToken.getExp());
+ tokenInfo.setAppUserInfo(new EnvironmentKey(null, decodedToken.getApplication_id()));
+
+ return tokenInfo;
+ }
+
+ /*
+ * Contacts the RICOne OAuth server and retrieves a new token. It then extracts info for this token an places it into the
+ * returned TokenInfo object
+ *
+ * (non-Javadoc)
+ * @see sif3.common.security.AbstractSecurityService#generateToken(sif3.common.model.security.TokenCoreInfo, java.lang.String)
+ */
+ @Override
+ public TokenInfo generateToken(TokenCoreInfo coreInfo, String password)
+ {
+ Authenticator ricOneAuthenticator = null;
+
+ logger.debug("Generate a Token from OAuth Server...");
+ try
+ {
+ // Create a token from the RICOne OAuth Server
+ ricOneAuthenticator = new Authenticator(coreInfo.getOtherInfo().get(AOUTH_URL_PROP_NAME),
+ coreInfo.getAppUserInfo().getApplicationKey(),
+ password);
+
+ // Lets convert the token to something useful
+ return getTokenInfo(ricOneAuthenticator.getToken(), null);
+ }
+ catch (Exception ex)
+ {
+ logger.error("Failed to create Authenticator to RICOne OAuth Server (No security token generated): "+ex.getMessage(), ex);
+ return null;
+ }
+
+ }
+
+}
diff --git a/SIF3InfraREST/documentation/UseCases/RICOne/RicOneConsumer.properties b/SIF3InfraREST/documentation/UseCases/RICOne/RicOneConsumer.properties
new file mode 100644
index 00000000..575df8ba
--- /dev/null
+++ b/SIF3InfraREST/documentation/UseCases/RICOne/RicOneConsumer.properties
@@ -0,0 +1,256 @@
+#--------------------------------------------------------------------------------------#
+#-- Properties relating to this Adapter: These are typical properties for a Consumer --#
+#--------------------------------------------------------------------------------------#
+
+#
+# General information about this adapter
+#
+
+# Valid values for adapter.type = consumer|provider
+adapter.type=consumer
+adapter.id=RICOne Student Consumer
+
+# Valid values for adapter.use.https = true|false
+adapter.use.https=false
+
+# Turn on (true) or off (false) ACL checks on client. Default = true
+adapter.checkACL=true
+
+#--------------------------------------#
+# RIC One Authentication Server Details
+#--------------------------------------#
+# External security service shall be used if Bearer Token is used.
+adapter.security.service=systemic.sif3.demo.security.RICOneSecurityService
+
+# Values to be used in the generation of accessToken in external security service. All values with the property
+# name starting in 'security.service.property.<...> will be passed to the 'otherInfo' property of the
+# TokenCoreInfo object. See Developer's Guide for more details.
+security.service.property.ricOne.authUrl=https://auth.test.ricone.org/login
+security.service.property.ricOne.providerId=sandbox
+
+env.application.key=...
+env.pwd=....
+
+# Demo of Hibernate Properties through 'injection'.
+#adapter.hbr.propertyClass=systemic.sif3.demo.hibernate.DemoProperties
+
+# Indicate that this consumer sets the id/refIds and requests the provider to use them rather than assigning them
+adapter.mustUseAdvisoryIDs=true
+
+# Indicates if the environment shall be deleted if the adapter shuts down (true): USE WITH CARE! If environment is removed, all
+# associated data is lost (queues, messages in queues, delayed responses etc). Should only be TRUE in direct environments without
+# events and delayed I/O.
+adapter.deleteEnvironment.onShutdown=false
+
+# Optional generator ID. Can be used as an identifier of the consumer. This value is provided as a HTTP header field
+# to the object provider.
+adapter.generator.id=sif3FrameworkRicOneConsumer
+
+# Indicate if this adapter is capable and should use compression for the payloads (true). If this property is set to true
+# then the all calls will compress (gzip) each payload first before it is sent to the provider. It will also indicate to
+# the provider that it can accepts compressed payloads in the response. If not set then 'false' is assumed (don't use
+# compression).
+adapter.compression.enabled=false
+
+# If this property is set to true then no certificate checks are performed. SHOULD NOT BE USED in PROD or TEST environments.
+# Its intend is to allow a quick and 'dirty' https connection with self-signed certificates where the certificate shall not be
+# validated. Default: false.
+adapter.noCertificateCheck=false
+
+#
+# Properties specific to an environment
+#
+
+#---------------------------------------#
+# Local (Direct Environment) Properties
+#---------------------------------------#
+
+#
+# Indicate if the environment consumer supports events. Some DIRECT environments won't support it. BROKERED environments
+# should. Valid values are true and false. The default is false.
+#
+env.events.supported=false
+
+env.xml.file.name=RICOne.xml
+
+# This allows to set/override the userToken and/or instanceId element in the environment XML. This can be used if
+# multiple instances of this adapter shall be run in the same environment configuration. In such case each instance
+# can have a different userToken to distinguish the instances. If it is empty then this property won't be used and
+# the value in the environment XML template is used.
+#env.userToken=a6031d63-b4b1-4ee3-958e-a8456d7a36c1
+env.instanceID=
+
+# mediaType can be XML or JSON (case in-sensitive). Currently only XML is supported by Framework
+env.mediaType=JSON
+
+# This property is used to set the real encoding used with the media type. The charset encoding value, if set, will be added
+# to the media type of the accept and content-type http headers (i.e. application/xml; charset=UTF-8). If it is not set
+# then no charset encoding will be added to the media type of the corresponding http headers.
+env.mediaType.charset=UTF-8
+
+# authentication.method can be: Basic, SIF_HMACSHA256 or Bearer (case sensitive!!!)
+#env.authentication.method=Basic
+env.authentication.method=Bearer
+
+# URI to Environment Enpoint
+env.baseURI=https://sandbox.ricone.org/api/environments/environment
+
+#---------------------------------------------------------#
+# Framework Specific Feature:
+# Connect to existing environment rather than create one.
+# If this section doesn't exist we assume create one.
+#---------------------------------------------------------#
+
+# This property indicates if there is no existing environment in local session store then try to use an
+# existing from Environment Provider rather than create a new one with the environment provider. Default is false.
+env.use.existing=true
+
+# The session token to use with a pre-existing environment
+env.existing.sessionToken=abcd21fa-11ab-40a9-a4b2-01159e05cdef
+
+# The full URI of the pre-existing environment.
+env.existing.environmentURI=https://sandbox.ricone.org/api/environments/22ab80ab-4235-4612-8a00-00f6f29caaaa
+
+#
+# This property indicates if a 'conflict' or HTTP Status of 409 for a create environment shall be a treated as an error (true) or if it shall
+# be considered a valid state (false). If it is considered a valid state then a payload with an environment XML/JSON would be expected if a
+# HTTP Status of 409 is returned. The default is true (treat as error).
+#
+env.create.conflictIsError=false
+
+
+#---------------------------------#
+# Event related properties
+#---------------------------------#
+# If the environment supports events then a consumer can subscribe to them. This section is to configure some
+# behaviour on how to subscribe to events. SIF3 offers many options in this area. They all relate to how queues
+# are created and events are directed to queues. See Developer's Guide for more details on the properties below.
+
+# Indicate if event subscription is enabled. Even if an environment supports events, this consumer might not be
+# interested in any events. Default is false (don't subscribe to events)
+events.enabled=false
+
+#
+# SIF3 allow many ways on how to create queues and direct events to them. This framework only supports a set of the
+# most common strategies. Currently only 'ADAPTER_LEVEL' is implemented which mean a single queue for this consumer
+# is created. Future expansions can be 'ZONE_LEVEL' (One queue per zone), SERVICE_LEVEL (one queue per service in each
+# zone) etc. Default is ADAPTER_LEVEL
+events.queue.strategy=ADAPTER_LEVEL
+
+#
+# This property is used give the queues a certain name. This might be the actual queue name if the strategy is
+# ADAPTER_LEVEL. It might be the queue's prefix if any other queue strategy is used where multiple queues are
+# configured. If not provided the name is assumed to be the same as the adapter.id property with all white spaces
+# removed and the prefix of 'EVENT_'.
+events.queue.name=StudentConsumer
+
+#
+# There are two ways how a consumer can receive messages from a queue. IMMEDIATE or LONG. Refer to SIF3
+# specification for details on the two options. Default is IMMEDIATE.
+events.queue.type=IMMEDIATE
+
+#
+# Many concurrent subscriptions are allowed on each queue. This property indicates the number of subscriptions per
+# queue. The default is 1. Care must be taken with other numbers as it could mean that events are processed out of
+# order! The environment provider might override that value with a lesser value.
+events.queue.subscribers=3
+
+#
+# Frequency with which the queues are being polled to check if there are messages available. This value is in seconds
+# and might be overwritten by the environment provider to a larger value. Default is 60 seconds (once a minute).
+events.polling.frequency=30
+
+#
+# Number of seconds the connections shall remain open for LONG_POLLING queues before it is closed. See SIF3 Spec
+# for more details. Default is 120 seconds (2minutes).
+events.longPolling.timeout=60
+
+#
+# When a consumer is shut down then events will be queued on the broker. This is generally the desired behaviour.
+# There might be situations where a shutdown of the consumer also means no events shall be queued during the off-line
+# time. To enable this the subscriptions to events must be removed from the event queue. This property indicates if
+# subscriptions shall be removed when the consumer shuts down. Default is false => Don't remove subscriptions.
+events.subscriptions.removeOnShutdown=false
+
+
+#-------------------------------------#
+# DELAYED Response related properties
+#-------------------------------------#
+# If the environment supports delayed responses then a consumer can subscribe to them. This section is to configure some
+# behaviour on how to subscribe to delayed responses. SIF3 offers many options in this area. They all relate to how queues
+# are created and responses are directed to queues. See Developer's Guide for more details on the properties below.
+
+# Indicate if delayed responses are enabled. Even if an environment supports delayed responses, this consumer might not be
+# interested in that functionality. Default is false (don't enable delayed responses)
+delayed.enabled=false
+
+#
+# SIF3 allow many ways on how to create queues and direct responses to them. This framework only supports a set of the
+# most common strategies. Currently only 'ADAPTER_LEVEL' is implemented which mean a single queue for this consumer
+# is created. Future expansions can be 'ZONE_LEVEL' (One queue per zone), SERVICE_LEVEL (one queue per service in each
+# zone) etc. Default is ADAPTER_LEVEL
+delayed.queue.strategy=ADAPTER_LEVEL
+
+#
+# This property is used give the queues a certain name. This might be the actual queue name if the strategy is
+# ADAPTER_LEVEL. It might be the queue's prefix if any other queue strategy is used where multiple queues are
+# configured. If not provided the name is assumed to be the same as the adapter.id property with all white spaces
+# removed and the prefix of 'DELAYED_'.
+delayed.queue.name=Delayed_StudentConsumer
+
+#
+# There are two ways how a consumer can receive messages from a queue. IMMEDIATE or LONG. Refer to SIF3
+# specification for details on the two options. Default is IMMEDIATE.
+delayed.queue.type=IMMEDIATE
+
+#
+# Many concurrent subscriptions are allowed on each queue. This property indicates the number of subscriptions per
+# queue. The default is 1. Care must be taken with other numbers as it could mean that responses are processed out of
+# order! The environment provider might override that value with a lesser value.
+delayed.queue.subscribers=2
+
+#
+# Frequency with which the queues are being polled to check if there are messages available. This value is in seconds
+# and might be overwritten by the environment provider to a larger value. Default is 60 seconds (once a minute).
+delayed.polling.frequency=120
+
+#
+# Number of seconds the connections shall remain open for LONG_POLLING queues before it is closed. See SIF3 Spec
+# for more details. Default is 120 seconds (2minutes).
+delayed.longPolling.timeout=30
+
+#
+# When a consumer is shut down then delayed responses will be queued on the broker. This is generally the desired behaviour.
+# There might be situations where a shutdown of the consumer also means no responses shall be queued during the off-line
+# time. To enable this the subscriptions to delayed responses must be removed from the response queue. This property indicates if
+# subscriptions shall be removed when the consumer shuts down. Default is false => Don't remove subscriptions.
+delayed.subscriptions.removeOnShutdown=false
+
+#-------------------------------------#
+#-- Consumer Assembly Setup Section --#
+#-------------------------------------#
+#The Base Package where all Consumer Classes can be found
+consumer.basePackageName=sif3demo.consumer
+
+#Name of all Consumer Classes that make up this Consumer. This is a comma separated list
+consumer.classes=StudentConsumer
+
+# Each consumer in the list above is started in their own thread. These threads are started with a little delay between them.
+# The default is 10 seconds. The property below allows to override that value. The delay is in seconds.
+consumer.startup.delay=5
+
+# The number of threads processing messages (events) locally. This is the number of threads for each object type that is processed locally.
+# If this value is not set then 1 is assumed (default).
+consumer.local.workerThread=2
+
+#
+# If it is required to set the number of local processing thread differently to the global number for a particular consumer
+# (name of consumer.classes property) then this is set here. The notation is: consumer.local.workerThread.=
+#consumer.local.workerThread.StudentDailyAttendanceConsumer=5
+
+
+
+#---------------------------------#
+# Custom Properties
+#---------------------------------#
+
diff --git a/SIF3InfraREST/documentation/UseCases/RICOne/SIF3 Framework Consumer and RICOne.docx b/SIF3InfraREST/documentation/UseCases/RICOne/SIF3 Framework Consumer and RICOne.docx
new file mode 100644
index 00000000..b41df72a
Binary files /dev/null and b/SIF3InfraREST/documentation/UseCases/RICOne/SIF3 Framework Consumer and RICOne.docx differ
diff --git a/SIF3InfraREST/documentation/UserGuide/SIF3Framework_DevelopersGuide_v0.6.4.docx b/SIF3InfraREST/documentation/UserGuide/SIF3Framework_DevelopersGuide_v0.6.4.docx
deleted file mode 100644
index cfe3745b..00000000
Binary files a/SIF3InfraREST/documentation/UserGuide/SIF3Framework_DevelopersGuide_v0.6.4.docx and /dev/null differ
diff --git a/SIF3InfraREST/documentation/UserGuide/SIF3Framework_DevelopersGuide_v0.7.0.docx b/SIF3InfraREST/documentation/UserGuide/SIF3Framework_DevelopersGuide_v0.7.0.docx
new file mode 100644
index 00000000..23e1f6a1
Binary files /dev/null and b/SIF3InfraREST/documentation/UserGuide/SIF3Framework_DevelopersGuide_v0.7.0.docx differ
diff --git a/SIF3InfraREST/documentation/javadoc.zip b/SIF3InfraREST/documentation/javadoc.zip
index c3d67994..b890e117 100644
Binary files a/SIF3InfraREST/documentation/javadoc.zip and b/SIF3InfraREST/documentation/javadoc.zip differ
diff --git a/SIF3InfraREST/lib/ant-contrib-1.0b3/ant-contrib-1.0b3.jar b/SIF3InfraREST/lib/ant-contrib-1.0b3/ant-contrib-1.0b3.jar
deleted file mode 100644
index 06253766..00000000
Binary files a/SIF3InfraREST/lib/ant-contrib-1.0b3/ant-contrib-1.0b3.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/common/commons-beanutils-1.8.3.jar b/SIF3InfraREST/lib/common/commons-beanutils-1.8.3.jar
deleted file mode 100644
index 218510bc..00000000
Binary files a/SIF3InfraREST/lib/common/commons-beanutils-1.8.3.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/common/commons-codec-1.9.jar b/SIF3InfraREST/lib/common/commons-codec-1.9.jar
deleted file mode 100644
index ef35f1c5..00000000
Binary files a/SIF3InfraREST/lib/common/commons-codec-1.9.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/common/commons-collections-3.2.1.jar b/SIF3InfraREST/lib/common/commons-collections-3.2.1.jar
deleted file mode 100644
index c35fa1fe..00000000
Binary files a/SIF3InfraREST/lib/common/commons-collections-3.2.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/common/commons-jxpath.jar b/SIF3InfraREST/lib/common/commons-jxpath.jar
deleted file mode 100644
index 2336988d..00000000
Binary files a/SIF3InfraREST/lib/common/commons-jxpath.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/common/commons-lang-2.6.jar b/SIF3InfraREST/lib/common/commons-lang-2.6.jar
deleted file mode 100644
index 98467d3a..00000000
Binary files a/SIF3InfraREST/lib/common/commons-lang-2.6.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/common/commons-logging-1.1.1.jar b/SIF3InfraREST/lib/common/commons-logging-1.1.1.jar
deleted file mode 100644
index 8758a96b..00000000
Binary files a/SIF3InfraREST/lib/common/commons-logging-1.1.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/common/commons-pool-1.1.jar b/SIF3InfraREST/lib/common/commons-pool-1.1.jar
deleted file mode 100644
index c61bde6c..00000000
Binary files a/SIF3InfraREST/lib/common/commons-pool-1.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/datamodel/sifDataModel_au3.4.jar b/SIF3InfraREST/lib/datamodel/sifDataModel_au3.4.jar
index c8e8efd6..d58a369b 100644
Binary files a/SIF3InfraREST/lib/datamodel/sifDataModel_au3.4.jar and b/SIF3InfraREST/lib/datamodel/sifDataModel_au3.4.jar differ
diff --git a/SIF3InfraREST/lib/hibernate/antlr-2.7.7.jar b/SIF3InfraREST/lib/hibernate/antlr-2.7.7.jar
deleted file mode 100644
index 5e5f14b3..00000000
Binary files a/SIF3InfraREST/lib/hibernate/antlr-2.7.7.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/c3p0-0.9.2.1.jar b/SIF3InfraREST/lib/hibernate/c3p0-0.9.2.1.jar
deleted file mode 100644
index 10ec0dc7..00000000
Binary files a/SIF3InfraREST/lib/hibernate/c3p0-0.9.2.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/hibernate-c3p0-4.3.10.Final.jar b/SIF3InfraREST/lib/hibernate/hibernate-c3p0-4.3.10.Final.jar
deleted file mode 100644
index 7a91b11e..00000000
Binary files a/SIF3InfraREST/lib/hibernate/hibernate-c3p0-4.3.10.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/hibernate-commons-annotations-4.0.5.Final.jar b/SIF3InfraREST/lib/hibernate/hibernate-commons-annotations-4.0.5.Final.jar
deleted file mode 100644
index 6b13dcec..00000000
Binary files a/SIF3InfraREST/lib/hibernate/hibernate-commons-annotations-4.0.5.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/hibernate-core-4.3.10.Final.jar b/SIF3InfraREST/lib/hibernate/hibernate-core-4.3.10.Final.jar
deleted file mode 100644
index d7bb64ce..00000000
Binary files a/SIF3InfraREST/lib/hibernate/hibernate-core-4.3.10.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/hibernate-jpa-2.1-api-1.0.0.Final.jar b/SIF3InfraREST/lib/hibernate/hibernate-jpa-2.1-api-1.0.0.Final.jar
deleted file mode 100644
index e2f2c592..00000000
Binary files a/SIF3InfraREST/lib/hibernate/hibernate-jpa-2.1-api-1.0.0.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/jandex-1.1.0.Final.jar b/SIF3InfraREST/lib/hibernate/jandex-1.1.0.Final.jar
deleted file mode 100644
index 6348ac24..00000000
Binary files a/SIF3InfraREST/lib/hibernate/jandex-1.1.0.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/javassist-3.18.1-GA.jar b/SIF3InfraREST/lib/hibernate/javassist-3.18.1-GA.jar
deleted file mode 100644
index d5f19ac5..00000000
Binary files a/SIF3InfraREST/lib/hibernate/javassist-3.18.1-GA.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/jboss-logging-3.1.3.GA.jar b/SIF3InfraREST/lib/hibernate/jboss-logging-3.1.3.GA.jar
deleted file mode 100644
index ff3a103c..00000000
Binary files a/SIF3InfraREST/lib/hibernate/jboss-logging-3.1.3.GA.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/jboss-logging-annotations-1.2.0.Beta1.jar b/SIF3InfraREST/lib/hibernate/jboss-logging-annotations-1.2.0.Beta1.jar
deleted file mode 100644
index 03f7e230..00000000
Binary files a/SIF3InfraREST/lib/hibernate/jboss-logging-annotations-1.2.0.Beta1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/jboss-transaction-api_1.2_spec-1.0.0.Final.jar b/SIF3InfraREST/lib/hibernate/jboss-transaction-api_1.2_spec-1.0.0.Final.jar
deleted file mode 100644
index 7817dc12..00000000
Binary files a/SIF3InfraREST/lib/hibernate/jboss-transaction-api_1.2_spec-1.0.0.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/hibernate/mchange-commons-java-0.2.3.4.jar b/SIF3InfraREST/lib/hibernate/mchange-commons-java-0.2.3.4.jar
deleted file mode 100644
index f03ed884..00000000
Binary files a/SIF3InfraREST/lib/hibernate/mchange-commons-java-0.2.3.4.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/j2ee/servlet-api-3.0.jar b/SIF3InfraREST/lib/j2ee/servlet-api-3.0.jar
deleted file mode 100644
index 1ce0cb44..00000000
Binary files a/SIF3InfraREST/lib/j2ee/servlet-api-3.0.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jaxb/jaxb-api.jar b/SIF3InfraREST/lib/jaxb/jaxb-api.jar
deleted file mode 100644
index 8f45754c..00000000
Binary files a/SIF3InfraREST/lib/jaxb/jaxb-api.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jaxb/jaxb-impl.jar b/SIF3InfraREST/lib/jaxb/jaxb-impl.jar
deleted file mode 100644
index 3eec2f41..00000000
Binary files a/SIF3InfraREST/lib/jaxb/jaxb-impl.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jersey/jersey-client-1.19.jar b/SIF3InfraREST/lib/jersey/jersey-client-1.19.jar
deleted file mode 100644
index c9e0f561..00000000
Binary files a/SIF3InfraREST/lib/jersey/jersey-client-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jersey/jersey-core-1.19.jar b/SIF3InfraREST/lib/jersey/jersey-core-1.19.jar
deleted file mode 100644
index 92feb639..00000000
Binary files a/SIF3InfraREST/lib/jersey/jersey-core-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jersey/jersey-json-1.19.jar b/SIF3InfraREST/lib/jersey/jersey-json-1.19.jar
deleted file mode 100644
index b609411b..00000000
Binary files a/SIF3InfraREST/lib/jersey/jersey-json-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jersey/jersey-server-1.19.jar b/SIF3InfraREST/lib/jersey/jersey-server-1.19.jar
deleted file mode 100644
index 3710b885..00000000
Binary files a/SIF3InfraREST/lib/jersey/jersey-server-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jersey/jersey-servlet-1.19.jar b/SIF3InfraREST/lib/jersey/jersey-servlet-1.19.jar
deleted file mode 100644
index 2bfdf820..00000000
Binary files a/SIF3InfraREST/lib/jersey/jersey-servlet-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/jersey/jsr311-api-1.1.1.jar b/SIF3InfraREST/lib/jersey/jsr311-api-1.1.1.jar
deleted file mode 100644
index ec8bc818..00000000
Binary files a/SIF3InfraREST/lib/jersey/jsr311-api-1.1.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/json/jettison-1.3.3.jar b/SIF3InfraREST/lib/json/jettison-1.3.3.jar
deleted file mode 100644
index 332a475c..00000000
Binary files a/SIF3InfraREST/lib/json/jettison-1.3.3.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/log4j/log4j.jar b/SIF3InfraREST/lib/log4j/log4j.jar
deleted file mode 100644
index 62513071..00000000
Binary files a/SIF3InfraREST/lib/log4j/log4j.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/log4j/slf4j-api-1.5.8.jar b/SIF3InfraREST/lib/log4j/slf4j-api-1.5.8.jar
deleted file mode 100644
index 20d1d371..00000000
Binary files a/SIF3InfraREST/lib/log4j/slf4j-api-1.5.8.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/log4j/slf4j-log4j12-1.5.8.jar b/SIF3InfraREST/lib/log4j/slf4j-log4j12-1.5.8.jar
deleted file mode 100644
index b63bcdc7..00000000
Binary files a/SIF3InfraREST/lib/log4j/slf4j-log4j12-1.5.8.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/pjl/pjl-comp-filter-1.8.1.jar b/SIF3InfraREST/lib/pjl/pjl-comp-filter-1.8.1.jar
deleted file mode 100644
index 2e4df98c..00000000
Binary files a/SIF3InfraREST/lib/pjl/pjl-comp-filter-1.8.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/systemic/systemic-framework-20160229.jar b/SIF3InfraREST/lib/systemic/systemic-framework-20160229.jar
deleted file mode 100644
index 9b3da0b6..00000000
Binary files a/SIF3InfraREST/lib/systemic/systemic-framework-20160229.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/xml/dom4j-1.6.1.jar b/SIF3InfraREST/lib/xml/dom4j-1.6.1.jar
deleted file mode 100644
index c8c4dbb9..00000000
Binary files a/SIF3InfraREST/lib/xml/dom4j-1.6.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/lib/xml/xom-1.2.8.jar b/SIF3InfraREST/lib/xml/xom-1.2.8.jar
deleted file mode 100644
index 370d40c3..00000000
Binary files a/SIF3InfraREST/lib/xml/xom-1.2.8.jar and /dev/null differ
diff --git a/SIF3InfraREST/log/.gitignore b/SIF3InfraREST/log/.gitignore
new file mode 100644
index 00000000..8e487aad
--- /dev/null
+++ b/SIF3InfraREST/log/.gitignore
@@ -0,0 +1 @@
+/sif3infraREST.log
diff --git a/SIF3InfraREST/pom.xml b/SIF3InfraREST/pom.xml
new file mode 100644
index 00000000..d1863d63
--- /dev/null
+++ b/SIF3InfraREST/pom.xml
@@ -0,0 +1,235 @@
+
+
+ 4.0.0
+
+
+
+ Apache License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ manual
+ A business-friendly OSS license
+
+
+
+
+
+
+ sif3.framework
+ sif3-framework
+ 0.10.0-beta
+ pom
+
+
+
+
+
+ UTF-8
+
+
+ 1.7
+ 1.7
+
+
+
+ C:/Development/GitHubRepositories/SIF3InfraRest/SIF3InfraREST/lib
+
+
+ ${project.lib.dir}/datamodel
+
+
+ 3.1
+
+
+ sif${sifInfraVersion}
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sifau
+ sif3-au-datamodel
+ 3.4
+ test
+
+
+
+
+
+
+ jdbc
+ mysql-jdbc
+ 4.0
+ test
+
+
+ jdbc
+ oracle-jdbc
+ 6.0
+ test
+
+
+ jdbc
+ sqlite-jdbc
+ 3.7.2
+ test
+
+
+
+
+
+
+ log4j
+ log4j
+ 1.2.14
+
+
+
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+ provided
+
+
+
+
+
+
+ javax.ws.rs
+ jsr311-api
+ 1.1.1
+ provided
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.19.1
+
+ ${skipTests}
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+ 2.5.2
+
+
+ install-external-au-datamodel
+ clean
+
+ ${project.lib.dir}/datamodel/sifDataModel_au3.4.jar
+ default
+ sifau
+ sif3-au-datamodel
+ 3.4
+ jar
+ true
+
+
+ install-file
+
+
+
+ install-external-mysql-jdbc
+ clean
+
+ ${project.lib.dir}/jdbc/mysql.jar
+ default
+ jdbc
+ mysql-jdbc
+ 4.0
+ jar
+ true
+
+
+ install-file
+
+
+
+ install-external-oracle-jdbc
+ clean
+
+ ${project.lib.dir}/jdbc/ojdbc6.jar
+ default
+ jdbc
+ oracle-jdbc
+ 6.0
+ jar
+ true
+
+
+ install-file
+
+
+
+ install-external-sqlite-jdbc
+ clean
+
+ ${project.lib.dir}/jdbc/sqlite-jdbc-3.7.2.jar
+ default
+ jdbc
+ sqlite-jdbc
+ 3.7.2
+ jar
+ true
+
+
+ install-file
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+
+
+
+
+
+ SIF3Common
+ SIF3InfraModel
+ SIF3InfraCommon
+ SIF3REST
+
+ SIF3 Framework Parent Project
+ This is the parent project to build all SIF3 Framework Artifacts.
+
\ No newline at end of file
diff --git a/SIF3InfraREST/release/sif3.1Common-0.10.0-beta.jar b/SIF3InfraREST/release/sif3.1Common-0.10.0-beta.jar
new file mode 100644
index 00000000..8eb91bdc
Binary files /dev/null and b/SIF3InfraREST/release/sif3.1Common-0.10.0-beta.jar differ
diff --git a/SIF3InfraREST/release/sif3.1Common-v0.9.0-beta.jar b/SIF3InfraREST/release/sif3.1Common-v0.9.0-beta.jar
deleted file mode 100644
index 94d2090a..00000000
Binary files a/SIF3InfraREST/release/sif3.1Common-v0.9.0-beta.jar and /dev/null differ
diff --git a/SIF3InfraREST/release/sif3.1Demo-v0.9.0-beta.jar b/SIF3InfraREST/release/sif3.1Demo-v0.9.0-beta.jar
deleted file mode 100644
index 86e1c913..00000000
Binary files a/SIF3InfraREST/release/sif3.1Demo-v0.9.0-beta.jar and /dev/null differ
diff --git a/SIF3InfraREST/release/sif3.1Infra-common-0.10.0-beta.jar b/SIF3InfraREST/release/sif3.1Infra-common-0.10.0-beta.jar
new file mode 100644
index 00000000..83c26a60
Binary files /dev/null and b/SIF3InfraREST/release/sif3.1Infra-common-0.10.0-beta.jar differ
diff --git a/SIF3InfraREST/release/sif3.1Infra-common-v0.9.0-beta.jar b/SIF3InfraREST/release/sif3.1Infra-common-v0.9.0-beta.jar
deleted file mode 100644
index bdc20f0e..00000000
Binary files a/SIF3InfraREST/release/sif3.1Infra-common-v0.9.0-beta.jar and /dev/null differ
diff --git a/SIF3InfraREST/release/sif3.1Infra-model-0.10.0-beta.jar b/SIF3InfraREST/release/sif3.1Infra-model-0.10.0-beta.jar
new file mode 100644
index 00000000..a3a7a504
Binary files /dev/null and b/SIF3InfraREST/release/sif3.1Infra-model-0.10.0-beta.jar differ
diff --git a/SIF3InfraREST/release/sif3.1Infra-model-v0.9.0-beta.jar b/SIF3InfraREST/release/sif3.1Infra-model-v0.9.0-beta.jar
deleted file mode 100644
index 1f14aede..00000000
Binary files a/SIF3InfraREST/release/sif3.1Infra-model-v0.9.0-beta.jar and /dev/null differ
diff --git a/SIF3InfraREST/release/sif3.1Infra-rest-0.10.0-beta.jar b/SIF3InfraREST/release/sif3.1Infra-rest-0.10.0-beta.jar
new file mode 100644
index 00000000..c12c4b34
Binary files /dev/null and b/SIF3InfraREST/release/sif3.1Infra-rest-0.10.0-beta.jar differ
diff --git a/SIF3InfraREST/release/sif3.1Infra-rest-v0.9.0-beta.jar b/SIF3InfraREST/release/sif3.1Infra-rest-v0.9.0-beta.jar
deleted file mode 100644
index b8462d5f..00000000
Binary files a/SIF3InfraREST/release/sif3.1Infra-rest-v0.9.0-beta.jar and /dev/null differ
diff --git a/SIF3InfraREST/release/v0.10.0/Release_Notes_v0.10.0.txt b/SIF3InfraREST/release/v0.10.0/Release_Notes_v0.10.0.txt
new file mode 100644
index 00000000..4791b7f6
--- /dev/null
+++ b/SIF3InfraREST/release/v0.10.0/Release_Notes_v0.10.0.txt
@@ -0,0 +1,102 @@
+==============================================================
+Release Notes for v0.10.0 of SIF3 Framework (Dec 20, 2016)
+==============================================================
+
+Please note that as of this version the SIF3 Framework no longer uses Ant for the build process. It now uses
+Maven that is superior when it comes to dependency management. Therefore if you wish to build the framework
+yourself or need changes and want to rebuild it, you need either a Maven capable IDE or maven installed.
+Please refer to the developer's guide for maven version information.
+
+If you have the framework imported to your IDE and want to upgrade to the latest version it is suggested
+that you perform the steps listed below. The directory structure has changed considerably and uses
+maven conventions. Therefore it is best to completely re-import the project to your IDE:
+
+1) Remove the current SIF3 Framework Project from your IDE. This not only includes the removal from the IDE
+ but also physical removal of the SIF3 Framework directory and its sub-directory. If you made changes to
+ the framework, make sure you make a backup first!
+2) Now re-import the project as a Maven multi-module project into your IDE. Details for Eclispe are listed
+ in the developer's guide under section "3.3.6.1 Eclipse Notes" Follow similar steps for other IDEs.
+
+More details about the various maven modules can be found in the Developer's Guide in section
+"3.2. Framework Structure".
+
+Bug Fixes
+---------
+- Fixed issue on provider with external security services and the environment resource class. External tokens are
+ now dealt with correctly if a token is renewed with a different value.
+- Provider reports proper error to consumer if navigationPage is <=0.
+- Fixed issue where consumerInstanceId must be a int rather than a string when reading from Message Queues.
+
+New Functionality
+-----------------
+- None
+
+Changed Functionality
+---------------------
+- Added new parameter called customResponseParams to ALL provider side interface methods, namely the Provider.java,
+ QueryProvider.java and ChangesSinceProvider.java interfaces.
+ THIS WILL BREAK YOUR CODE if you implement a provider.
+ See Infrastructure Upgrade below section for more details.
+
+Removed Artifacts/Functionality
+-------------------------------
+- None
+- Dependency on the systemoc-framework_.jar has been removed. Applicable classes of that library are now part of
+ the SIF3 Framework.
+
+--------------------------
+-- Upgrade Instructions --
+--------------------------
+
+----------------------------
+-- Infrastructure Upgrade --
+----------------------------
+- Drop the latest framework library into your project's lib directory/directories.
+
+==========================================================================================================================
+Providers ONLY: Compilation Error due to new parameter in all provider interfaces methods.
+--------------------------------------------------------------------------------------------------------------------------
+Due to an additional parameters required in all methods of any provider style class you need to add a new parameter to all
+the methods that indicate a compile error. Please note only the additional parameter must be added to rectify the compile
+error. You wont't need to do anything else.
+
+Name & Type of Parameter: ResponseParameters customResponseParams
+
+Add the above to all methods that throw an error after the upgrade. For example the method 'retrieve()' in any of your
+classes that extend the BaseProvider or BaseEventProvider will change from:
+
+ public Object retrieve(SIFZone zone,
+ SIFContext context,
+ PagingInfo pagingInfo,
+ RequestMetadata metadata)
+ throws PersistenceException, UnsupportedQueryException, DataTooLargeException
+ {
+ ...
+ }
+
+to
+ public Object retrieve(SIFZone zone,
+ SIFContext context,
+ PagingInfo pagingInfo,
+ RequestMetadata metadata,
+ ResponseParameters customResponseParams) // <== NOTE NEW PARAMETER
+ throws PersistenceException, UnsupportedQueryException, DataTooLargeException
+ {
+ ...
+ }
+
+An identical change will be required to all methods from the QueryProvider and ChangesSinceProvider interfaces if your
+provider classes implement any of these two interfaces. If you wish to know more about this new parameter please refer
+to the Developer's Guide in the appropriate section where the methods are documented.
+
+==========================================================================================================================
+
+------------------------
+-- Data Model Upgrade --
+------------------------
+None.
+
+------------------------------
+-- 3rd Party Library Update --
+------------------------------
+None.
diff --git a/SIF3InfraREST/scripts/.gitignore b/SIF3InfraREST/scripts/.gitignore
deleted file mode 100644
index 7249e8ca..00000000
--- a/SIF3InfraREST/scripts/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/tomcat
diff --git a/SIF3InfraREST/sif3Common/.gitignore b/SIF3InfraREST/sif3Common/.gitignore
new file mode 100644
index 00000000..ea6ab823
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/.gitignore
@@ -0,0 +1,5 @@
+/target/
+/.settings/
+/.classpath
+/.project
+/bin/
diff --git a/SIF3InfraREST/sif3Common/pom.xml b/SIF3InfraREST/sif3Common/pom.xml
new file mode 100644
index 00000000..6bc97e5e
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/pom.xml
@@ -0,0 +1,214 @@
+
+ 4.0.0
+
+
+
+
+ sif3.framework
+ sif3-framework
+ 0.10.0-beta
+
+
+
+
+
+ sif3-common
+ jar
+ SIF3 Common
+
+
+
+
+
+
+
+ ${jarName.prefix}Common-${project.version}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jdbc
+ mysql-jdbc
+
+
+ jdbc
+ oracle-jdbc
+
+
+ jdbc
+ sqlite-jdbc
+
+
+
+
+
+
+ log4j
+ log4j
+
+
+
+
+
+
+ commons-codec
+ commons-codec
+ 1.9
+
+
+
+
+
+
+ javax.ws.rs
+ jsr311-api
+
+
+
+
+
+
+ com.sun.jersey
+ jersey-core
+ 1.19
+
+
+
+ com.sun.jersey
+ jersey-client
+ 1.19
+
+
+
+ com.sun.jersey
+ jersey-json
+ 1.19
+
+
+
+
+
+
+
+
+ org.hibernate.javax.persistence
+ hibernate-jpa-2.1-api
+ 1.0.0.Final
+
+
+
+ org.hibernate
+ hibernate-core
+ 4.3.10.Final
+
+
+
+ org.hibernate.common
+ hibernate-commons-annotations
+ 4.0.5.Final
+
+
+
+ org.hibernate
+ hibernate-c3p0
+ 4.3.10.Final
+
+
+
+
+
+
+ jdom
+ jdom
+ 1.0
+
+
+
+
+
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+ src/main/resources
+
+ **/*.java
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+
+
+
+
+
+
+ This project hold common code, interfaces etc. for the SIF3 Framework. It is not tied to any infrastructure implementation and therefore classes in this project can be used elsewhere (i.e. Data Model generator for the Local Data Model).
+
\ No newline at end of file
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/types/ByteArray.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/types/ByteArray.java
new file mode 100644
index 00000000..84a723d0
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/types/ByteArray.java
@@ -0,0 +1,139 @@
+/*
+ * ByteArray.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.types;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+/**
+ * This class encapsulates the byte[] type. It provides a few handy methods relating to a byte array type.
+ *
+ * @author Joerg Huber
+ *
+ */
+public class ByteArray
+{
+ private byte[] bytes = null;
+
+ public ByteArray(){}
+
+ /**
+ * Initialises the byte array based on the given string.
+ *
+ * @param value String to convert to byte array.
+ */
+ public ByteArray(String value)
+ {
+ getfromString(value);
+ }
+
+ public ByteArray(byte[] bytes)
+ {
+ this.bytes = bytes;
+ }
+
+
+ /**
+ * Initialises the byte array based on the given input stream.
+ *
+ * @param bais The byte array stream to be used.
+ *
+ * @throws IOException If there are any issues with the ByteArrayInputStream
+ */
+ public ByteArray(ByteArrayInputStream bais) throws IOException
+ {
+ getFromInputStream(bais);
+ }
+
+ public byte[] getBytes()
+ {
+ return bytes;
+ }
+
+ public void setBytes(byte[] bytes)
+ {
+ this.bytes = bytes;
+ }
+
+ public boolean isNull()
+ {
+ return bytes == null;
+ }
+
+ public int length()
+ {
+ return isNull() ? 0 : bytes.length;
+ }
+
+ /**
+ * Should only be used if one is sure that the byte array represents a string otherwise the behaviour is unknown.
+ */
+ public String toString()
+ {
+ return isNull() ? null : new String(bytes);
+ }
+
+ /**
+ * Assigns the given string to the byte array. If the string is null then null is assigned to the byte array.
+ *
+ * @param value String to assign to the byte array.
+ */
+ public void getfromString(String value)
+ {
+ bytes = (value == null) ? null : value.getBytes();
+ }
+
+ /**
+ * Return the byte array as an output stream. If the byte array is null then the returned output stream will hold
+ * no bytes
+ *
+ * @return See desc.
+ *
+ * @throws IOException If there are any issues with the ByteArrayOutputStream
+ */
+ public ByteArrayOutputStream getOutputStream() throws IOException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ if (!isNull())
+ {
+ baos.write(bytes);
+ }
+ return baos;
+ }
+
+ /**
+ * Reads the bytes form the given input stream into the byte array.
+ *
+ * @param bais
+ *
+ * @throws IOException If there are any issues with the ByteArrayInputStream
+ */
+ public void getFromInputStream(ByteArrayInputStream bais) throws IOException
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ byte[] buf = new byte[512];
+ int len;
+ while ((len = bais.read(buf)) > 0)
+ {
+ bos.write(buf, 0, len);
+ }
+ bytes = bos.toByteArray();
+ bos.close();
+ }
+
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/AdvancedProperties.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/AdvancedProperties.java
new file mode 100644
index 00000000..23e5e546
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/AdvancedProperties.java
@@ -0,0 +1,224 @@
+/*
+ * AdvancedProperties.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author Joerg Huber
+ *
+ */
+public class AdvancedProperties
+{
+ protected Logger logger = Logger.getLogger(getClass());
+
+ private String propFileNameFull = null;
+ private Properties props = null;
+
+ public AdvancedProperties(String fileNameWithoutExt)
+ {
+ propFileNameFull = fileNameWithoutExt + ".properties";
+ PropertyFileReader reader = new PropertyFileReader(fileNameWithoutExt);
+ props = reader.getProperties();
+ logger.debug("Loaded property file: "+getPropFileNameFull());
+ }
+
+ public String getPropFileNameFull()
+ {
+ return this.propFileNameFull;
+ }
+
+ public Properties getProperties()
+ {
+ return props;
+ }
+
+ public boolean isLoaded()
+ {
+ return props != null;
+ }
+
+ /*-----------------------------------------------------------*/
+ /*-- Handy and commonly used getter methods for properties --*/
+ /*-----------------------------------------------------------*/
+ /**
+ * Returns the given property as a boolean object. If it doesn't exist or is not a boolean then null is
+ * returned.
+ */
+ public Boolean getPropertyAsBool(String propertyName)
+ {
+ if (props != null)
+ {
+ String stringVal = props.getProperty(propertyName);
+ if (stringVal != null)
+ {
+ try
+ {
+ return Boolean.valueOf(stringVal.trim());
+ }
+ catch (Exception ex)
+ {}
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the given property as a boolean. If it doesn't exist or is not a boolean then the default
+ * value is returned.
+ */
+ public boolean getPropertyAsBool(String propertyName, boolean defaultValue)
+ {
+ Boolean bool = getPropertyAsBool(propertyName);
+ return (bool == null) ? defaultValue : bool.booleanValue();
+ }
+
+ /**
+ * This method attempts to return the property "mainPropertyName.subPropertyName". If it doesn't exist or is not
+ * set (null/empty) then an attempt is made to just read the "mainPropertyName". If that doesn't exist or is not
+ * set (null/empty) then the default value is returned.
+ *
+ * @param mainPropertyName
+ * @param subPropertyName
+ * @param defaultValue
+ *
+ * @return See desc.
+ */
+ public boolean getPropertyAsBool(String mainPropertyName, String subPropertyName, boolean defaultValue)
+ {
+ Boolean boolValue= getPropertyAsBool(mainPropertyName+"."+subPropertyName);
+ return (boolValue != null) ? boolValue : getPropertyAsBool(mainPropertyName, defaultValue);
+ }
+
+
+ /**
+ * Returns the given property as a Integer object. If it doesn't exist or is not an Integer then null is
+ * returned.
+ */
+ public Integer getPropertyAsInt(String propertyName)
+ {
+ if (props != null)
+ {
+ String stringVal = props.getProperty(propertyName);
+ if (stringVal != null)
+ {
+ try
+ {
+ return Integer.valueOf(stringVal.trim());
+ }
+ catch (Exception ex)
+ {}
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the given property as a int. If it doesn't exist or is not an Integer then the default value
+ * is returned.
+ */
+ public int getPropertyAsInt(String propertyName, int defaultValue)
+ {
+ Integer integer = getPropertyAsInt(propertyName);
+ return (integer == null) ? defaultValue : integer.intValue();
+ }
+
+ /**
+ * This method attempts to return the property "mainPropertyName.subPropertyName". If it doesn't exist or is not
+ * set (null/empty) then an attempt is made to just read the "mainPropertyName". If that doesn't exist or is not
+ * set (null/empty) then the default value is returned.
+ *
+ * @param mainPropertyName
+ * @param subPropertyName
+ * @param defaultValue
+ *
+ * @return See desc.
+ */
+ public int getPropertyAsInt(String mainPropertyName, String subPropertyName, int defaultValue)
+ {
+ Integer intValue= getPropertyAsInt(mainPropertyName+"."+subPropertyName);
+ return (intValue != null) ? intValue.intValue() : getPropertyAsInt(mainPropertyName, defaultValue);
+ }
+
+ /**
+ * Returns the given property as a String. If it doesn't exist or is empty then the default value is returned.
+ */
+ public String getPropertyAsString(String propertyName, String defaultValue)
+ {
+ if (props != null)
+ {
+ String value = props.getProperty(propertyName);
+ return (StringUtils.isEmpty(value) ? defaultValue : value);
+ }
+ return defaultValue;
+ }
+
+ /**
+ * This method attempts to return the property "mainPropertyName.subPropertyName". If it doesn't exist or is not
+ * set (null/empty) then an attempt is made to just read the "mainPropertyName". If that doesn't exist or is not
+ * set (null/empty) then the default value is returned.
+ *
+ * @param mainPropertyName
+ * @param subPropertyName
+ * @param defaultValue
+ *
+ * @return See desc.
+ */
+ public String getPropertyAsString(String mainPropertyName, String subPropertyName, String defaultValue)
+ {
+ String value= getPropertyAsString(mainPropertyName+"."+subPropertyName, null);
+ return (value != null) ? value : getPropertyAsString(mainPropertyName, defaultValue);
+ }
+
+ /**
+ * This method reads the given property and then attempts to split the value at the commas. This allows to read a comma separated
+ * property value. The result is returned as a List of Strings. If the property doesn't exist or there is no value defined then
+ * an empty list is returned.
+ *
+ * @param propertyName
+ *
+ * @return See desc.
+ */
+ public List getFromCommaSeparated(String propertyName)
+ {
+ List list = new ArrayList();
+ String classListStr = getPropertyAsString(propertyName, null);
+
+ if (classListStr != null)
+ {
+ String classNames[] = classListStr.split(",");
+ for (int i = 0; i < classNames.length; i++)
+ {
+ list.add(classNames[i].trim());
+ }
+ }
+
+ return list;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "AdvancedProperties [propFileNameFull=" + propFileNameFull + ", props=" + props + "]";
+ }
+
+
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/ArrayUtils.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/ArrayUtils.java
new file mode 100644
index 00000000..72cff332
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/ArrayUtils.java
@@ -0,0 +1,104 @@
+/*
+ * ArrayUtils.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @author Joerg Huber
+ */
+public class ArrayUtils
+{
+ /**
+ * This method adds the right collecteion at the end of the left collection. If one of the collections
+ * is null or empty then the other one is returned. If both are null or empty then a empty collection
+ * is returned. Basically 'null' will never be returned.
+ *
+ * @param left Collection
+ * @param right Collection
+ *
+ * @return See Description
+ */
+ public static Collection add(Collection left, Collection right)
+ {
+ if (left == null)
+ {
+ if (right == null)
+ {
+ return new ArrayList();
+ }
+
+ return right;
+ }
+
+ if (left.size() == 0)
+ {
+ return ((right == null) ? left : right);
+ }
+
+ if ((right == null) || (right.size() == 0))
+ {
+ return left;
+ }
+
+ // If we get here both collections hold some values.
+ left.addAll(right);
+
+ return left;
+ }
+
+ /**
+ * This method adds the right List at the end of the left List. If one of the Lists
+ * is null or empty then the other one is returned. If both are null or empty then a empty List
+ * is returned. Basically 'null' will never be returned.
+ *
+ * @param left List
+ * @param right List
+ *
+ * @return See Description
+ */
+ public static List add(List left, List right)
+ {
+ if (left == null)
+ {
+ if (right == null)
+ {
+ return new ArrayList();
+ }
+
+ return right;
+ }
+
+ if (left.size() == 0)
+ {
+ return ((right == null) ? left : right);
+ }
+
+ if ((right == null) || (right.size() == 0))
+ {
+ return left;
+ }
+
+ // If we get here both collections hold some values.
+ left.addAll(right);
+
+ return left;
+ }
+
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/DateUtils.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/DateUtils.java
new file mode 100644
index 00000000..ba8dab81
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/DateUtils.java
@@ -0,0 +1,394 @@
+/*
+ * DateUtils.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Joerg Huber
+ */
+public class DateUtils
+{
+ public static final long DAYS_PER_YEAR = 365;
+ public static final long HOURS_PER_DAY = 24;
+ public static final long MINUTES_PER_HOUR = 60;
+ public static final long SECONDS_PER_MINUTE = 60;
+ public static final long SECONDS_PER_HOUR = MINUTES_PER_HOUR * SECONDS_PER_MINUTE;
+ public static final long MILLI_SECOND = 1000;
+ public static final long MINUTE_IN_MILLI_SECOND = SECONDS_PER_MINUTE * MILLI_SECOND;
+ public static final long HOUR_IN_MILLI_SECOND = MINUTES_PER_HOUR * MINUTE_IN_MILLI_SECOND;
+ public static final long DAY_IN_MILLI_SECOND = HOURS_PER_DAY * HOUR_IN_MILLI_SECOND;
+ public static final long DAY_IN_SECONDS = HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE;
+ public static final long YEAR_IN_MILLI_SECOND = DAYS_PER_YEAR * DAY_IN_MILLI_SECOND;
+
+ /*
+ * The following thre date formatters represent date, time and date-time formats as
+ * used in the DB. They are often used for conversions from Date to String.
+ */
+ public static final SimpleDateFormat DB_DATE = new SimpleDateFormat("yyyyMMdd");
+ public static final SimpleDateFormat DB_TIME = new SimpleDateFormat("HHmmss");
+ public static final SimpleDateFormat DB_DATE_TIME = new SimpleDateFormat("yyyyMMddHHmmss");
+
+ public static final String DAYS = "DAYS";
+ public static final String HOURS = "HOURS";
+ public static final String MINUTES = "MINUTES";
+
+ /*
+ * A few formats that can be used to display dates to end users.
+ */
+ public static final SimpleDateFormat DISP_LONG_YEAR = new SimpleDateFormat("dd/MM/yyyy");
+ public static final SimpleDateFormat DISP_SHORT_YEAR = new SimpleDateFormat("dd/MM/yy");
+ public static final SimpleDateFormat DISP_LONG_MONTH = new SimpleDateFormat("dd MMMMMMMMM yyyy");
+ public static final SimpleDateFormat DISP_DATE_TIME_SEC = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
+ public static final SimpleDateFormat DISP_DATE_TIME_NO_SEC = new SimpleDateFormat("dd/MM/yyyy HH:mm");
+ public static final SimpleDateFormat DISP_DATE_TIME_NO_SEC_US = new SimpleDateFormat("MM/dd/yyyy HH:mm");
+ public static final SimpleDateFormat DISP_LONG_YEAR_US = new SimpleDateFormat("MM/dd/yyyy");
+ public static final SimpleDateFormat DISP_TIME_SEC = new SimpleDateFormat("HH:mm:ss");
+ public static final SimpleDateFormat DISP_TIME_NO_SEC = new SimpleDateFormat("HH:mm");
+
+ /*
+ * ISO Standards
+ */
+ public static final SimpleDateFormat ISO_8601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+ public static final SimpleDateFormat ISO_8601_SECFRACT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+
+ public static final String DATE_FORMAT_dd_SLASH_mm_SLASH_yyyy = "dd/MM/yyyy";
+ public static final String DATE_FORMAT_dd_DOT_mm_DOT_yyyy = "dd.MM.yyyy";
+ public static final String DATE_FORMAT_mm_SLAST_dd_SLASH_yyyy = "MM/dd/yyyy";
+ public static final String DATE_FORMAT_mm_DOT_dd_DOT_yyyy = "MM.dd.yyyy";
+ public static final String DATE_FORMAT_dd_mm_yyyy = "dd-MM-yyyy";
+ public static final String DATE_FORMAT_yyyy_mm_dd = "yyyy-MM-dd";
+ public static final String DATE_FORMAT_yyyy_mm_dd_HH_mm = "yyyy-MM-dd HH:mm";
+
+ /**
+ * Transforms the given string into a date. The string must follow the
+ * format as presented by the given format parameter. If the string has another
+ * format then ParseException is raised.
+ *
+ * @param strDate The string to convert to a date.
+ * @param format A SimpleDateFormat object that describes the strDate.
+ *
+ * @return The date corresponding to the given strDate or null
+ * if the strDate is null.
+ *
+ * @throws ParseException If the strDate doesn't match the format as defined
+ * by the 'format' parameter.
+ */
+ public static Date stringToDate(String strDate, DateFormat format)
+ throws ParseException
+ {
+ if (strDate == null) return null;
+
+ format.setLenient(false);
+ return format.parse(strDate);
+ }
+
+
+ /**
+ * Transforms the given string into a date. The string must follow the
+ * format as presented by the given format parameter. If the string has another
+ * format then ParseException is raised.
+ * This method is simply a convenience method.
+ *
+ * @param strDate The string to convert to a date.
+ * @param format A string that describes the strDate.
+ *
+ * @return Date
+ *
+ * @throws ParseException If the strDate doesn't match the format as defined
+ * by the 'format' parameter.
+ */
+ public static Date stringToDate(String strDate, String format) throws ParseException
+ {
+ return stringToDate(strDate, new SimpleDateFormat(format));
+ }
+
+
+ /**
+ * This method converts a date into a string according to a given format.
+ *
+ * @param date
+ * @param format
+ *
+ * @return String representation of the given date object or
+ * null if the date is null.
+ */
+ public static String dateToString(Date date, DateFormat format)
+ {
+ return (date==null ? null : format.format(date));
+ }
+
+
+ /**
+ * This method convers a date into a string according to a given format.
+ *
+ * @param date
+ * @param format
+ *
+ * @return String representation of the given date object.
+ */
+ public static String dateToString(Date date, String format)
+ {
+ return dateToString(date, new SimpleDateFormat(format));
+ }
+
+
+ /**
+ * Returns a date xxx milliseconds before the given date.
+ * @exception NullPointerException if the given date is null.
+ */
+ public static Date dateBefore(Date date, long milliSeconds)
+ {
+ Date theDate = new Date();
+ theDate.setTime(date.getTime() - milliSeconds);
+ return theDate;
+ }
+
+ /**
+ * Returns a date xxx milliseconds after the given date.
+ * @exception NullPointerException if the given date is null.
+ */
+ public static Date dateAfter(Date date, long milliSeconds)
+ {
+ Date theDate = new Date();
+ theDate.setTime(date.getTime() + milliSeconds);
+ return theDate;
+ }
+
+ /**
+ * Returns the difference in days between two calendars.
+ * @exception NullPointerException if any of the given Calendars is null.
+ */
+ public static int getDaysDiff(Calendar cal1, Calendar cal2)
+ {
+ // Get difference in milliseconds
+ long diffMillis = cal1.getTimeInMillis() - cal2.getTimeInMillis();
+ long diffDays = diffMillis / DAY_IN_MILLI_SECOND;
+
+ return (int)diffDays;
+
+ }
+
+ /**
+ * Returns the difference in seconds between two calendars.
+ * @exception NullPointerException if any of the given Calendars is null.
+ */
+ public static int getSecsDiff(Calendar cal1, Calendar cal2)
+ {
+ // Get difference in milliseconds
+ long diffMillis = cal1.getTimeInMillis() - cal2.getTimeInMillis();
+ long diffSecs = diffMillis / MILLI_SECOND;
+
+ return (int)diffSecs;
+
+ }
+
+ /**
+ * Returns the difference in seconds between two dates.
+ * @exception NullPointerException if any of the given date is null.
+ */
+ public static int getSecsDiff(Date d1, Date d2)
+ {
+ // Get difference in milliseconds
+ long diffMillis = d1.getTime() - d2.getTime();
+ long diffSecs = diffMillis / MILLI_SECOND;
+
+ return (int)diffSecs;
+
+ }
+
+ /**
+ * Returns the difference in hours, minutes and seconds between two dates.
+ * @exception NullPointerException if any of the given date is null.
+ */
+ public static Map getTimeDiff(Date d1, Date d2)
+ {
+ Map timeMap = new HashMap();
+ timeMap.put(DateUtils.DAYS, new Integer(0));
+ timeMap.put(DateUtils.HOURS, new Integer(0));
+ timeMap.put(DateUtils.MINUTES, new Integer(0));
+
+ int days = DateUtils.getNumberOfDaysDiff(d1, d2);
+ if(days < 1)
+ {
+ //Calculate no of hours
+ int sec = DateUtils.getSecsDiff(d2, d1);
+ int hours = Math.round(sec / (MINUTES_PER_HOUR * SECONDS_PER_MINUTE));
+ int minutes = Math.round(sec / (MINUTES_PER_HOUR));
+
+ if(hours < 1.0)
+ {
+
+ timeMap.put(DateUtils.MINUTES, new Integer(minutes));
+ }
+ else if(hours > 24.0)
+ {
+ timeMap.put(DateUtils.DAYS, new Integer(days));
+ }
+ else
+ {
+ timeMap.put(DateUtils.HOURS, new Integer(hours));
+ }
+ }
+ else
+ {
+ timeMap.put(DateUtils.DAYS, new Integer(days));
+ }
+ return timeMap;
+ }
+
+
+
+ /**
+ * Returns true if the given hours, when added to the current
+ * time, does not carry over to the next day; false otherwise.
+ */
+ public static boolean isEnoughHoursOfToday(int hours)
+ {
+ Date nowDate = new Date(System.currentTimeMillis());
+
+ Calendar sysTimeCalendar = new GregorianCalendar();
+ sysTimeCalendar.setTime(nowDate);
+
+ Calendar futureCalendar = new GregorianCalendar();
+ futureCalendar.setTime(nowDate);
+ futureCalendar.add(Calendar.HOUR_OF_DAY, hours);
+
+ if(sysTimeCalendar.get(Calendar.DATE) != futureCalendar.get(Calendar.DATE))
+ return false;
+ else
+ return true;
+ }
+
+ /**
+ * Returns a new date with added days
+ */
+ public static Date getDateWithAddedDays(Date date, int days)
+ {
+ Calendar futureCalendar = new GregorianCalendar();
+ futureCalendar.setTime(date);
+ futureCalendar.add(Calendar.DATE, days);
+ return futureCalendar.getTime();
+ }
+
+ /**
+ * Returns a new date with added hrs
+ */
+ public static Date getDateWithAddedHours(Date date, int hours)
+ {
+ Calendar futureCalendar = new GregorianCalendar();
+ futureCalendar.setTime(date);
+ futureCalendar.add(Calendar.HOUR, hours);
+ return futureCalendar.getTime();
+ }
+
+
+ /**
+ * Returns a new date with added minutes
+ */
+ public static Date getDateWithAddedMinutes(Date date, int minutes)
+ {
+ Calendar futureCalendar = new GregorianCalendar();
+ futureCalendar.setTime(date);
+ futureCalendar.add(Calendar.MINUTE, minutes);
+ return futureCalendar.getTime();
+ }
+
+ /**
+ * Returns a new date with subtracted minutes
+ */
+ public static Date getDateWithSubtractedMinutes(Date date, int minutes)
+ {
+ Calendar futureCalendar = new GregorianCalendar();
+ futureCalendar.setTime(date);
+ futureCalendar.add(Calendar.MINUTE, minutes * -1);
+ return futureCalendar.getTime();
+ }
+
+ /**
+ * Returns true if the given dates have the same day; false otherwise.
+ * @exception NullPointerException if any of the given Dates is null.
+ */
+ public static boolean isSameDay(Date date1, Date date2)
+ {
+ Calendar calendar1 = new GregorianCalendar();
+ calendar1.setTime(date1);
+
+ Calendar calendar2 = new GregorianCalendar();
+ calendar2.setTime(date2);
+
+ if(calendar1.get(Calendar.DATE) != calendar2.get(Calendar.DATE))
+ return false;
+ else
+ return true;
+ }
+
+ public static int getNumberOfDaysDiff(Date date1, Date date2)
+ {
+ Calendar calendar1 = new GregorianCalendar();
+ calendar1.setTime(date1);
+
+ Calendar calendar2 = new GregorianCalendar();
+ calendar2.setTime(date2);
+
+ int diff = calendar2.get(Calendar.DAY_OF_YEAR) - calendar1.get(Calendar.DAY_OF_YEAR);
+
+ return diff;
+ }
+
+ /**
+ * This method converts a UNIX Timstamp to a locallized Date object.
+ *
+ * @param gmtTstamp UNIX Timestamp (in seconds from Epoch).
+ * @return UNIX timestamp as a new Date in the local timezone
+ */
+ public static Date convertUnixTstampDate(long gmtTstamp)
+ {
+ return new Date(gmtTstamp * 1000);
+ }
+
+ public static String nowAsISO8601()
+ {
+ // TimeZone tz = TimeZone.getTimeZone("UTC");
+ //df.setTimeZone(tz);
+ return ISO_8601.format(new Date());
+ }
+
+ public static String getISO8601(Date date)
+ {
+ return ISO_8601.format(date);
+ }
+
+ public static String nowAsISO8601withSecFraction()
+ {
+ // TimeZone tz = TimeZone.getTimeZone("UTC");
+ //df.setTimeZone(tz);
+ return ISO_8601_SECFRACT.format(new Date());
+ }
+
+ public static String getISO8601withSecFraction(Date date)
+ {
+ return ISO_8601_SECFRACT.format(date);
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/FileReaderWriter.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/FileReaderWriter.java
new file mode 100644
index 00000000..4c705edd
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/FileReaderWriter.java
@@ -0,0 +1,205 @@
+/*
+ * FileReaderWriter.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+
+/**
+ * @author Joerg Huber
+ */
+public class FileReaderWriter
+{
+ /**
+ * This method opens the file given by its name and full path (ie: C:/temp/testFile.xml), reads its
+ * content, closes the file again and returns the content as String. It is therefore assumed that the
+ * file content is ASCII text otherwise the behaviour of this method is not defined. If the file
+ * doesn't exist (ie. file name wrong or path not there) then null is returned.
+ *
+ * @param fileNameInclFullPath File name with fully qualified path.
+ *
+ * @return See description.
+ */
+ public static String getFileContent(String fileNameInclFullPath)
+ {
+ try
+ {
+ return new String(getFileBytes(new File(fileNameInclFullPath)));
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * This method opens the file given by its name and full path (ie: C:/temp/testFile.xml), reads its
+ * content using the encoding given by the charsetName (i.e. UTF-8), closes the file again and returns
+ * the content as String. It is therefore assumed that the file content is ASCII text otherwise the behaviour
+ * of this method is not defined. If the file doesn't exist (ie. file name wrong or path not there) then null
+ * is returned.
+ *
+ * @param fileNameInclFullPath File name with fully qualified path.
+ * @param charsetName The name of a supported charset. The behaviour of this method is unspecified when the given
+ * file contains bytes that are not valid in the given charset. If this parameter is null then no
+ * encoding is applied.
+ *
+ * @return See description.
+ */
+ public static String getFileContent(String fileNameInclFullPath, String charsetName)
+ {
+ try
+ {
+ if (StringUtils.isEmpty(charsetName))
+ {
+ return new String(getFileBytes(new File(fileNameInclFullPath)));
+ }
+ else
+ {
+ return new String(getFileBytes(new File(fileNameInclFullPath)), charsetName);
+ }
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * This method writes the content to the file given by its name and fully qualified path
+ * (ie. C:/temp/testFile.xml). It is assumed that the path exists and that the file if it exists
+ * is closed otherwise false is returned. If the file doesn't exist then it will be created otherwise
+ * it will be overwritten (ie. not appended). If the file content is null then no action is taken.
+ *
+ * @param content Content to write into the file.
+ * @param fileNameInclFullPath Fully qualified path of the file to write to. If file doesn't exist it
+ * is created, otherwise it is overwritten.
+ *
+ * @return TRUE : All succeeded.
+ * FALSE: Something failed.
+ */
+ public static boolean writeContentToFile(String content, String fileNameInclFullPath)
+ {
+ try
+ {
+ if (content != null)
+ {
+ File file = createFile(fileNameInclFullPath, content.getBytes());
+ return file != null;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Returns a byte[]read from the given filename
+ * @param fileNameInclFullPath full path to file to read
+ * @return byte array containing file bytes. If there are any errors during processing then null is
+ * returned.
+ */
+ public static byte[] getFileBytes(String fileNameInclFullPath)
+ {
+ try
+ {
+ return getFileBytes(new File(fileNameInclFullPath));
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * Returns a byte[] read from the given file
+ * @param file file to read
+ * @return byte array containing file bytes. If there are any errors during processing then an
+ * exception is thrown.
+ */
+ public static byte[] getFileBytes(File file) throws Exception
+ {
+ byte[] buffer = null;
+ FileInputStream fis = null;
+ try
+ {
+ fis = new FileInputStream(file);
+ buffer = new byte[fis.available()];
+
+ fis.read(buffer);
+ fis.close();
+ }
+ catch (Exception ex)
+ {
+ try
+ {
+ fis.close();
+ }
+ catch (Exception innerex) {}
+
+ throw ex;
+ }
+ return buffer;
+ }
+
+ /**
+ * Creates a new file instance with the given path and filename and saves the given content to the
+ * file.
+ *
+ * @param fileNameInclFullPath Name of file to create. Can include path.
+ * @param content byte array containing the content to save in the file
+ *
+ * @return new file instance if successfully created and the given content was saved.
+ */
+ public static File createFile(String fileNameInclFullPath, byte[] content) throws Exception
+ {
+ if (null == fileNameInclFullPath || fileNameInclFullPath.equals(""))
+ {
+ throw new NullPointerException("Cannot create new file object. Filename is null!");
+ }
+ if (content == null)
+ {
+ throw new NullPointerException("File content is null!!");
+ }
+
+ FileOutputStream fos = null;
+ File newFile = null;
+ try
+ {
+ newFile = new File(fileNameInclFullPath);
+ fos = new FileOutputStream(newFile);
+ fos.write(content);
+ fos.flush();
+ fos.close();
+ }
+ finally
+ {
+ if (fos != null)
+ {
+ fos.close();
+ }
+ }
+
+ return newFile;
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/GUIDGenerator.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/GUIDGenerator.java
new file mode 100644
index 00000000..2274a59c
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/GUIDGenerator.java
@@ -0,0 +1,48 @@
+/*
+ * GUIDGenerator.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author Joerg Huber
+ */
+public class GUIDGenerator
+{
+ protected static final Logger logger = Logger.getLogger(GUIDGenerator.class);
+
+ /**
+ * Method to generate the random GUID that is 32 characters long made of HEX code and in upper case. It will follow the RFC4122 with
+ * the exception that the returned GUIDs have upper case only and the '-' removed.
+ */
+ public static String getRandomGUID()
+ {
+ return java.util.UUID.randomUUID().toString().replace("-", "").toUpperCase();
+ }
+
+ /*
+ * Demonstration and self test of class
+ */
+ public static void main(String args[])
+ {
+ for (int i = 0; i < 100; i++)
+ {
+ System.out.println("RandomGUID=" + GUIDGenerator.getRandomGUID());
+ }
+ }
+
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/GZIPUtil.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/GZIPUtil.java
new file mode 100644
index 00000000..253e51ac
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/GZIPUtil.java
@@ -0,0 +1,261 @@
+/*
+ * GZIPUtil.java
+ *
+ * Copyright 2015 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+import org.apache.log4j.Logger;
+
+import au.com.systemic.framework.types.ByteArray;
+
+/**
+ * This class contains a few utility methods to converts a String into a GZIP byte array and vice-versa.
+ *
+ * @author Joerg Huber
+ *
+ */
+public class GZIPUtil
+{
+ protected static final Logger logger = Logger.getLogger(GZIPUtil.class);
+
+ /**
+ * This method gzip the given string and returns the gzip as a byte array. If anything fails during the process then
+ * an IOException is thrown.
+ *
+ * @param input The string to gzip and convert to a byte array.
+ *
+ * @return The byte array of a the gzipped input string.
+ *
+ * @throws IOException Failure to gzip the given string.
+ */
+ public static byte[] gzipStringToBytes(String input) throws IOException
+ {
+ return gzipBytes(input.getBytes());
+ }
+
+ /**
+ * As above but the returned value is a ByteArray rather than byte[]. This might be a much more resource efficient
+ * way to pass around the ByteArray as a parameter to other methods than a native byte[].
+ *
+ * @param input The string to gzip and convert to a ByteArray.
+ *
+ * @return The ByteArray of a the gzipped input string.
+ *
+ * @throws IOException Failure to gzip the given string.
+ */
+ public static ByteArray gzipStringToByteArray(String input) throws IOException
+ {
+ return gzipByteArray(new ByteArray(input));
+ }
+
+
+ /**
+ * This method gzip the given byte[] and returns the gzip as a byte array. If anything fails during the process then
+ * an IOException is thrown.
+ *
+ * @param input The byte[] to gzip.
+ *
+ * @return The byte array of a the gzipped input byte[].
+ *
+ * @throws IOException Failure to gzip the given input.
+ */
+ public static byte[] gzipBytes(byte[] input) throws IOException
+ {
+ Timer timer = null;
+ try
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer = new Timer();
+ timer.start();
+ }
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ BufferedOutputStream bufos = new BufferedOutputStream(new GZIPOutputStream(bos));
+ bufos.write(input);
+ bufos.close();
+ byte[] retval = bos.toByteArray();
+ bos.close();
+ return retval;
+ }
+ finally
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer.finish();
+ logger.debug("Time taken GZIP Content: "+timer.timeTaken()+"ms");
+ }
+ }
+ }
+
+ /**
+ * As above but instead of dealing with byte[] the potential more resource friendly ByteArray type is used.
+ * If anything fails during the process then an IOException is thrown.
+ *
+ * @param input The ByteArray to gzip.
+ *
+ * @return The ByteArray of a the gzipped input ByteArray.
+ *
+ * @throws IOException Failure to gzip the given input.
+ */
+ public static ByteArray gzipByteArray(ByteArray input) throws IOException
+ {
+ Timer timer = null;
+ try
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer = new Timer();
+ timer.start();
+ }
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ BufferedOutputStream bufos = new BufferedOutputStream(new GZIPOutputStream(bos));
+ bufos.write(input.getBytes());
+ bufos.close();
+ ByteArray retval = new ByteArray(bos.toByteArray());
+ bos.close();
+ return retval;
+ }
+ finally
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer.finish();
+ logger.debug("Time taken GZIP Content: "+timer.timeTaken()+"ms");
+ }
+ }
+ }
+
+ /**
+ * This method takes a gzip byte array, unzips it then and converts it to a String. If anything fails during the
+ * process then an IOException is thrown.
+ *
+ * @param content The byte array that represents a gzipped string.
+ *
+ * @return The String derived from unzipping the given byte array.
+ *
+ * @throws IOException Failure to unzip the given byte array into a String.
+ */
+ public static String ungzipStringFromBytes(byte[] content) throws IOException
+ {
+ byte[] unzippedContent = ungzipFromBytes(content);
+ return (unzippedContent == null) ? null : new String(unzippedContent);
+ }
+
+ public static String ungzipStringFromByteArray(ByteArray content) throws IOException
+ {
+ ByteArray unzippedContent = ungzipFromByteArray(content);
+ return (unzippedContent == null) ? null : unzippedContent.toString();
+
+ }
+
+ /**
+ * This method takes a gzip byte array and unzips it. The unzipped content is then returned as a byte[].
+ * If anything fails during the process then an IOException is thrown.
+ *
+ * @param content The byte array that represents a gzipped content.
+ *
+ * @return The byte[] derived from unzipping the given byte array.
+ *
+ * @throws IOException Failure to unzip the given byte array.
+ */
+ public static byte[] ungzipFromBytes(byte[] content) throws IOException
+ {
+ Timer timer = null;
+ try
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer = new Timer();
+ timer.start();
+ }
+ ByteArrayInputStream bis = new ByteArrayInputStream(content);
+ BufferedInputStream bufis = new BufferedInputStream(new GZIPInputStream(bis));
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = bufis.read(buf)) > 0)
+ {
+ bos.write(buf, 0, len);
+ }
+ bis.close();
+ bufis.close();
+ bos.close();
+ return bos.toByteArray();
+ }
+ finally
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer.finish();
+ logger.debug("Time taken Un-GZIP Content: "+timer.timeTaken()+"ms");
+ }
+ }
+ }
+
+ /**
+ * As above but instead of dealing with byte[] the potential more resource friendly ByteArray type is used.
+ * If anything fails during the process then an IOException is thrown.
+ *
+ * @param content The ByteArray that represents a gzipped content.
+ *
+ * @return The ByteArray derived from unzipping the given ByteArray.
+ *
+ * @throws IOException Failure to unzip the given byte array.
+ */
+ public static ByteArray ungzipFromByteArray(ByteArray content) throws IOException
+ {
+ Timer timer = null;
+ try
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer = new Timer();
+ timer.start();
+ }
+ ByteArrayInputStream bis = new ByteArrayInputStream(content.getBytes());
+ BufferedInputStream bufis = new BufferedInputStream(new GZIPInputStream(bis));
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = bufis.read(buf)) > 0)
+ {
+ bos.write(buf, 0, len);
+ }
+ bis.close();
+ bufis.close();
+ bos.close();
+ return new ByteArray(bos.toByteArray());
+ }
+ finally
+ {
+ if (logger.isDebugEnabled())
+ {
+ timer.finish();
+ logger.debug("Time taken Un-GZIP Content: "+timer.timeTaken()+"ms");
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/PropertyFileReader.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/PropertyFileReader.java
new file mode 100644
index 00000000..8eba4cdd
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/PropertyFileReader.java
@@ -0,0 +1,64 @@
+/*
+ * PropertyFileReader.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author Joerg Huber
+ */
+public class PropertyFileReader
+{
+ protected final static Logger logger = Logger.getLogger(PropertyFileReader.class);
+
+ private String propFileNameFull = null;
+
+ public PropertyFileReader(String fileNameWithoutExt)
+ {
+ propFileNameFull = fileNameWithoutExt+".properties";
+ }
+
+ /**
+ * This method attempts to read a property file that must be stored somewhere within the classpath.
+ *
+ * @return The content of the property file in a Properties object. Null is returned if the file
+ * cannot be found or the file has an invalid content (eg. binary file insetead of ascii file).
+ */
+ public Properties getProperties()
+ {
+ Properties properties = null;
+ try
+ {
+ properties = new Properties();
+ properties.load(PropertyFileReader.class.getClassLoader().getResourceAsStream(propFileNameFull));
+ }
+ catch (IOException ex)
+ {
+ logger.error("Error reading content of file " + propFileNameFull + " .", ex);
+ properties = null;
+ }
+ catch (Exception ex)
+ {
+ logger.error("Error accessing " + propFileNameFull + " " + ex.getMessage(), ex);
+ properties = null;
+ }
+ return properties;
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/PropertyManager.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/PropertyManager.java
new file mode 100644
index 00000000..13561480
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/PropertyManager.java
@@ -0,0 +1,240 @@
+/*
+ * PropertyManager.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+/**
+ * This class allows to load any number of property files and keep their content in a singleton to avoid poroperty files to be read over
+ * and over again. Most of the time developers keep them in a singleton anyway but have to implement this themselves. This class provides
+ * a simple utility to access porperty files as singleton. When property files are loaded through this manager each property file must have
+ * a unique ID, through wich it will be accessed. See load() methods for details.
+ *
+ * @author Joerg Huber
+ */
+public class PropertyManager
+{
+ protected Logger logger = Logger.getLogger(getClass());
+
+ private HashMap properties = new HashMap();
+
+ private static PropertyManager instance = null;
+
+ public static PropertyManager getInstance()
+ {
+ if (instance == null){
+ instance = new PropertyManager();
+ }
+
+ return instance;
+ }
+
+ /**
+ * Will load the given porperty file and assign it the ID of the propertyID. After a successful loading the properties can be accessed
+ * using this ID. If there is already a property file loaded with that ID then no action is taken (i.e. It won't be loaded again) if
+ * forceReload=FALSE. If you wish to reload the properies again (i.e remove existing and relaod) then forceReload must be set to TRUE.
+ *
+ * @param fileNameWithoutExt
+ * @param propertyID
+ * @param forceReload
+ */
+ public void loadPropertyFile(String fileNameWithoutExt, String propertyID, boolean forceReload)
+ {
+ String id = getPropertID(fileNameWithoutExt, propertyID);
+ AdvancedProperties props = properties.get(id);
+ if (props == null) // new, so load it
+ {
+ loadProperties(fileNameWithoutExt, id);
+ }
+ else if (forceReload) // force a reload again
+ {
+ properties.remove(id);
+ loadProperties(fileNameWithoutExt, id);
+ }
+ }
+
+ /**
+ * Convenience method. It will call the loadPropertyFile(fileNameWithoutExt, null, false) which means the property ID will be the file name
+ * and if the properties for that file are already loaded it WON'T relaod it again.
+ *
+ * @param fileNameWithoutExt
+ */
+ public void loadPropertyFile(String fileNameWithoutExt)
+ {
+ loadPropertyFile(fileNameWithoutExt, null, false);
+ }
+
+ /*--------------------------------------------------------------------------------------------------------------------------------*/
+ /*-- This section needs to replicate the methods from the AdvancedProperies Class put add the parameter of the proprrty file ID --*/
+ /*--------------------------------------------------------------------------------------------------------------------------------*/
+ /**
+ * Can return null if no properties file with the given ID is loaded otherwise the properties are returned in form of an
+ * AddvancedProperties class.
+ */
+ public AdvancedProperties getProperties(String propFileID)
+ {
+ return properties.get(propFileID);
+ }
+
+ public boolean isLoaded(String propFileID)
+ {
+ return (properties.get(propFileID) != null) && (properties.get(propFileID).isLoaded());
+ }
+
+ /**
+ * Returns the given property as a boolean object. If it doesn't exist or is not a boolean then null is
+ * returned.
+ */
+ public Boolean getPropertyAsBool(String propFileID, String propertyName)
+ {
+ AdvancedProperties props = getProperties(propFileID);
+ if (props != null)
+ {
+ return props.getPropertyAsBool(propertyName);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the given property as a boolean. If it doesn't exist or is not a boolean then the default
+ * value is returned.
+ */
+ public boolean getPropertyAsBool(String propFileID, String propertyName, boolean defaultValue)
+ {
+ AdvancedProperties props = getProperties(propFileID);
+ if (props != null)
+ {
+ return props.getPropertyAsBool(propertyName, defaultValue);
+ }
+ else
+ {
+ return defaultValue;
+ }
+ }
+
+ /**
+ * Returns the given property as a Integer object. If it doesn't exist or is not an Integer then null is
+ * returned.
+ */
+ public Integer getPropertyAsInt(String propFileID, String propertyName)
+ {
+ AdvancedProperties props = getProperties(propFileID);
+ if (props != null)
+ {
+ return props.getPropertyAsInt(propertyName);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the given property as a int. If it doesn't exist or is not an Integer then the default value
+ * is returned.
+ */
+ public int getPropertyAsInt(String propFileID, String propertyName, int defaultValue)
+ {
+ AdvancedProperties props = getProperties(propFileID);
+ if (props != null)
+ {
+ return props.getPropertyAsInt(propertyName, defaultValue);
+ }
+ else
+ {
+ return defaultValue;
+ }
+ }
+
+ /**
+ * Returns the given property as a String. If it doesn't exist or is empty then the default value is returned.
+ */
+ public String getPropertyAsString(String propFileID, String propertyName, String defaultValue)
+ {
+ AdvancedProperties props = getProperties(propFileID);
+ if (props != null)
+ {
+ return props.getPropertyAsString(propertyName, defaultValue);
+ }
+ else
+ {
+ return defaultValue;
+ }
+ }
+
+ /**
+ * This method reads the given property and then attempts to split the value at the commas. This allows to read a comma separated
+ * property value. The result is returned as a List of Strings. If the property doesn't exist or there is no value defined then
+ * an empty list is returned.
+ *
+ * @param propertyName
+ *
+ * @return See desc.
+ */
+ public List getFromCommaSeparated(String propFileID, String propertyName)
+ {
+ AdvancedProperties props = getProperties(propFileID);
+ List list = new ArrayList();
+ if (props != null)
+ {
+ list = props.getFromCommaSeparated(propertyName);
+ }
+ return list;
+ }
+
+
+
+ @Override
+ public String toString()
+ {
+ return "PropertyManager [properties=" + properties + "]";
+ }
+
+ /*---------------------*/
+ /*-- Private Methods --*/
+ /*---------------------*/
+ private PropertyManager()
+ {
+ super();
+ }
+
+ private String getPropertID(String fileNameWithoutExt, String propertyID)
+ {
+ return ((StringUtils.isEmpty(propertyID)) ? fileNameWithoutExt : propertyID);
+ }
+
+ private void loadProperties(String fileNameWithoutExt, String id)
+ {
+ AdvancedProperties props = new AdvancedProperties(fileNameWithoutExt);
+ if (props.isLoaded())
+ {
+ properties.put(id, props);
+ }
+ else
+ {
+ logger.error("Failed to load property file with the name "+props.getPropFileNameFull()+" Ensure it exists and is on the classpath.");
+ }
+ }
+
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/StringUtils.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/StringUtils.java
new file mode 100644
index 00000000..96141f64
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/StringUtils.java
@@ -0,0 +1,521 @@
+/*
+ * StringUtils.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author Joerg Huber
+ */
+public class StringUtils
+{
+ private static final String htmlExpr = "?[a-zA-Z0-9]*>";
+
+
+ public static boolean isEmpty(String value)
+ {
+ return ((value == null) || (value.trim().length()==0));
+ }
+
+ public static boolean notEmpty(String value)
+ {
+ return ((value != null) && (value.trim().length()>0));
+ }
+
+ /**
+ * Joins a list using the specified delimiter
+ *
+ * @param list
+ * List
+ * @param delimiter
+ * String
+ * @return String
+ */
+ public static String join(List list, String delimiter)
+ {
+ StringBuffer buffer = new StringBuffer();
+ for (Iterator token = list.iterator(); token.hasNext();)
+ {
+ buffer.append(token.next());
+ if (token.hasNext())
+ {
+ buffer.append(delimiter);
+ }
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * Splits the specified string and saves it in a LIst rather than a String[] as the String.split() does.
+ * @param string String
+ * @param delimiter String
+ * @return List
+ */
+ public static List split(String string, String delimiter)
+ {
+ if (string == null || string.equals(""))
+ {
+ return new ArrayList();
+ }
+ return new ArrayList(Arrays.asList(string.split(delimiter)));
+ }
+
+
+ /**
+ * Splits the specified string on whitespaces
+ * @param string String
+ * @return List
+ */
+ public static List split(String string)
+ {
+ return new ArrayList(Arrays.asList(string.split("\\s")));
+ }
+
+ /**
+ * This method splits a string into its parts based on the delimiter. If strict is set
+ * to true then each delimiter indicates another token until the end of the string is
+ * reached. If strict is set to false than successive delimiters are treated as ONE and
+ * trailing delimiters are ignored.
+ * If the delimiter is null or empty then the original string is returned untouched and
+ * the length of the String[] is 1. If the origin string is null then null is returned.
+ * If the origin string is empty then the empty string is returned in the String[].
+ *
+ * Example: Original String: "this::is:a:test::"
+ * Delimiter: ":"
+ * Case A: strict=true => Result = {"this","","is","a","test","",""}
+ * Case B: strict=false => Result = {"this","is","a","test"}
+ *
+ * @param origin The string to be split.
+ * @param delimiter The delimiter
+ * @param strict See description
+ *
+ * @return String[] of Strings. Depending in the parameter 'strict' empty strings can
+ * be part of the array.
+ */
+ public static String[] splitter(String origin, String delimiter,
+ boolean strict)
+ {
+ if (origin == null)
+ {
+ return null;
+ }
+
+ if (origin.length() == 0)
+ {
+ String[] retArr = { "" };
+ return retArr;
+ }
+
+ if ((delimiter == null) || (delimiter.length() == 0))
+ {
+ String[] retArr = { origin };
+ return retArr;
+ }
+
+ if (strict)
+ {
+ return origin.split(delimiter, -1);
+ }
+ else
+ {
+ String[] retArr = origin.split(delimiter); // this may still have empty strings
+ ArrayList tmp = new ArrayList();
+ for (int i = 0; i < retArr.length; i++)
+ {
+ if (retArr[i].length() > 0) // only collect strings that are not empty
+ {
+ tmp.add(retArr[i]);
+ }
+ }
+ // Now rebuild new string array
+ retArr = new String[tmp.size()];
+
+ return (String[]) (tmp.toArray(retArr));
+ }
+ }
+
+ /**
+ * Split the given string based on the node name. This is an XML split, meaning the nodeName must be a value of
+ * an XML node without the '<' and '>' characters.
+ * Example:
+ * ValueToSplit:
+ *
+ * 14M
+ *
+ *
+ * UY7
+ *
+ * NodeName: abc
+ * Result:
+ * List[0] =
+ * 14M
+ *
+ * List[1] =
+ * UY7
+ *
+ *
+ * @param nodeName
+ * @return See desc.
+ */
+ public static List splitXML(String valueToSplit, String nodeName)
+ {
+ String expr = ""+nodeName+">";
+ String xmlValueArray[] = valueToSplit.split(expr);
+ List xmlValueList = new ArrayList();
+
+ for (String xmlValue : xmlValueArray)
+ {
+ xmlValueList.add(xmlValue+expr);
+ }
+
+ return xmlValueList;
+ }
+
+ public static String rpad(String s, int len, char padChar)
+ {
+ if (s == null)
+ {
+ s = "";
+ }
+ // create a buffer that's already the right length (instead of dynamically extending the buffer.
+ int nspaces = len - s.length();
+ if (nspaces <= 0)
+ {
+ return s; // String already at max length, no room to pad
+ }
+ char ca[] = new char[nspaces];
+
+ // operations on primitives are faster than StringBuffer.append(...). plus you lose the method call,
+ // and StringBuffer.append(...) calls more methods internally.
+ for (int ctr = 0; ctr < nspaces; ctr++)
+ {
+ ca[ctr] = padChar;
+
+ }
+ String ret = s + (new String(ca));
+
+ return ret;
+ }
+
+ public static String lpad(String s, int len, char padChar)
+ {
+ if (s == null)
+ {
+ s = "";
+ }
+ // create a buffer that's already the right length (instead of dynamically extending the buffer.
+ int nspaces = len - s.length();
+ if (nspaces <= 0)
+ {
+ return s; // String already at max length, no room to pad
+ }
+ char ca[] = new char[nspaces];
+
+ // operations on primitives are faster than StringBuffer.append(...). plus you lose the method call,
+ // and StringBuffer.append(...) calls more methods internally.
+ for (int ctr = 0; ctr < nspaces; ctr++)
+ {
+ ca[ctr] = padChar;
+
+ }
+ String ret = (new String(ca)) + s;
+
+ return ret;
+ }
+
+ /**
+ * Replace all occurences of 'key' in source with value
+ *
+ * @return String
+ */
+ public static String replaceAll(String source, String key, String value)
+ {
+ StringBuffer result = new StringBuffer(source);
+ for (int idx = result.indexOf(key); idx >= 0;)
+ {
+ result.replace(idx, idx + key.length(), value);
+ idx = result.indexOf(key, idx - key.length() + value.length());
+ }
+ return result.toString();
+ }
+
+ /**
+ * Replace all occurences of 'key' in source with value. Will not be case
+ * sensitive if caseSensitive = false.
+ *
+ * @return String
+ */
+ public static String replaceAllCaseSensitive(String source, String key,
+ String value, boolean caseSensitive)
+ {
+ StringBuffer result = new StringBuffer(source);
+ if (caseSensitive)
+ {
+ return replaceAll(source, key, value);
+ }
+ else
+ {
+ for (int idx = source.toLowerCase().indexOf(key.toLowerCase()); idx >= 0;)
+ {
+ result.replace(idx, idx + key.length(), value);
+ idx = result.indexOf(key, idx - key.length() + value.length());
+ }
+ }
+ return result.toString();
+ }
+
+ /**
+ * Make the given string printable by removing all of the control characters that may be in it.
+ *
+ * @param str The input string.
+ *
+ * @return The same string but with any character, c, removed where Character.isISOControl(c) is true.
+ */
+ public static String makePrintable(String str)
+ {
+ StringBuffer result = new StringBuffer(str);
+ for (int i = result.length() - 1; i >= 0; i--)
+ {
+ if (Character.isISOControl(result.charAt(i)))
+ {
+ result.deleteCharAt(i);
+ }
+ }
+
+ return result.toString();
+ }
+
+ /**
+ * This method escapes all characters outside the ASCII(32) - ASCII(127) range with
+ * the ';' sequence so that it can be used in XML documents. In addition the
+ * '&' (ASCII(38)) character is replaced with '&'.
+ *
+ * @param text The text to escape
+ *
+ * @return The escaped string.
+ */
+ public static String escapeToUTF8(String text)
+ {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < text.length(); i++)
+ {
+ char c = text.charAt(i);
+ if ((c < 32) || (c > 127))
+ {
+ sb.append("" + Integer.toHexString(c) + ";");
+ }
+ else if (c == 38) // '&'
+ {
+ sb.append("&");
+ }
+ else
+ {
+ sb.append(c);
+ }
+ }
+
+ return sb.toString();
+ }
+
+ /**
+ * Encoding a text. All chars except (a..z,A..Z,0..9) becomes changed to nnn; example: # -> #
+ *
+ *@param text To be encoded
+ *@param nbsp blank to be encoded
+ *@return The encoded text
+ */
+ public static String encodeText(String text, boolean nbsp)
+ {
+ int i = 0;
+ int j = 0;
+ int l = text.length();
+ StringBuffer sb = new StringBuffer();
+ while (j < l)
+ {
+ char c = text.charAt(j);
+ if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == ' ' && !nbsp))
+ {
+ j++;
+ if (j == l)
+ {
+ sb.append(text.substring(i, j));
+ }
+ continue;
+ }
+
+ if (i < j)
+ {
+ sb.append(text.substring(i, j));
+ }
+
+ if (c == ' ' && nbsp)
+ {
+ sb.append(" ");
+ }
+ else if (c == '-')
+ {
+ sb.append("-");
+ }
+ else if (c == '\n')
+ {
+ sb.append("
");
+ }
+ else
+ {
+ sb.append("").append((int) c).append(";");
+ }
+ j++;
+ i = j;
+ }
+
+ return sb.toString();
+ }
+
+
+ /**
+ * Encoding a text. All chars except (a..z,A..Z,0..9) becomes changed to nnn; example: # -> #
+ *
+ *@param text To be encoded
+ *@param nbsp blank to be encoded
+ *@param pageBreak pagebreak to be encoded
+ *@return The encoded text
+ */
+ public static String encodeText(String text, boolean nbsp, boolean pageBreak)
+ {
+ int i = 0;
+ int j = 0;
+ int l = text.length();
+ StringBuffer sb = new StringBuffer();
+ while (j < l)
+ {
+ char c = text.charAt(j);
+ if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z')
+ || (c >= 'A' && c <= 'Z'))
+ {
+ j++;
+ if (j == l)
+ {
+ sb.append(text.substring(i, j));
+ }
+ continue;
+ }
+ if (i < j)
+ {
+ sb.append(text.substring(i, j));
+ }
+ if (c == ' ' && nbsp)
+ {
+ sb.append(" ");
+ }
+ else if (c == ' ' && !nbsp)
+ {
+ sb.append(" ");
+ }
+ else if (c == '-')
+ {
+ sb.append("-");
+ }
+ else if (c == '\n' && pageBreak)
+ {
+ sb.append("
");
+ }
+ else if (c == '\n' && !pageBreak)
+ {
+ // no pagebreak, just blank
+ }
+ else
+ {
+ sb.append("").append((int) c).append(";");
+ }
+ j++;
+ i = j;
+ }
+
+ return sb.toString();
+ }
+
+ /**
+ * This method removes all HTML, XML or any other tags that have the and
+ * structure from the given string. It is assumed that the input
+ * parameter is not null.
+ *
+ * @param original
+ * The string from which the tags shall be removed. It is assumed
+ * that this value is not null.
+ *
+ * @return Original string without tags.
+ */
+ public static String removeHTMLTags(String original)
+ {
+ return original.replaceAll(htmlExpr, "");
+ }
+
+ /**
+ * Converts a string representing a boolean to a boolean value. If the string
+ * is empty or null then false is returned otherwise the following values will
+ * return true: - Any combination of upper and lower case of the word 'true'
+ * (ie. True, true, TRUE, TrUe etc.) - The letter 'T' or 't' - Any combination
+ * of upper and lower case of the word 'yes' (ie. Yes, yes, yEs etc.) - The
+ * letter 'Y' or 'y' - The digit 1 Everything else will return false.
+ *
+ * @param booleanString The value as a String that represents the boolean.
+ * @return See description.
+ */
+ public static boolean toBoolean(String booleanString)
+ {
+ if (isEmpty(booleanString))
+ {
+ return false;
+ }
+ booleanString = booleanString.toUpperCase();
+ if (booleanString.equals("TRUE"))
+ {
+ return true;
+ }
+ if (booleanString.equals("T"))
+ {
+ return true;
+ }
+ if (booleanString.equals("YES"))
+ {
+ return true;
+ }
+ if (booleanString.equals("Y"))
+ {
+ return true;
+ }
+ if (booleanString.equals("1"))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ public static String exceptionToString(Throwable ex)
+ {
+ StringWriter sw = new StringWriter();
+ ex.printStackTrace(new PrintWriter(sw));
+
+ return sw.toString();
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/Timer.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/Timer.java
new file mode 100644
index 00000000..4a0ae59c
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/Timer.java
@@ -0,0 +1,79 @@
+/*
+ * Timer.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.util.Date;
+
+/**
+ * @author Joerg Huber
+ *
+ */
+
+public class Timer
+{
+ private long startTime = -1;
+ private long endTime = -1;
+
+ /**
+ * Starts the timer
+ */
+ public void start()
+ {
+ Date startDate = new Date();
+ startTime = startDate.getTime();
+ }
+
+ /**
+ * Stops the timer
+ */
+ public void finish()
+ {
+ Date endDate = new Date();
+ endTime = endDate.getTime();
+ }
+
+ /**
+ * Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT when start() was called last.
+ *
+ * @return see description
+ */
+ public long getStartTime()
+ {
+ return startTime;
+ }
+
+ /**
+ * Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT when finish() was called last.
+ *
+ * @return see description
+ */
+ public long getFinishTime()
+ {
+ return endTime;
+ }
+
+ /**
+ * Returns the number of milliseconds passed between the last call of start() and finish().
+ *
+ * @return see desc.
+ */
+ public long timeTaken()
+ {
+ return endTime - startTime;
+ }
+
+}
diff --git a/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/XMLUtils.java b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/XMLUtils.java
new file mode 100644
index 00000000..b5b869bd
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/au/com/systemic/framework/utils/XMLUtils.java
@@ -0,0 +1,396 @@
+/*
+ * XMLDecoder.java
+ *
+ * Copyright 2003-2014 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package au.com.systemic.framework.utils;
+
+import java.beans.XMLDecoder;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringReader;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.log4j.Logger;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.DOMBuilder;
+import org.jdom.input.SAXBuilder;
+import org.jdom.output.DOMOutputter;
+import org.jdom.output.Format;
+import org.jdom.output.XMLOutputter;
+import org.jdom.xpath.XPath;
+import org.xml.sax.InputSource;
+
+/**
+ * @author Joerg Huber
+ */
+public class XMLUtils
+{
+ protected static org.w3c.dom.Document tmpDocument = null;
+ protected static org.w3c.dom.DocumentFragment tmpFragment = null;
+ protected static int tmpNameCounter = 0;
+
+ protected final static Logger logger = Logger.getLogger(XMLUtils.class);
+
+ private static final XMLOutputter prettyXML = new XMLOutputter(Format.getPrettyFormat());
+ private static final XMLOutputter compactXML = new XMLOutputter(Format.getCompactFormat());
+
+ public static String createXMLString(Element item)
+ {
+ return createXMLString(item, true);
+ }
+
+ public static String createXMLString(Element item, boolean pretty)
+ {
+ XMLOutputter out = pretty ? prettyXML : compactXML;
+ return out.outputString(item);
+ }
+
+ /**
+ * Loads the given XML string into a DOM Document. If the string isn't a valid XML document then null
+ * is returned.
+ *
+ * @return A xml Document that can be parsed afterwards. Null is returned if the string contains
+ * incorrect data (no XML).
+ */
+ public static Document loadXMLDocument(String xmlString)
+ {
+ Document document = null;
+ StringReader in = new StringReader(xmlString);
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(xmlString.getBytes());
+
+ try
+ {
+ document = new SAXBuilder().build(bais);
+ }
+ catch (JDOMException e)
+ {
+ document = null;
+ logger.error("Cannot parse XML string " + xmlString, e);
+ }
+ catch (Exception e)
+ {
+ document = null;
+ logger.error("Problem reading XML string " + xmlString, e);
+ }
+
+ // Ensure that all resources are closed at all time.
+ finally
+ {
+ in.close();
+ }
+ return document;
+ }
+
+ /**
+ * Load an XML Document
+ *
+ * @param fileName Filename of the XML document to be loaded and returned.
+ *
+ * @return Document or null on error (written to error log)
+ */
+ public static Document load(String fileName)
+ {
+ Document document = null;
+ InputStream inputStream = null;
+
+ try
+ {
+ inputStream = XMLUtils.class.getClassLoader().getResourceAsStream(
+ fileName);
+ document = new SAXBuilder().build(inputStream);
+ }
+ catch (FileNotFoundException ex)
+ {
+ logger.error("Caught IOException", ex);
+ }
+ catch (IOException ex)
+ {
+ logger.error("Caught IOException", ex);
+ }
+ catch (JDOMException ex)
+ {
+ logger.error("Caught JDOMException", ex);
+ }
+
+ try
+ {
+ if (inputStream != null)
+ {
+ inputStream.close();
+ }
+ }
+ catch (IOException ex1)
+ {}
+
+ return document;
+ }
+
+ /**
+ * Load an XML Document
+ *
+ * @param resource Name of the resource (XML file name).
+ * @param clazz Class to be used for retrieving a class loader to load the CML document.
+ * @return Document or null on error (written to error log)
+ */
+ @SuppressWarnings("rawtypes")
+ public static Document load(String resource, Class clazz)
+ {
+ Document document = null;
+ InputSource inputSource = getInputSource(resource, clazz);
+ try
+ {
+ document = new SAXBuilder().build(inputSource);
+ }
+ catch (IOException ex)
+ {
+ logger.error("Caught IOException", ex);
+ }
+ catch (JDOMException ex)
+ {
+ logger.error("Caught JDOMException", ex);
+ }
+ catch (Exception ex)
+ {
+ logger.error("Caught Exception", ex);
+ }
+
+ return document;
+ }
+
+ /**
+ * Save an XML Document
+ *
+ * @param document Document to save.
+ * @param file Name of file where document is saved to.
+ */
+ public static void save(Document document, String file)
+ {
+ try
+ {
+ OutputStream out = new FileOutputStream(file);
+ new XMLOutputter().output(document, out);
+ }
+ catch (FileNotFoundException ex)
+ {
+ logger.error("Caught FileNotFoundException", ex);
+ }
+ catch (IOException ex)
+ {
+ logger.error("Caught IOException", ex);
+ }
+ }
+
+ /**
+ * Convert a JDOM Document to a DOM Document
+ *
+ * @param node The JDOM document for whic a DOM Document shall be created.
+ *
+ * @return Document or null on error (written to error log)
+ */
+ public static org.w3c.dom.Document toDOM(Document node)
+ {
+ try
+ {
+ return new DOMOutputter().output(node);
+ }
+ catch (JDOMException ex)
+ {
+ logger.error("Caught JDOMException", ex);
+ return null;
+ }
+ }
+
+ /**
+ * Convert a DOM Document to a JDOM Document
+ *
+ * @param node The DOM document for whic a JDOM Document shall be created.
+ *
+ * @return Document or null on error (written to error log)
+ */
+ public static Document toJDOM(org.w3c.dom.Document node)
+ {
+ return new DOMBuilder().build(node);
+ }
+
+ /**
+ * Convert a DOM Element to a JDOM Element
+ *
+ * @param node Document
+ * @return Element or null on error (written to error log)
+ */
+ public static Element toJDOM(org.w3c.dom.Element node)
+ {
+ return new DOMBuilder().build(node);
+ }
+
+ /**
+ * Build a JAVA Object from an XML definition refer to java.xml.XMLDecoder for somem ore details.
+ *
+ * @param xml the Document for which the Java Class shall be built.
+ *
+ * @return the object created or null on error (written to error log)
+ */
+ @SuppressWarnings("resource")
+ public static Object readXMLObject(Document xml)
+ {
+ try
+ {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ new XMLOutputter().output(xml, out);
+ XMLDecoder fromXml = new XMLDecoder(new ByteArrayInputStream(out.toByteArray()));
+ return fromXml.readObject();
+ }
+ catch (IOException ex)
+ {
+ logger.error("Caught IOException", ex);
+ return null;
+ }
+ }
+
+ @SuppressWarnings("rawtypes")
+ private static InputSource getInputSource(String resource, Class clazz)
+ {
+ // load the file using class resource loader
+ return new InputSource(clazz.getResourceAsStream(resource));
+ }
+
+ /**
+ * Returns a w3c DOM builder.
+ *
+ * @return A default DOM Bulder Object.
+ * @throws Exception
+ */
+ public static synchronized DocumentBuilder getDomBuilder() throws Exception
+ {
+ DocumentBuilder db = null;
+ try
+ {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ db = dbf.newDocumentBuilder();
+ }
+ catch (Exception e)
+ {
+ throw new Exception("Problem parsing the file.");
+ }
+ return db;
+
+ }
+
+ /**
+ * Returns a temporary w3c Document.
+ *
+ * @return A blank default DOM Documment.
+ */
+ public static synchronized org.w3c.dom.Document getTemporaryDocument()
+ {
+ try
+ {
+ if (tmpDocument == null)
+ {
+ tmpDocument = getDomBuilder().newDocument();
+ }
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ return tmpDocument;
+ }
+
+ /**
+ * Returns a blank temporary DOM Node.
+ *
+ * @return See Description.
+ */
+ public static synchronized org.w3c.dom.Node createTemporaryDomNode()
+ {
+ String tmpName = "_" + tmpNameCounter++;
+ if (tmpFragment == null)
+ {
+ tmpFragment = getTemporaryDocument().createDocumentFragment();
+ tmpDocument.appendChild(tmpFragment);
+ }
+ org.w3c.dom.Node node = getTemporaryDocument().createElement(tmpName);
+ tmpFragment.appendChild(node);
+ return node;
+ }
+
+ /**
+ * Helper function to avoid "JDOM Can't Have a Null Value Exception"
+ *
+ * @param el Element
+ * @param attr String
+ * @param value String
+ */
+ public static void setAttribute(Element el, String attr, String value)
+ {
+ if (el != null && attr != null && value != null && !value.equals(""))
+ {
+ el.setAttribute(attr, value);
+ }
+
+ }
+
+ /**
+ * get the full name of an element
+ *
+ * @param el
+ * Element
+ * @return String
+ */
+ public static String getFullName(Element el)
+ {
+ StringBuffer sb = new StringBuffer();
+ buildFullName(el, sb);
+ return sb.toString();
+ }
+
+ private static void buildFullName(Element el, StringBuffer sb)
+ {
+ if (!el.isRootElement())
+ {
+ buildFullName((Element) el.getParent(), sb);
+ sb.append(".");
+ }
+ sb.append(el.getName());
+ }
+
+ /**
+ * Find a jdom element by xpath e.g. "/OnixMessage/Product"
+ *
+ * @param document
+ * @param xpath
+ * @return The Element in the dom tree that matches the xpath.
+ * @throws JDOMException
+ */
+ public static Element findUsingXPath(Document document, String xpath)
+ throws JDOMException
+ {
+ XPath xPath = XPath.newInstance(xpath);
+ Element selectedElement = (Element) xPath.selectSingleNode(document);
+ return selectedElement;
+ }
+
+}
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/CommonConstants.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/CommonConstants.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/CommonConstants.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/CommonConstants.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/conversion/MarshalFactory.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/MarshalFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/conversion/MarshalFactory.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/MarshalFactory.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/conversion/MediaTypeOperations.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/MediaTypeOperations.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/conversion/MediaTypeOperations.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/MediaTypeOperations.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/conversion/ModelObjectInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/ModelObjectInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/conversion/ModelObjectInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/ModelObjectInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/conversion/UnmarshalFactory.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/UnmarshalFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/conversion/UnmarshalFactory.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/conversion/UnmarshalFactory.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/exception/DataTooLargeException.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/DataTooLargeException.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/exception/DataTooLargeException.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/DataTooLargeException.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/exception/MarshalException.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/MarshalException.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/exception/MarshalException.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/MarshalException.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/exception/PersistenceException.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/PersistenceException.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/exception/PersistenceException.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/PersistenceException.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/exception/ServiceInvokationException.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/ServiceInvokationException.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/exception/ServiceInvokationException.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/ServiceInvokationException.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/exception/UnmarshalException.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/UnmarshalException.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/exception/UnmarshalException.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/UnmarshalException.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/exception/UnsupportedMediaTypeExcpetion.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/UnsupportedMediaTypeExcpetion.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/exception/UnsupportedMediaTypeExcpetion.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/UnsupportedMediaTypeExcpetion.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/exception/UnsupportedQueryException.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/UnsupportedQueryException.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/exception/UnsupportedQueryException.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/exception/UnsupportedQueryException.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/header/HeaderProperties.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/HeaderProperties.java
similarity index 95%
rename from SIF3InfraREST/sif3Common/src/sif3/common/header/HeaderProperties.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/HeaderProperties.java
index 2ca9699f..78001e73 100644
--- a/SIF3InfraREST/sif3Common/src/sif3/common/header/HeaderProperties.java
+++ b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/HeaderProperties.java
@@ -67,7 +67,7 @@ public void setHeaderProperty(String hdrPropertyName, String hdrPropertyValue)
}
/**
- * Stores all values of the hashmap.
+ * Stores all values of the hashmap. It will fully replace the existing header properties.
*
* @param hdrProperties Hashmap with the KEY=Property Name; VALUE=Property Value
*/
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/header/HeaderValues.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/HeaderValues.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/header/HeaderValues.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/HeaderValues.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/header/RequestHeaderConstants.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/RequestHeaderConstants.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/header/RequestHeaderConstants.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/RequestHeaderConstants.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/header/ResponseHeaderConstants.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/ResponseHeaderConstants.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/header/ResponseHeaderConstants.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/header/ResponseHeaderConstants.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/Auditor.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/Auditor.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/Auditor.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/Auditor.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/ChangesSinceProvider.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/ChangesSinceProvider.java
similarity index 84%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/ChangesSinceProvider.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/ChangesSinceProvider.java
index 00ecc38b..a4731d00 100644
--- a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/ChangesSinceProvider.java
+++ b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/ChangesSinceProvider.java
@@ -23,6 +23,7 @@
import sif3.common.model.ChangedSinceInfo;
import sif3.common.model.PagingInfo;
import sif3.common.model.RequestMetadata;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFZone;
@@ -79,6 +80,10 @@ public interface ChangesSinceProvider
* @param changedSinceInfo Data required to determine the changes to be returned. This must hold the opaque changes since value that was
* given to the consumer at some stage via the getLatestOpaqueMarker() method of this class.
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @throws UnsupportedQueryException The query provided with this request is not supported. This would be returned if this method is called
* without a value (null or empty) for the changedSinceInfo.changesSinceMarker.
@@ -86,6 +91,11 @@ public interface ChangesSinceProvider
* message of the exceptions holds some info.
* @throws DataTooLargeException If the data that shall be returned is too large due to the values in the paging info.
*/
- public Object getChangesSince(SIFZone zone, SIFContext context, PagingInfo pagingInfo, ChangedSinceInfo changedSinceInfo, RequestMetadata metadata) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
+ public Object getChangesSince(SIFZone zone,
+ SIFContext context,
+ PagingInfo pagingInfo,
+ ChangedSinceInfo changedSinceInfo,
+ RequestMetadata metadata,
+ ResponseParameters customResponseParams) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
}
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/Consumer.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/Consumer.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/Consumer.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/Consumer.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/DataModelLink.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/DataModelLink.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/DataModelLink.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/DataModelLink.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/DelayedConsumer.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/DelayedConsumer.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/DelayedConsumer.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/DelayedConsumer.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/EventConsumer.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/EventConsumer.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/EventConsumer.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/EventConsumer.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/EventProvider.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/EventProvider.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/EventProvider.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/EventProvider.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/HibernateProperties.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/HibernateProperties.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/HibernateProperties.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/HibernateProperties.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/Provider.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/Provider.java
similarity index 71%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/Provider.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/Provider.java
index 914a1f26..cf864f7a 100644
--- a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/Provider.java
+++ b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/Provider.java
@@ -26,6 +26,7 @@
import sif3.common.header.HeaderProperties;
import sif3.common.model.PagingInfo;
import sif3.common.model.RequestMetadata;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFZone;
import sif3.common.ws.CreateOperationStatus;
@@ -62,6 +63,10 @@ public interface Provider extends DataModelLink
* @param zone Can be Null (default Zone)
* @param context Can be Null (default Context)
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return The entity for this resourceID. Null if entity with given resourceID does not exist.
*
@@ -69,7 +74,7 @@ public interface Provider extends DataModelLink
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
*/
- public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException;
+ public Object retrievByPrimaryKey(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException;
/**
* This method creates the given object with the data provided in the given zone and context. If the object cannot be created then either
@@ -81,14 +86,18 @@ public interface Provider extends DataModelLink
* @param zone The Zone from which the request is being issued. Can be Null (default Zone)
* @param context The Context for which the object shall be created. Can be Null (default Zone)
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
- *
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
+ *
* @return The object that is created. It may hold additional data than the one provided.
*
* @throws IllegalArgumentException One of the parameters is invalid.
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
*/
- public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException;
+ public Object createSingle(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException;
/**
* This method updates the object given by its resourceID in the given zone for the given context.
@@ -99,6 +108,10 @@ public interface Provider extends DataModelLink
* @param zone The Zone from which the request is being issued. Can be Null (default Zone)
* @param context The Context for which the object shall be updated. Can be Null (default Zone)
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return TRUE: Entity is updated. FALSE: Entity does not exist.
*
@@ -106,7 +119,7 @@ public interface Provider extends DataModelLink
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
*/
- public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException;
+ public boolean updateSingle(Object data, String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException;
/**
* Removed the object with the given resourceId in the given zone for the given context.
@@ -115,6 +128,10 @@ public interface Provider extends DataModelLink
* @param zone The Zone from which the request is being issued. Can be Null (default Zone)
* @param context The Context for which the object shall be removed. Can be Null (default Zone)
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return TRUE: Entity is removed. FALSE: Entity does not exist.
*
@@ -122,7 +139,7 @@ public interface Provider extends DataModelLink
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
*/
- public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException;
+ public boolean deleteSingle(String resourceID, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException;
/*----------------------------*/
/*-- Bulk Object Operations --*/
@@ -140,13 +157,17 @@ public interface Provider extends DataModelLink
* @param context The Context for which the objects shall be returned. Can be Null (default Zone)
* @param pagingInfo Page information to determine which results to return. Null = Return all (NOT RECOMMENDED!).
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @throws UnsupportedQueryException The query provided with this request is not supported (NOT YET IMPLEMENTED FUNCTIONALITY)
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
* @throws DataTooLargeException If the data that shall be returned is too large due to the values in the paging info.
*/
- public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo, RequestMetadata metadata) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
+ public Object retrieve(SIFZone zone, SIFContext context, PagingInfo pagingInfo, RequestMetadata metadata, ResponseParameters customResponseParams) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
/**
* This method will create many objects in one call. The 'data' parameter is a collection-style object that is defined in the data
@@ -157,6 +178,10 @@ public interface Provider extends DataModelLink
* @param zone The Zone from which the request is being issued. Can be Null (default Zone)
* @param context The Context for which the objects shall be created. Can be Null (default Zone)
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return List with Status and IDs for each created object, or Status and Error for each object. Null if there was an unknown error.
*
@@ -164,7 +189,7 @@ public interface Provider extends DataModelLink
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
*/
- public List createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException;
+ public List createMany(Object data, boolean useAdvisory, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException;
/**
* This method will update many objects in one call. The 'data' parameter is a collection-style object that is defined in the data
@@ -175,6 +200,10 @@ public interface Provider extends DataModelLink
* @param zone The Zone from which the request is being issued. Can be Null (default Zone)
* @param context The Context for which the objects shall be updated. Can be Null (default Zone)
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return List with Status and IDs for each updated object, or Status and Error for each object. Null if there was an unknown error.
*
@@ -182,7 +211,7 @@ public interface Provider extends DataModelLink
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
*/
- public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException;
+ public List updateMany(Object data, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException;
/**
* This method removes all objects in the resourceIDs list in one hit.
@@ -191,6 +220,10 @@ public interface Provider extends DataModelLink
* @param zone The Zone from which the request is being issued. Can be Null (default Zone)
* @param context The Context for which the objects shall be removed. Can be Null (default Zone)
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return List with Status and IDs for each removed object, or Status and Error for each object. Null if there was an unknown error.
*
@@ -198,7 +231,7 @@ public interface Provider extends DataModelLink
* @throws PersistenceException Persistence Store could not be accessed successfully. An error log entry is performed and the
* message of the exceptions holds some info.
*/
- public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata) throws IllegalArgumentException, PersistenceException;
+ public List deleteMany(List resourceIDs, SIFZone zone, SIFContext context, RequestMetadata metadata, ResponseParameters customResponseParams) throws IllegalArgumentException, PersistenceException;
/*-----------------------------------------*/
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/QueryConsumer.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/QueryConsumer.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/QueryConsumer.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/QueryConsumer.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/QueryProvider.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/QueryProvider.java
similarity index 75%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/QueryProvider.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/QueryProvider.java
index d2c05fec..c1f0a1cf 100644
--- a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/QueryProvider.java
+++ b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/QueryProvider.java
@@ -23,6 +23,7 @@
import sif3.common.model.PagingInfo;
import sif3.common.model.QueryCriteria;
import sif3.common.model.RequestMetadata;
+import sif3.common.model.ResponseParameters;
import sif3.common.model.SIFContext;
import sif3.common.model.SIFZone;
@@ -47,6 +48,10 @@ public interface QueryProvider extends Provider
* @param context The Context for which the objects shall be returned. Can be Null (default Zone)
* @param pagingInfo Page information to determine which results to return. Null = Return all (NOT RECOMMENDED!).
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return Object Plural Type containing list of objects
*
@@ -60,7 +65,8 @@ public Object retrieveByServicePath(QueryCriteria queryCriteria,
SIFZone zone,
SIFContext context,
PagingInfo pagingInfo,
- RequestMetadata metadata) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
+ RequestMetadata metadata,
+ ResponseParameters customResponseParams) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
/**
* This method is used to retrieve data based on the 'Query By Example' (QBE) concept. All objects that match the
@@ -73,6 +79,10 @@ public Object retrieveByServicePath(QueryCriteria queryCriteria,
* @param context The Context for which the objects shall be returned. Can be Null (default Zone)
* @param pagingInfo Page information to determine which results to return. Null = Return all (NOT RECOMMENDED!).
* @param metadata Metadata relating to the request. Note that most of the properties might be null.
+ * @param customResponseParams Values to be returned as part of the response. These are generally just HTTP Header fields. If a developer
+ * sets the HTTP Header of a well defined SIF3 HTTP Header (i.e. providerId, timestamp) then the framework
+ * may override these with its own value to ensure the correct use and workings of the framework. It is the
+ * developer who will populate the object. When it is passed to this method it not null but empty.
*
* @return Object Plural Type containing list of objects.
*
@@ -86,5 +96,6 @@ public Object retrieveByQBE(Object exampleObject,
SIFZone zone,
SIFContext context,
PagingInfo pagingInfo,
- RequestMetadata metadata) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
+ RequestMetadata metadata,
+ ResponseParameters customResponseParams) throws PersistenceException, UnsupportedQueryException, DataTooLargeException;
}
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/SIFEventIterator.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/SIFEventIterator.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/SIFEventIterator.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/SIFEventIterator.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/interfaces/SecurityService.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/SecurityService.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/interfaces/SecurityService.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/interfaces/SecurityService.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/AuthenticationInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/AuthenticationInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/AuthenticationInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/AuthenticationInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/BaseMetadata.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/BaseMetadata.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/BaseMetadata.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/BaseMetadata.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/ChangedSinceInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ChangedSinceInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/ChangedSinceInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ChangedSinceInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/CustomParameters.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/CustomParameters.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/CustomParameters.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/CustomParameters.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/EnvironmentKey.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/EnvironmentKey.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/EnvironmentKey.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/EnvironmentKey.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/EventMetadata.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/EventMetadata.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/EventMetadata.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/EventMetadata.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/PagingInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/PagingInfo.java
similarity index 93%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/PagingInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/PagingInfo.java
index f0604859..1f90e85e 100644
--- a/SIF3InfraREST/sif3Common/src/sif3/common/model/PagingInfo.java
+++ b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/PagingInfo.java
@@ -49,7 +49,19 @@ public class PagingInfo implements Serializable
public PagingInfo()
{}
-
+
+ /**
+ * Constructor
+ * This constructor is mainly be used to send a DELAYED paged request where all pages shall be returned. In this case the consumer
+ * only needs to set the page size but not the actual page.
+ *
+ * @param pageSize
+ */
+ public PagingInfo(int pageSize)
+ {
+ setPageSize(pageSize);
+ }
+
/**
* Constructor
*
@@ -126,7 +138,7 @@ public PagingInfo(HeaderProperties requestHdrProps, URLQueryParameter queryParam
String navigationPageStr = queryParams.getQueryParam(PagingRequestProperty.navigationPage.name());
if (StringUtils.notEmpty(navigationPageStr)) // it is set
{
- setCurrentPageNo(toInt(queryParams.getQueryParam(PagingRequestProperty.navigationPage.name()), 0));
+ setCurrentPageNo(toInt(queryParams.getQueryParam(PagingRequestProperty.navigationPage.name()), CommonConstants.FIRST_PAGE));
}
break;
case navigationId:
@@ -154,7 +166,7 @@ public PagingInfo(HeaderProperties requestHdrProps, URLQueryParameter queryParam
String navigationPageStr = requestHdrProps.getHeaderProperty(PagingRequestProperty.navigationPage.name());
if (StringUtils.notEmpty(navigationPageStr)) // it is set => override
{
- setCurrentPageNo(toInt(navigationPageStr, 0));
+ setCurrentPageNo(toInt(navigationPageStr, CommonConstants.FIRST_PAGE));
}
break;
case navigationId:
@@ -169,7 +181,7 @@ public PagingInfo(HeaderProperties requestHdrProps, URLQueryParameter queryParam
}
// If page size is given but not which page then we assume page 'First Page'
- if ((getPageSize() > 0) && (getCurrentPageNo() <= NOT_DEFINED))
+ if ((getPageSize() > 0) && (getCurrentPageNo() == NOT_DEFINED))
{
setCurrentPageNo(CommonConstants.FIRST_PAGE);
}
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/QueryCriteria.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryCriteria.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/QueryCriteria.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryCriteria.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/QueryJoinType.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryJoinType.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/QueryJoinType.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryJoinType.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/QueryMetadata.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryMetadata.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/QueryMetadata.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryMetadata.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/QueryOperator.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryOperator.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/QueryOperator.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryOperator.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/QueryPredicate.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryPredicate.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/QueryPredicate.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/QueryPredicate.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/RemoteQueueInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/RemoteQueueInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/RemoteQueueInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/RemoteQueueInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/RequestMetadata.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/RequestMetadata.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/RequestMetadata.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/RequestMetadata.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/RequestParameters.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/RequestParameters.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/RequestParameters.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/RequestParameters.java
diff --git a/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ResponseParameters.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ResponseParameters.java
new file mode 100644
index 00000000..8cbeb5f4
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ResponseParameters.java
@@ -0,0 +1,139 @@
+/*
+ * ResponseParameters.java
+ * Created: 27/05/2016
+ *
+ * Copyright 2016 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+package sif3.common.model;
+
+import java.io.Serializable;
+
+import sif3.common.header.HeaderProperties;
+
+/**
+ * This class is intended to be a base class for some response parameter management such as HTTP Header fields.
+ *
+ * The main intend of this class is to allow providers to pass custom HTTP header fields to a consumer in a response.
+ * The SIF Specification allows for this, so that functionality is provided in the SIF3 Framework through that class.
+ *
+ * @author Joerg Huber
+ */
+public class ResponseParameters implements Serializable
+{
+ private static final long serialVersionUID = -2592549908492220258L;
+
+ private HeaderProperties httpHeaderParams = new HeaderProperties();
+
+ /**
+ * Constructor.
+ */
+ public ResponseParameters()
+ {
+ this(null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param httpHeaderParams Available HTTP header parameters of the response. Can be null.
+ */
+ public ResponseParameters(HeaderProperties httpHeaderParams)
+ {
+ super();
+ setHttpHeaderParams(httpHeaderParams);
+ }
+
+ public HeaderProperties getHttpHeaderParams()
+ {
+ return httpHeaderParams;
+ }
+
+ /**
+ * Sets the HTTP Headers to the required values.
+ *
+ * @param httpHeaderParams If null then all existing values will be removed.
+ */
+ public void setHttpHeaderParams(HeaderProperties httpHeaderParams)
+ {
+ if (httpHeaderParams == null)
+ {
+ this.httpHeaderParams = new HeaderProperties();
+ }
+ else
+ {
+ this.httpHeaderParams = httpHeaderParams;
+ }
+ }
+
+ /*-------------------------*/
+ /*-- Convenience Methods --*/
+ /*-------------------------*/
+
+ /**
+ * This method adds the given parameter and value to the list of HTTP header parameters. If there is already a parameter
+ * with that name then it will be overridden. The parameterName is case insensitive, so 'Param1' and 'param1' as the
+ * parameter name are treated as the same parameters. This behaviour matches the HTTP specification. If any of the
+ * two parameters is empty or null then they are not added to the list of HTTP Headers parameters.
+ *
+ * @param parameterName The name of the HTTP header parameter.
+ * @param value The value of the HTTP header parameter.
+ */
+ public void addHTTPHeaderParameter(String parameterName, String value)
+ {
+ getHttpHeaderParams().setHeaderProperty(parameterName, value);
+ }
+
+ /**
+ * This method will remove the given HTTP header parameter from the list of HTTP headers. If there is no such parameter
+ * in the current list or the parameterName is null then no action is taken. The parameterName is case insensitive.
+ *
+ * @param parameterName The name of the parameter to be removed.
+ */
+ public void removeHTTPHeaderParameter(String parameterName)
+ {
+ getHttpHeaderParams().setHeaderProperty(parameterName, null);
+ }
+
+ /**
+ * This method returns the value of the given HTTP header field as a string. If no HTTP header field with that name
+ * exists then null is returned. The parameterName is case insensitive.
+ *
+ * @param parameterName Name of the HTTP header field for which the value shall be returned.
+ *
+ * @return See desc.
+ */
+ public String getHTTPParameter(String parameterName)
+ {
+ return getHttpHeaderParams().getHeaderProperty(parameterName);
+ }
+
+ /**
+ * This method return true if a given HTTP header parameter is already part of the list. If it doesn't exist then false
+ * is returned.
+ *
+ * @param parameterName The HTTP header parameter to check for.
+ *
+ * @return See desc.
+ */
+ public boolean existHTTPParameter(String parameterName)
+ {
+ return getHTTPParameter(parameterName) != null;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "ResponseParameters [httpHeaderParams=" + httpHeaderParams + "]";
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/SIFBaseInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFBaseInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/SIFBaseInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFBaseInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/SIFContext.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFContext.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/SIFContext.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFContext.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/SIFEvent.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFEvent.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/SIFEvent.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFEvent.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/SIFZone.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFZone.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/SIFZone.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SIFZone.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/ServiceInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ServiceInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/ServiceInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ServiceInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/ServicePathPredicate.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ServicePathPredicate.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/ServicePathPredicate.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ServicePathPredicate.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/ServiceRights.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ServiceRights.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/ServiceRights.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ServiceRights.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/SubscriptionKey.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SubscriptionKey.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/SubscriptionKey.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/SubscriptionKey.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/URIPathInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/URIPathInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/URIPathInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/URIPathInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/URLQueryParameter.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/URLQueryParameter.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/URLQueryParameter.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/URLQueryParameter.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/ZoneContextInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ZoneContextInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/ZoneContextInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/ZoneContextInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/audit/AuditRecord.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/AuditRecord.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/audit/AuditRecord.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/AuditRecord.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/audit/RequestData.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/RequestData.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/audit/RequestData.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/RequestData.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/audit/ResponseData.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/ResponseData.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/audit/ResponseData.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/ResponseData.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/audit/SIFData.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/SIFData.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/audit/SIFData.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/audit/SIFData.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/delayed/DelayedBaseReceipt.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/delayed/DelayedBaseReceipt.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/delayed/DelayedBaseReceipt.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/delayed/DelayedBaseReceipt.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/delayed/DelayedRequestReceipt.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/delayed/DelayedRequestReceipt.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/delayed/DelayedRequestReceipt.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/delayed/DelayedRequestReceipt.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/delayed/DelayedResponseReceipt.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/delayed/DelayedResponseReceipt.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/delayed/DelayedResponseReceipt.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/delayed/DelayedResponseReceipt.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/security/TokenCoreInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/security/TokenCoreInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/security/TokenCoreInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/security/TokenCoreInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/model/security/TokenInfo.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/security/TokenInfo.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/model/security/TokenInfo.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/model/security/TokenInfo.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/common/BasicTransaction.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/BasicTransaction.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/common/BasicTransaction.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/BasicTransaction.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/common/HibernateHelper.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/HibernateHelper.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/common/HibernateHelper.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/HibernateHelper.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/common/HibernateUtil.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/HibernateUtil.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/common/HibernateUtil.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/HibernateUtil.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/common/SQLiteDialect.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/SQLiteDialect.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/common/SQLiteDialect.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/common/SQLiteDialect.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/AppEnvTemplateDAO.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/AppEnvTemplateDAO.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/AppEnvTemplateDAO.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/AppEnvTemplateDAO.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/BaseDAO.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/BaseDAO.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/BaseDAO.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/BaseDAO.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/SIF3QueueDAO.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/SIF3QueueDAO.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/SIF3QueueDAO.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/SIF3QueueDAO.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/SIF3SessionDAO.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/SIF3SessionDAO.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/SIF3SessionDAO.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/SIF3SessionDAO.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/SIF3SubscriptionDAO.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/SIF3SubscriptionDAO.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/dao/SIF3SubscriptionDAO.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/dao/SIF3SubscriptionDAO.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/model/AppEnvironmentTemplate.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/AppEnvironmentTemplate.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/model/AppEnvironmentTemplate.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/AppEnvironmentTemplate.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/model/EnvironmentTemplate.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/EnvironmentTemplate.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/model/EnvironmentTemplate.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/EnvironmentTemplate.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Infra.hbm.xml b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Infra.hbm.xml
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Infra.hbm.xml
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Infra.hbm.xml
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Queue.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Queue.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Queue.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Queue.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Session.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Session.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Session.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Session.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Subscription.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Subscription.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/model/SIF3Subscription.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/model/SIF3Subscription.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/service/AppEnvironmentService.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/AppEnvironmentService.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/service/AppEnvironmentService.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/AppEnvironmentService.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/service/DBService.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/DBService.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/service/DBService.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/DBService.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/service/SIF3QueueService.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/SIF3QueueService.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/service/SIF3QueueService.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/SIF3QueueService.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/service/SIF3SessionService.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/SIF3SessionService.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/service/SIF3SessionService.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/SIF3SessionService.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/persist/service/SIF3SubscriptionService.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/SIF3SubscriptionService.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/persist/service/SIF3SubscriptionService.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/persist/service/SIF3SubscriptionService.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/security/AbstractSecurityService.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/AbstractSecurityService.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/security/AbstractSecurityService.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/AbstractSecurityService.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/security/BearerSecurityFactory.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/BearerSecurityFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/security/BearerSecurityFactory.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/BearerSecurityFactory.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/security/X509KeystoreManager.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/X509KeystoreManager.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/security/X509KeystoreManager.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/X509KeystoreManager.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/security/X509TrustedStoreManager.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/X509TrustedStoreManager.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/security/X509TrustedStoreManager.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/X509TrustedStoreManager.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/security/X509TrustedStoreManagerNoCheck.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/X509TrustedStoreManagerNoCheck.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/security/X509TrustedStoreManagerNoCheck.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/security/X509TrustedStoreManagerNoCheck.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/utils/AuthenticationUtils.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/AuthenticationUtils.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/utils/AuthenticationUtils.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/AuthenticationUtils.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/utils/FileAndFolderUtils.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/FileAndFolderUtils.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/utils/FileAndFolderUtils.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/FileAndFolderUtils.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/utils/JAXBUtils.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/JAXBUtils.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/utils/JAXBUtils.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/JAXBUtils.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/utils/UUIDGenerator.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/UUIDGenerator.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/utils/UUIDGenerator.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/utils/UUIDGenerator.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/ws/BaseResponse.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/BaseResponse.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/ws/BaseResponse.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/BaseResponse.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/ws/BulkOperationResponse.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/BulkOperationResponse.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/ws/BulkOperationResponse.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/BulkOperationResponse.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/ws/CreateOperationStatus.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/CreateOperationStatus.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/ws/CreateOperationStatus.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/CreateOperationStatus.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/ws/ErrorDetails.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/ErrorDetails.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/ws/ErrorDetails.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/ErrorDetails.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/ws/OperationStatus.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/OperationStatus.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/ws/OperationStatus.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/OperationStatus.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/ws/Response.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/Response.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/ws/Response.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/Response.java
diff --git a/SIF3InfraREST/sif3Common/src/sif3/common/ws/model/MultiOperationStatusList.java b/SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/model/MultiOperationStatusList.java
similarity index 100%
rename from SIF3InfraREST/sif3Common/src/sif3/common/ws/model/MultiOperationStatusList.java
rename to SIF3InfraREST/sif3Common/src/main/java/sif3/common/ws/model/MultiOperationStatusList.java
diff --git a/SIF3InfraREST/sif3Common/src/main/resources/license.txt b/SIF3InfraREST/sif3Common/src/main/resources/license.txt
new file mode 100644
index 00000000..86f77fb0
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/main/resources/license.txt
@@ -0,0 +1,13 @@
+ Copyright 2016 Systemic Pty Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software distributed under the License
+ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ or implied.
+ See the License for the specific language governing permissions and limitations under the License.
+
\ No newline at end of file
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestChangeSinceInfo.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestChangeSinceInfo.java
similarity index 93%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/model/TestChangeSinceInfo.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestChangeSinceInfo.java
index a4d16cbc..41cd2b20 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestChangeSinceInfo.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestChangeSinceInfo.java
@@ -15,7 +15,7 @@
* the License.
*/
-package sif3.infra.test.common.model;
+package sif3.common.test.model;
import au.com.systemic.framework.utils.DateUtils;
import sif3.common.model.ChangedSinceInfo;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestPageInfo.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestPageInfo.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/model/TestPageInfo.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestPageInfo.java
index 29ffe7e7..29e581e6 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestPageInfo.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestPageInfo.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.model;
+package sif3.common.test.model;
import sif3.common.CommonConstants;
import sif3.common.header.HeaderProperties;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestPathInfo.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestPathInfo.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/model/TestPathInfo.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestPathInfo.java
index db91f96c..9564f76a 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestPathInfo.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestPathInfo.java
@@ -15,7 +15,7 @@
* the License.
*/
-package sif3.infra.test.common.model;
+package sif3.common.test.model;
import sif3.common.model.URIPathInfo;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestQueryCriteria.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestQueryCriteria.java
similarity index 94%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/model/TestQueryCriteria.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestQueryCriteria.java
index ef8b42c8..b5fe6368 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestQueryCriteria.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestQueryCriteria.java
@@ -15,7 +15,7 @@
* the License.
*/
-package sif3.infra.test.common.model;
+package sif3.common.test.model;
import sif3.common.model.QueryCriteria;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestRequestParameter.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestRequestParameter.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/model/TestRequestParameter.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestRequestParameter.java
index cf423287..4e8af655 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/model/TestRequestParameter.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/model/TestRequestParameter.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.model;
+package sif3.common.test.model;
import sif3.common.header.HeaderProperties;
import sif3.common.model.RequestParameters;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/ServiceBaseTest.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/ServiceBaseTest.java
similarity index 91%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/ServiceBaseTest.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/ServiceBaseTest.java
index aacca797..53a1baf0 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/ServiceBaseTest.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/ServiceBaseTest.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.persist.service;
+package sif3.common.test.persist.service;
import sif3.common.persist.common.HibernateUtil;
import au.com.systemic.framework.utils.FileReaderWriter;
@@ -31,6 +31,7 @@ public class ServiceBaseTest
public ServiceBaseTest()
{
+ HibernateUtil.initialise(null);
}
public void shutdown()
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestAppEnvTemplateService.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestAppEnvTemplateService.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestAppEnvTemplateService.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestAppEnvTemplateService.java
index 8356f28f..11e0b054 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestAppEnvTemplateService.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestAppEnvTemplateService.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.persist.service;
+package sif3.common.test.persist.service;
import sif3.common.model.EnvironmentKey;
import sif3.common.persist.model.AppEnvironmentTemplate;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3QueueService.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3QueueService.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3QueueService.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3QueueService.java
index 445253b2..1fc27ad7 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3QueueService.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3QueueService.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.persist.service;
+package sif3.common.test.persist.service;
import sif3.common.CommonConstants;
import sif3.common.CommonConstants.AdapterType;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3SessionService.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3SessionService.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3SessionService.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3SessionService.java
index 35dae39f..a1f1024d 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3SessionService.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3SessionService.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.persist.service;
+package sif3.common.test.persist.service;
import sif3.common.CommonConstants.AdapterType;
import sif3.common.model.EnvironmentKey;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3SubscriptionService.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3SubscriptionService.java
similarity index 94%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3SubscriptionService.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3SubscriptionService.java
index ef86a6db..c4e5156c 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/persist/service/TestSIF3SubscriptionService.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/persist/service/TestSIF3SubscriptionService.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.persist.service;
+package sif3.common.test.persist.service;
import sif3.common.CommonConstants.AdapterType;
import sif3.common.persist.model.SIF3Subscription;
@@ -91,12 +91,12 @@ public static void main(String[] args)
try
{
TestSIF3SubscriptionService tester = new TestSIF3SubscriptionService();
-// tester.testGetSubscription();
+ tester.testGetSubscription();
// tester.testGetSubscriptionsForEnvironment();
// tester.tesRemoveSubscription();
// tester.testRemoveAllSubscriptionsForQueue();
// tester.testRemoveAllSubscriptionsForEnvironment();
- tester.testSaveSubscription();
+// tester.testSaveSubscription();
// tester.testGetSubscriptionsForQueue();
tester.shutdown();
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/security/BaseSecurityOperations.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/BaseSecurityOperations.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/security/BaseSecurityOperations.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/BaseSecurityOperations.java
index 5639de9f..e824d13e 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/security/BaseSecurityOperations.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/BaseSecurityOperations.java
@@ -15,7 +15,7 @@
* the License.
*/
-package sif3.infra.test.common.security;
+package sif3.common.test.security;
import java.nio.charset.Charset;
import java.text.ParseException;
@@ -41,7 +41,7 @@ public class BaseSecurityOperations
@SuppressWarnings("unused")
public static TokenInfo createToken(TokenCoreInfo coreInfo, String password)
{
- String iso8601Str = "2016-05-17T14:01:00Z";
+ String iso8601Str = "2016-05-26T14:01:00Z";
String token = coreInfo.getAppUserInfo().getApplicationKey()+":"+iso8601Str;
token = new String(Base64.encodeBase64(token.getBytes()), Charset.forName("ASCII"));
TokenInfo newToken = null;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/security/DummySecurityService.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/DummySecurityService.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/security/DummySecurityService.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/DummySecurityService.java
index bae9f540..90d45825 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/security/DummySecurityService.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/DummySecurityService.java
@@ -15,7 +15,7 @@
* or implied.
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.security;
+package sif3.common.test.security;
import sif3.common.model.RequestMetadata;
import sif3.common.model.security.TokenCoreInfo;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/security/TestSecurityServiceFactory.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/TestSecurityServiceFactory.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/security/TestSecurityServiceFactory.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/TestSecurityServiceFactory.java
index 619792ea..fadbf26d 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/security/TestSecurityServiceFactory.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/security/TestSecurityServiceFactory.java
@@ -13,7 +13,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
-package sif3.infra.test.common.security;
+package sif3.common.test.security;
import sif3.common.model.EnvironmentKey;
import sif3.common.model.security.TokenCoreInfo;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/utils/MimeTypeTest.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/MimeTypeTest.java
similarity index 95%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/utils/MimeTypeTest.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/MimeTypeTest.java
index 47e2c997..a169953f 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/utils/MimeTypeTest.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/MimeTypeTest.java
@@ -1,4 +1,4 @@
-package sif3.infra.test.common.utils;
+package sif3.common.test.utils;
import javax.ws.rs.core.MediaType;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/utils/TestAuthUtils.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/TestAuthUtils.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/utils/TestAuthUtils.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/TestAuthUtils.java
index 6f02ffdd..b1b9240f 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/utils/TestAuthUtils.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/TestAuthUtils.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.utils;
+package sif3.common.test.utils;
import java.util.Date;
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/utils/TestUUIDUtils.java b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/TestUUIDUtils.java
similarity index 94%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/utils/TestUUIDUtils.java
rename to SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/TestUUIDUtils.java
index 3e321aa9..f7d41eed 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/utils/TestUUIDUtils.java
+++ b/SIF3InfraREST/sif3Common/src/test/java/sif3/common/test/utils/TestUUIDUtils.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
-package sif3.infra.test.common.utils;
+package sif3.common.test.utils;
import java.util.Date;
diff --git a/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestDateUtils.java b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestDateUtils.java
new file mode 100644
index 00000000..033d9b7d
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestDateUtils.java
@@ -0,0 +1,58 @@
+/*
+ * TestDateUtils.java
+ * Created: 19/11/2013
+ *
+ * Copyright 2013 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+
+package systemic.framework.utils.test;
+
+import au.com.systemic.framework.utils.DateUtils;
+
+/**
+ * @author Joerg Huber
+ *
+ */
+public class TestDateUtils
+{
+ private static void delay(long millisec)
+ {
+ try
+ {
+ Thread.sleep(millisec);
+ }
+ catch(InterruptedException ex)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ System.out.println("Current Date & Time in ISO 8601: " + DateUtils.nowAsISO8601());
+ System.out.println("Current Date & Time in ISO 8601 with Sec Fractions: " + DateUtils.nowAsISO8601withSecFraction());
+ delay(120);
+ System.out.println("Current Date & Time in ISO 8601 with Sec Fractions: " + DateUtils.nowAsISO8601withSecFraction());
+ delay(200);
+ System.out.println("Current Date & Time in ISO 8601 with Sec Fractions: " + DateUtils.nowAsISO8601withSecFraction());
+ delay(1500);
+ System.out.println("Current Date & Time in ISO 8601: " + DateUtils.nowAsISO8601());
+ delay(10);
+ System.out.println("Current Date & Time in ISO 8601 with Sec Fractions: " + DateUtils.nowAsISO8601withSecFraction());
+ delay(100);
+ System.out.println("Current Date & Time in ISO 8601 with Sec Fractions: " + DateUtils.nowAsISO8601withSecFraction());
+ delay(200);
+ System.out.println("Current Date & Time in ISO 8601 with Sec Fractions: " + DateUtils.nowAsISO8601withSecFraction());
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestGZIPUtils.java b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestGZIPUtils.java
new file mode 100644
index 00000000..13a31343
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestGZIPUtils.java
@@ -0,0 +1,99 @@
+/*
+ * TestGZIPUtils.java
+ * Created: 18/06/2015
+ *
+ * Copyright 2015 Systemic Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+
+package systemic.framework.utils.test;
+
+import au.com.systemic.framework.utils.FileReaderWriter;
+import au.com.systemic.framework.utils.GZIPUtil;
+
+/**
+ * @author Joerg Huber
+ *
+ */
+public class TestGZIPUtils
+{
+ private final static String BASE_PATH = "C:/Development/GitHubRepositories/SIF3InfraRest/SIF3InfraRest/TestData";
+ private final static String INPUT_PATH = BASE_PATH+"/inputData/";
+ private final static String OUTPUT_PATH = BASE_PATH+"/outputData/";
+
+ private final static String EVENT_FILE = "events";
+ private final static String STUDENT_FILE = "StudentPersonals";
+
+ private String readStringFileContent(String fileNameWithoutPath)
+ {
+ return FileReaderWriter.getFileContent(INPUT_PATH+fileNameWithoutPath);
+ }
+
+ private byte[] readFileContentAsByte(String fileNameWithoutPath)
+ {
+ return FileReaderWriter.getFileBytes(INPUT_PATH+fileNameWithoutPath);
+ }
+
+ private void writeFileContent(byte[] fileContent, String fileNameWithoutPath) throws Exception
+ {
+ FileReaderWriter.createFile(OUTPUT_PATH+fileNameWithoutPath, fileContent);
+ }
+
+ public void testZIPString() throws Exception
+ {
+ System.out.println("Start testZIPString()...");
+ String data = readStringFileContent(STUDENT_FILE+".xml");
+ if (data != null)
+ {
+ byte[] zippedData = GZIPUtil.gzipStringToBytes(data);
+ writeFileContent(zippedData, STUDENT_FILE+".gzip");
+ }
+ else
+ {
+ System.out.println("No data could be read from file.");
+ }
+ System.out.println("End testZIPString().");
+ }
+
+ public void testUnZIPToString() throws Exception
+ {
+ System.out.println("Start testUnZIPToString()...");
+ byte[] data = readFileContentAsByte(STUDENT_FILE+".gzip");
+ if (data != null)
+ {
+ String unzippedData = GZIPUtil.ungzipStringFromBytes(data);
+// System.out.println("Data read from ZIP File:\n"+unzippedData);
+ }
+ else
+ {
+ System.out.println("No data could be read from file.");
+ }
+ System.out.println("End testUnZIPToString().");
+ }
+
+ public static void main(String[] args)
+ {
+ System.out.println("Start Testing GZIP Utils...");
+ TestGZIPUtils tester = new TestGZIPUtils();
+ try
+ {
+ tester.testZIPString();
+ tester.testUnZIPToString();
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ System.out.println("End Testing GZIP Utils");
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestPropertyManager.java b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestPropertyManager.java
new file mode 100644
index 00000000..d4cef5db
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestPropertyManager.java
@@ -0,0 +1,43 @@
+package systemic.framework.utils.test;
+
+import au.com.systemic.framework.utils.PropertyManager;
+
+
+public class TestPropertyManager
+{
+
+ private PropertyManager getManager()
+ {
+ return PropertyManager.getInstance();
+ }
+
+ public static void main(String[] args)
+ {
+
+ TestPropertyManager tester = new TestPropertyManager();
+ try
+ {
+ PropertyManager manager = tester.getManager();
+ manager.loadPropertyFile("c3p0");
+ manager.loadPropertyFile("env");
+ manager.loadPropertyFile("c3p0");
+ //manager.loadPropertyFile("dummy");
+
+ System.out.println("c3p0.autoCommitOnClose from c3p0: "+manager.getPropertyAsBool("c3p0", "c3p0.autoCommitOnClose", true));
+ System.out.println("c3p0.autoCommitOnClose from env : "+manager.getPropertyAsBool("env", "c3p0.autoCommitOnClose", true));
+ System.out.println("c3p0.maxIdleTime from c3p0: "+manager.getPropertyAsInt("c3p0", "c3p0.maxIdleTime"));
+ System.out.println("eventID.dir from env : "+manager.getPropertyAsString("env", "eventID.dir", null));
+ System.out.println("eventID.dir from env : "+manager.getPropertyAsInt("env", "eventID.dir", -5));
+ System.out.println("env.fileList from env : "+manager.getFromCommaSeparated("env", "env.fileList"));
+
+
+
+ System.out.println("PropertyManager: "+manager);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ System.out.println("End Testing PropertyManager.");
+ }
+}
diff --git a/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestStringUtils.java b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestStringUtils.java
new file mode 100644
index 00000000..670bf5ed
--- /dev/null
+++ b/SIF3InfraREST/sif3Common/src/test/java/systemic/framework/utils/test/TestStringUtils.java
@@ -0,0 +1,40 @@
+package systemic.framework.utils.test;
+
+import au.com.systemic.framework.utils.FileReaderWriter;
+import au.com.systemic.framework.utils.StringUtils;
+
+public class TestStringUtils
+{
+ private static final String FULL_FILE_NAME = "C:/Development/GitHubRepositories/SIF3InfraRest/SIF3InfraRest/TestData/inputData/events.xml";
+
+
+ private static String loadFileContent()
+ {
+ return FileReaderWriter.getFileContent(FULL_FILE_NAME);
+ }
+
+ private static String[] splitEvents()
+ {
+ String fileContent = loadFileContent();
+ return StringUtils.splitter(fileContent, "###", false);
+ }
+
+
+ public static void main(String[] args)
+ {
+ System.out.println("Test StringUtils.splitter:");
+ String[] events = splitEvents();
+
+ if (events == null)
+ {
+ System.out.println("No Data: events == null");
+ }
+ else
+ {
+ for (int i=0; i
+ 4.0.0
+
+
+
+
+
+ sif3.framework
+ sif3-framework
+ 0.10.0-beta
+
+
+
+
+
+ sif3-infra-common
+ jar
+ SIF3 Infrastructure Common
+
+
+
+
+
+
+
+ ${jarName.prefix}Infra-common-${project.version}
+
+
+
+
+
+
+
+
+
+
+ sifau
+ sif3-au-datamodel
+
+
+
+
+
+
+
+ jdbc
+ mysql-jdbc
+
+
+ jdbc
+ oracle-jdbc
+
+
+ jdbc
+ sqlite-jdbc
+
+
+
+
+
+
+ sif3.framework
+ sif3-common
+ ${project.version}
+
+
+
+ sif3.framework
+ sif3-infra-model
+ ${project.version}
+
+
+
+
+
+
+ log4j
+ log4j
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+ This module holds all the low level infrastrcuture components. Classes in this module are not exposed to the developer.
+
\ No newline at end of file
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/BrokeredProviderEnvironmentManager.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/BrokeredProviderEnvironmentManager.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/BrokeredProviderEnvironmentManager.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/BrokeredProviderEnvironmentManager.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/ConsumerEnvironmentManager.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/ConsumerEnvironmentManager.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/ConsumerEnvironmentManager.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/ConsumerEnvironmentManager.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/DirectProviderEnvironmentManager.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/DirectProviderEnvironmentManager.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/DirectProviderEnvironmentManager.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/DirectProviderEnvironmentManager.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/ProviderManagerFactory.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/ProviderManagerFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/mgr/ProviderManagerFactory.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/mgr/ProviderManagerFactory.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/AdapterBaseEnvStoreOperations.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/AdapterBaseEnvStoreOperations.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/AdapterBaseEnvStoreOperations.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/AdapterBaseEnvStoreOperations.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/BrokeredProviderEnvStoreOps.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/BrokeredProviderEnvStoreOps.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/BrokeredProviderEnvStoreOps.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/BrokeredProviderEnvStoreOps.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/ConsumerEnvironmentStoreOperations.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/ConsumerEnvironmentStoreOperations.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/ConsumerEnvironmentStoreOperations.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/ConsumerEnvironmentStoreOperations.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/DirectProviderEnvStoreOps.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/DirectProviderEnvStoreOps.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/ops/DirectProviderEnvStoreOps.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/ops/DirectProviderEnvStoreOps.java
diff --git a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/types/AdapterEnvironmentStore.java b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/types/AdapterEnvironmentStore.java
similarity index 90%
rename from SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/types/AdapterEnvironmentStore.java
rename to SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/types/AdapterEnvironmentStore.java
index 88eb8fbd..b013bf5c 100644
--- a/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/env/types/AdapterEnvironmentStore.java
+++ b/SIF3InfraREST/sif3InfraCommon/src/main/java/sif3/infra/common/env/types/AdapterEnvironmentStore.java
@@ -29,6 +29,7 @@
import sif3.common.CommonConstants.AdapterType;
import sif3.common.CommonConstants.QueuePollingType;
import sif3.common.CommonConstants.QueueStrategy;
+import sif3.common.header.HeaderProperties;
import sif3.common.header.HeaderValues.UpdateType;
import sif3.common.model.AuthenticationInfo.AuthenticationMethod;
import sif3.common.utils.FileAndFolderUtils;
@@ -546,6 +547,9 @@ private boolean loadProviderInfo(AdvancedProperties props, ProviderEnvironment e
// Allow access_token or URL
envInfo.setAllowAuthOnURL(adapterProperties.getPropertyAsBool("adapter.authTokenOnURL.allowed", false));
+
+ // Load custom response headers.
+ errorsFound = errorsFound || loadCustomResponseHeaders(props, envInfo);
if (errorsFound)
{
@@ -554,6 +558,45 @@ private boolean loadProviderInfo(AdvancedProperties props, ProviderEnvironment e
return errorsFound;
}
+
+ /*
+ * Returns TRUE if there was an error loading custom http headers. Detailed error will be logged.
+ */
+ private boolean loadCustomResponseHeaders(AdvancedProperties props, ProviderEnvironment envInfo)
+ {
+ boolean errorsFound = false;
+ HeaderProperties customHeaders = new HeaderProperties();
+ envInfo.setCustomResponseHeaders(customHeaders);
+
+ String headerList = props.getPropertyAsString("adapter.custom.response.headers", null);
+ if (StringUtils.notEmpty(headerList))
+ {
+ // First we split on '|'
+ String[] headerArray = headerList.trim().split("\\|");
+ for (int i=0; i" +
"" +
"Huber" +
- "JŒRG" +
+ "J�RG" +
"" +
"" +
"" +
diff --git a/SIF3InfraREST/sif3InfraModel/.gitignore b/SIF3InfraREST/sif3InfraModel/.gitignore
new file mode 100644
index 00000000..ea6ab823
--- /dev/null
+++ b/SIF3InfraREST/sif3InfraModel/.gitignore
@@ -0,0 +1,5 @@
+/target/
+/.settings/
+/.classpath
+/.project
+/bin/
diff --git a/SIF3InfraREST/Generator/bin/lib/jaxblib/activation.jar b/SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/activation.jar
similarity index 100%
rename from SIF3InfraREST/Generator/bin/lib/jaxblib/activation.jar
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/activation.jar
diff --git a/SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb-api.jar b/SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb-api.jar
similarity index 100%
rename from SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb-api.jar
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb-api.jar
diff --git a/SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb-impl.jar b/SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb-impl.jar
similarity index 100%
rename from SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb-impl.jar
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb-impl.jar
diff --git a/SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb-xjc.jar b/SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb-xjc.jar
similarity index 100%
rename from SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb-xjc.jar
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb-xjc.jar
diff --git a/SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb1-impl.jar b/SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb1-impl.jar
similarity index 100%
rename from SIF3InfraREST/Generator/bin/lib/jaxblib/jaxb1-impl.jar
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jaxb1-impl.jar
diff --git a/SIF3InfraREST/Generator/bin/lib/jaxblib/jsr173_1.0_api.jar b/SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jsr173_1.0_api.jar
similarity index 100%
rename from SIF3InfraREST/Generator/bin/lib/jaxblib/jsr173_1.0_api.jar
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/lib/jaxblib/jsr173_1.0_api.jar
diff --git a/SIF3InfraREST/Generator/bin/schemagen.bat b/SIF3InfraREST/sif3InfraModel/Generator/bin/schemagen.bat
similarity index 100%
rename from SIF3InfraREST/Generator/bin/schemagen.bat
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/schemagen.bat
diff --git a/SIF3InfraREST/Generator/bin/schemagen.sh b/SIF3InfraREST/sif3InfraModel/Generator/bin/schemagen.sh
similarity index 100%
rename from SIF3InfraREST/Generator/bin/schemagen.sh
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/schemagen.sh
diff --git a/SIF3InfraREST/Generator/bin/xjc.bat b/SIF3InfraREST/sif3InfraModel/Generator/bin/xjc.bat
similarity index 100%
rename from SIF3InfraREST/Generator/bin/xjc.bat
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/xjc.bat
diff --git a/SIF3InfraREST/Generator/bin/xjc.sh b/SIF3InfraREST/sif3InfraModel/Generator/bin/xjc.sh
similarity index 100%
rename from SIF3InfraREST/Generator/bin/xjc.sh
rename to SIF3InfraREST/sif3InfraModel/Generator/bin/xjc.sh
diff --git a/SIF3InfraREST/sif3InfraModel/Generator/data/.gitignore b/SIF3InfraREST/sif3InfraModel/Generator/data/.gitignore
new file mode 100644
index 00000000..16be8f21
--- /dev/null
+++ b/SIF3InfraREST/sif3InfraModel/Generator/data/.gitignore
@@ -0,0 +1 @@
+/output/
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/alert.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/alert.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/alert.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/alert.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/codeset.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/codeset.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/codeset.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/codeset.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/createresponse.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/createresponse.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/createresponse.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/createresponse.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/deleterequest.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/deleterequest.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/deleterequest.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/deleterequest.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/deleteresponse.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/deleteresponse.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/deleteresponse.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/deleteresponse.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/environment.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/environment.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/environment.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/environment.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/environments.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/environments.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/environments.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/environments.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/errata.txt b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/errata.txt
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/errata.txt
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/errata.txt
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/error.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/error.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/error.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/error.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/infrastructurecommontypes.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/infrastructurecommontypes.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/infrastructurecommontypes.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/infrastructurecommontypes.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/namespace.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/namespace.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/namespace.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/namespace.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/provider.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/provider.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/provider.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/provider.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/provisionrequest.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/provisionrequest.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/provisionrequest.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/provisionrequest.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/queue.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/queue.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/queue.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/queue.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/queues.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/queues.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/queues.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/queues.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/subscription.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/subscription.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/subscription.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/subscription.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/subscriptions.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/subscriptions.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/subscriptions.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/subscriptions.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/updateresponse.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/updateresponse.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/updateresponse.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/updateresponse.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/utilities.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/utilities.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/utilities.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/utilities.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/xquery.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/xquery.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/xquery.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/xquery.xsd
diff --git a/SIF3InfraREST/Generator/data/input/Infra31/zone.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/zone.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/Infra31/zone.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/Infra31/zone.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/alert.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/alert.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/alert.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/alert.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/codeset.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/codeset.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/codeset.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/codeset.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/createresponse.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/createresponse.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/createresponse.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/createresponse.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/deleterequest.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/deleterequest.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/deleterequest.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/deleterequest.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/deleteresponse.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/deleteresponse.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/deleteresponse.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/deleteresponse.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/environment.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/environment.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/environment.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/environment.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/environments.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/environments.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/environments.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/environments.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/error.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/error.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/error.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/error.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/infrastructurecommontypes.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/infrastructurecommontypes.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/infrastructurecommontypes.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/infrastructurecommontypes.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/namespace.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/namespace.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/namespace.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/namespace.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/provider.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/provider.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/provider.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/provider.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/provisionrequest.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/provisionrequest.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/provisionrequest.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/provisionrequest.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/queue.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/queue.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/queue.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/queue.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/queues.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/queues.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/queues.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/queues.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/subscription.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/subscription.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/subscription.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/subscription.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/subscriptions.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/subscriptions.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/subscriptions.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/subscriptions.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/updateresponse.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/updateresponse.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/updateresponse.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/updateresponse.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/utilities.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/utilities.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/utilities.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/utilities.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/xquery.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/xquery.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/xquery.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/xquery.xsd
diff --git a/SIF3InfraREST/Generator/data/input/infra301/zone.xsd b/SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/zone.xsd
similarity index 100%
rename from SIF3InfraREST/Generator/data/input/infra301/zone.xsd
rename to SIF3InfraREST/sif3InfraModel/Generator/data/input/infra301/zone.xsd
diff --git a/SIF3InfraREST/Generator/script/ant.properties b/SIF3InfraREST/sif3InfraModel/Generator/script/ant.properties
similarity index 100%
rename from SIF3InfraREST/Generator/script/ant.properties
rename to SIF3InfraREST/sif3InfraModel/Generator/script/ant.properties
diff --git a/SIF3InfraREST/Generator/script/build.xml b/SIF3InfraREST/sif3InfraModel/Generator/script/build.xml
similarity index 100%
rename from SIF3InfraREST/Generator/script/build.xml
rename to SIF3InfraREST/sif3InfraModel/Generator/script/build.xml
diff --git a/SIF3InfraREST/Generator/script/infra30.xjb b/SIF3InfraREST/sif3InfraModel/Generator/script/infra30.xjb
similarity index 100%
rename from SIF3InfraREST/Generator/script/infra30.xjb
rename to SIF3InfraREST/sif3InfraModel/Generator/script/infra30.xjb
diff --git a/SIF3InfraREST/sif3InfraModel/pom.xml b/SIF3InfraREST/sif3InfraModel/pom.xml
new file mode 100644
index 00000000..ddb7ae6c
--- /dev/null
+++ b/SIF3InfraREST/sif3InfraModel/pom.xml
@@ -0,0 +1,64 @@
+
+ 4.0.0
+
+
+
+
+
+ sif3.framework
+ sif3-framework
+ 0.10.0-beta
+
+
+
+
+
+ sif3-infra-model
+ jar
+ SIF3 Infrastructure Data Model
+
+
+
+
+
+
+
+ ${jarName.prefix}Infra-model-${project.version}
+
+
+
+
+
+
+
+
+
+ sif3.framework
+ sif3-common
+ ${project.version}
+
+
+
+
+
+
+ log4j
+ log4j
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+
+ This project holds the SIF3 Infrastructure Data Model that is generated out of the SIF3 Infrastructure XSD using xjc (JAXB Pojo Generator).
+
\ No newline at end of file
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/conversion/InfraMarshalFactory.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/conversion/InfraMarshalFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/conversion/InfraMarshalFactory.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/conversion/InfraMarshalFactory.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/conversion/InfraUnmarshalFactory.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/conversion/InfraUnmarshalFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/conversion/InfraUnmarshalFactory.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/conversion/InfraUnmarshalFactory.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/Adapter1.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/Adapter1.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/Adapter1.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/Adapter1.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AlertCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AlertCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AlertCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AlertCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AlertType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AlertType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AlertType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AlertType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AliasType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AliasType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AliasType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AliasType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AliasesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AliasesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/AliasesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/AliasesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ApplicationInfoType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ApplicationInfoType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ApplicationInfoType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ApplicationInfoType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeItemType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeItemType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeItemType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeItemType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeItemsType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeItemsType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeItemsType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeItemsType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeSetCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeSetCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeSetCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeSetCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeSetType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeSetType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeSetType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeSetType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CodeType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CodeType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CreateResponseType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CreateResponseType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CreateResponseType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CreateResponseType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CreateType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CreateType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CreateType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CreateType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CreatesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CreatesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/CreatesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/CreatesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteIdCollection.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteIdCollection.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteIdCollection.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteIdCollection.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteIdType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteIdType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteIdType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteIdType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteRequestType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteRequestType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteRequestType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteRequestType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteResponseType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteResponseType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteResponseType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteResponseType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteStatus.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteStatus.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteStatus.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteStatus.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteStatusCollection.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteStatusCollection.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/DeleteStatusCollection.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/DeleteStatusCollection.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/EnvironmentCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/EnvironmentCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/EnvironmentCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/EnvironmentCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/EnvironmentType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/EnvironmentType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/EnvironmentType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/EnvironmentType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/EnvironmentTypeType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/EnvironmentTypeType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/EnvironmentTypeType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/EnvironmentTypeType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ErrorType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ErrorType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ErrorType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ErrorType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/IncludeType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/IncludeType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/IncludeType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/IncludeType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/InfrastructureServiceNamesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/InfrastructureServiceNamesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/InfrastructureServiceNamesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/InfrastructureServiceNamesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/InfrastructureServiceType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/InfrastructureServiceType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/InfrastructureServiceType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/InfrastructureServiceType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/InfrastructureServicesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/InfrastructureServicesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/InfrastructureServicesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/InfrastructureServicesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/MediaTypesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/MediaTypesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/MediaTypesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/MediaTypesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceQualifierType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceQualifierType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceQualifierType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceQualifierType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceQualifiersType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceQualifiersType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceQualifiersType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceQualifiersType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/NamespaceType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/NamespaceType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ObjectFactory.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ObjectFactory.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ObjectFactory.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ObjectFactory.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProductIdentityType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProductIdentityType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProductIdentityType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProductIdentityType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/PropertiesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/PropertiesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/PropertiesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/PropertiesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/PropertyType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/PropertyType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/PropertyType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/PropertyType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProtocolType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProtocolType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProtocolType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProtocolType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProviderCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProviderCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProviderCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProviderCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProviderType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProviderType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProviderType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProviderType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProvisionRequestType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProvisionRequestType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProvisionRequestType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProvisionRequestType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProvisionedZoneType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProvisionedZoneType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProvisionedZoneType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProvisionedZoneType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProvisionedZonesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProvisionedZonesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProvisionedZonesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ProvisionedZonesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/QuerySupportType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/QuerySupportType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/QuerySupportType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/QuerySupportType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/QueueCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/QueueCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/QueueCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/QueueCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/QueueType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/QueueType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/QueueType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/QueueType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/RightType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/RightType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/RightType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/RightType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/RightsType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/RightsType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/RightsType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/RightsType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ServiceType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ServiceType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ServiceType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ServiceType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ServicesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ServicesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ServicesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ServicesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/SubscriptionCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/SubscriptionCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/SubscriptionCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/SubscriptionCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/SubscriptionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/SubscriptionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/SubscriptionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/SubscriptionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/UpdateResponseType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/UpdateResponseType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/UpdateResponseType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/UpdateResponseType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/UpdateType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/UpdateType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/UpdateType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/UpdateType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/UpdatesType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/UpdatesType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/UpdatesType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/UpdatesType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/XpathType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/XpathType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/XpathType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/XpathType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/XqueryCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/XqueryCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/XqueryCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/XqueryCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/XqueryType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/XqueryType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/XqueryType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/XqueryType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ZoneCollectionType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ZoneCollectionType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ZoneCollectionType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ZoneCollectionType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ZoneType.java b/SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ZoneType.java
similarity index 100%
rename from SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ZoneType.java
rename to SIF3InfraREST/sif3InfraModel/src/main/java/sif3/infra/common/model/ZoneType.java
diff --git a/SIF3InfraREST/sif3InfraModel/src/main/resources/license.txt b/SIF3InfraREST/sif3InfraModel/src/main/resources/license.txt
new file mode 100644
index 00000000..86f77fb0
--- /dev/null
+++ b/SIF3InfraREST/sif3InfraModel/src/main/resources/license.txt
@@ -0,0 +1,13 @@
+ Copyright 2016 Systemic Pty Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software distributed under the License
+ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ or implied.
+ See the License for the specific language governing permissions and limitations under the License.
+
\ No newline at end of file
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/common/conversion/TestInfraUnmarshalFactory.java b/SIF3InfraREST/sif3InfraModel/src/test/java/sif3/infra/common/test/conversion/TestInfraUnmarshalFactory.java
similarity index 96%
rename from SIF3InfraREST/test/src/sif3/infra/test/common/conversion/TestInfraUnmarshalFactory.java
rename to SIF3InfraREST/sif3InfraModel/src/test/java/sif3/infra/common/test/conversion/TestInfraUnmarshalFactory.java
index 95d57ff4..1b8ef54e 100644
--- a/SIF3InfraREST/test/src/sif3/infra/test/common/conversion/TestInfraUnmarshalFactory.java
+++ b/SIF3InfraREST/sif3InfraModel/src/test/java/sif3/infra/common/test/conversion/TestInfraUnmarshalFactory.java
@@ -1,4 +1,4 @@
-package sif3.infra.test.common.conversion;
+package sif3.infra.common.test.conversion;
import javax.ws.rs.core.MediaType;
@@ -76,7 +76,7 @@ public static void main(String[] args)
System.out.println("Start Testing InfraUnmarshalFactory...");
-// tester.testFromXML();
+ tester.testFromXML();
tester.testSupportMethods();
System.out.println("End Testing InfraUnmarshalFactory.");
diff --git a/SIF3InfraREST/src/test/resources/config/consumers/.gitignore b/SIF3InfraREST/src/test/resources/config/consumers/.gitignore
new file mode 100644
index 00000000..e11a6f53
--- /dev/null
+++ b/SIF3InfraREST/src/test/resources/config/consumers/.gitignore
@@ -0,0 +1,5 @@
+/BrokeredAttTrackerConsumer.properties
+/JHLocalStudentConsumer.properties
+/NSWTestConsumer.properties
+/QueueTestConsumer.properties
+/SecureStudentConsumer.properties
diff --git a/SIF3InfraREST/src/test/resources/config/consumers/HITSStudentConsumer.properties b/SIF3InfraREST/src/test/resources/config/consumers/HITSStudentConsumer.properties
new file mode 100644
index 00000000..ae6c03c4
--- /dev/null
+++ b/SIF3InfraREST/src/test/resources/config/consumers/HITSStudentConsumer.properties
@@ -0,0 +1,275 @@
+#--------------------------------------------------------------------------------------#
+#-- Properties relating to this Adapter: These are typical properties for a Consumer --#
+#--------------------------------------------------------------------------------------#
+
+#
+# General information about this adapter
+#
+
+# Valid values for adapter.type = consumer|provider
+adapter.type=consumer
+adapter.id=HITS Student Consumer
+
+# Valid values for adapter.use.https = true|false
+adapter.use.https=false
+
+# Turn on (true) or off (false) ACL checks on client. Default = true
+adapter.checkACL=true
+
+# External security service shall be used if Bearer Token is used.
+#adapter.security.service=sif3.infra.test.common.security.DummySecurityService
+
+# Demo of Hibernate Properties through 'injection'.
+#adapter.hbr.propertyClass=systemic.sif3.demo.hibernate.DemoProperties
+
+# Values to be used in the generation of accessToken in external security service. All values with the property
+# name starting in 'security.service.property.<...> will be passed to the 'otherInfo' property of the
+# TokenCoreInfo object. See Developer's Guide for more details.
+#security.service.property.prop1=value1
+#security.service.property.prop2=value2
+
+# Indicate that this consumer sets the id/refIds and requests the provider to use them rather than assigning them
+adapter.mustUseAdvisoryIDs=true
+
+# Indicates if the environment shall be deleted if the adapter shuts down (true): USE WITH CARE! If environment is removed, all
+# associated data is lost (queues, messages in queues, delayed responses etc). Should only be TRUE in direct environments without
+# events and delayed I/O.
+adapter.deleteEnvironment.onShutdown=false
+
+# Optional generator ID. Can be used as an identifier of the consumer. This value is provided as a HTTP header field
+# to the object provider.
+adapter.generator.id=school:123
+
+# Indicate if this adapter is capable and should use compression for the payloads (true). If this property is set to true
+# then the all calls will compress (gzip) each payload first before it is sent to the provider. It will also indicate to
+# the provider that it can accepts compressed payloads in the response. If not set then 'false' is assumed (don't use
+# compression).
+adapter.compression.enabled=false
+
+# If this property is set to true then no certificate checks are performed. SHOULD NOT BE USED in PROD or TEST environments.
+# Its intend is to allow a quick and 'dirty' https connection with self-signed certificates where the certificate shall not be
+# validated. Default: false.
+adapter.noCertificateCheck=false
+
+#
+# Properties specific to an environment
+#
+
+#---------------------------------------#
+# Local (Direct Environment) Properties
+#---------------------------------------#
+
+#
+# Indicate if the environment consumer supports events. Some DIRECT environments won't support it. BROKERED environments
+# should. Valid values are true and false. The default is false.
+#
+env.events.supported=false
+
+env.xml.file.name=HITS.xml
+env.application.key=1c194015-9dda-4fa6-ad30-faf82f358b2b
+#env.application.key=BearerTest
+
+# This allows to set/override the userToken and/or instanceId element in the environment XML. This can be used if
+# multiple instances of this adapter shall be run in the same environment configuration. In such case each instance
+# can have a different userToken to distinguish the instances. If it is empty then this property won't be used and
+# the value in the environment XML template is used.
+env.userToken=a6031d63-b4b1-4ee3-958e-a8456d7a36c1
+env.instanceID=
+
+env.pwd=d1bbfdb5-3d6e-4bc3-a585-8c9080c0d1de
+
+# mediaType can be XML or JSON (case in-sensitive). Currently only XML is supported by Framework
+env.mediaType=XML
+
+# This property is used to set the real encoding used with the media type. The charset encoding value, if set, will be added
+# to the media type of the accept and content-type http headers (i.e. application/xml; charset=UTF-8). If it is not set
+# then no charset encoding will be added to the media type of the corresponding http headers.
+env.mediaType.charset=UTF-8
+
+# authentication.method can be: Basic, SIF_HMACSHA256 or Bearer (case sensitive!!!)
+env.authentication.method=Basic
+#env.authentication.method=Bearer
+
+# Eclipse built in Tomcat URIs
+env.baseURI=http://hits.dev.nsip.edu.au/SIF3InfraREST/hits/environments/environment
+#env.baseURI=https://localhost:9443/SIF3InfraREST/sif3/environments/environment
+
+# External Tomcat URIs
+#env.baseURI=https://localhost:8443/SIF3InfraREST/sif3/environments/environment
+
+#---------------------------------------------------------#
+# Framework Specific Feature:
+# Connect to existing environment rather than create one.
+# If this section doesn't exist we assume create one.
+#---------------------------------------------------------#
+
+# This property indicates if there is no existing environment in local session store then try to use an
+# existing from Environment Provider rather than create a new one with the environment provider. Default is false.
+env.use.existing=false
+
+# The session token to use with a pre-existing environment
+env.existing.sessionToken=32795355-4eda-4b2e-b0a7-b31ad1663b6f
+
+# The full URI of the pre-existing environment.
+env.existing.environmentURI=http://hits.dev.nsip.edu.au/SIF3InfraREST/hits/environments/2a1e87a5-91dd-41cd-b500-62624104ae4d
+
+#
+# This property indicates if a 'conflict' or HTTP Status of 409 for a create environment shall be a treated as an error (true) or if it shall
+# be considered a valid state (false). If it is considered a valid state then a payload with an environment XML/JSON would be expected if a
+# HTTP Status of 409 is returned. The default is true (treat as error).
+#
+env.create.conflictIsError=false
+
+
+#---------------------------------#
+# Event related properties
+#---------------------------------#
+# If the environment supports events then a consumer can subscribe to them. This section is to configure some
+# behaviour on how to subscribe to events. SIF3 offers many options in this area. They all relate to how queues
+# are created and events are directed to queues. See Developer's Guide for more details on the properties below.
+
+# Indicate if event subscription is enabled. Even if an environment supports events, this consumer might not be
+# interested in any events. Default is false (don't subscribe to events)
+events.enabled=false
+
+#
+# SIF3 allow many ways on how to create queues and direct events to them. This framework only supports a set of the
+# most common strategies. Currently only 'ADAPTER_LEVEL' is implemented which mean a single queue for this consumer
+# is created. Future expansions can be 'ZONE_LEVEL' (One queue per zone), SERVICE_LEVEL (one queue per service in each
+# zone) etc. Default is ADAPTER_LEVEL
+events.queue.strategy=ADAPTER_LEVEL
+
+#
+# This property is used give the queues a certain name. This might be the actual queue name if the strategy is
+# ADAPTER_LEVEL. It might be the queue's prefix if any other queue strategy is used where multiple queues are
+# configured. If not provided the name is assumed to be the same as the adapter.id property with all white spaces
+# removed and the prefix of 'EVENT_'.
+events.queue.name=StudentConsumer
+
+#
+# There are two ways how a consumer can receive messages from a queue. IMMEDIATE or LONG. Refer to SIF3
+# specification for details on the two options. Default is IMMEDIATE.
+events.queue.type=IMMEDIATE
+
+#
+# Many concurrent subscriptions are allowed on each queue. This property indicates the number of subscriptions per
+# queue. The default is 1. Care must be taken with other numbers as it could mean that events are processed out of
+# order! The environment provider might override that value with a lesser value.
+events.queue.subscribers=3
+
+#
+# Frequency with which the queues are being polled to check if there are messages available. This value is in seconds
+# and might be overwritten by the environment provider to a larger value. Default is 60 seconds (once a minute).
+events.polling.frequency=30
+
+#
+# Number of seconds the connections shall remain open for LONG_POLLING queues before it is closed. See SIF3 Spec
+# for more details. Default is 120 seconds (2minutes).
+events.longPolling.timeout=60
+
+#
+# When a consumer is shut down then events will be queued on the broker. This is generally the desired behaviour.
+# There might be situations where a shutdown of the consumer also means no events shall be queued during the off-line
+# time. To enable this the subscriptions to events must be removed from the event queue. This property indicates if
+# subscriptions shall be removed when the consumer shuts down. Default is false => Don't remove subscriptions.
+events.subscriptions.removeOnShutdown=false
+
+
+#-------------------------------------#
+# DELAYED Response related properties
+#-------------------------------------#
+# If the environment supports delayed responses then a consumer can subscribe to them. This section is to configure some
+# behaviour on how to subscribe to delayed responses. SIF3 offers many options in this area. They all relate to how queues
+# are created and responses are directed to queues. See Developer's Guide for more details on the properties below.
+
+# Indicate if delayed responses are enabled. Even if an environment supports delayed responses, this consumer might not be
+# interested in that functionality. Default is false (don't enable delayed responses)
+delayed.enabled=false
+
+#
+# SIF3 allow many ways on how to create queues and direct responses to them. This framework only supports a set of the
+# most common strategies. Currently only 'ADAPTER_LEVEL' is implemented which mean a single queue for this consumer
+# is created. Future expansions can be 'ZONE_LEVEL' (One queue per zone), SERVICE_LEVEL (one queue per service in each
+# zone) etc. Default is ADAPTER_LEVEL
+delayed.queue.strategy=ADAPTER_LEVEL
+
+#
+# This property is used give the queues a certain name. This might be the actual queue name if the strategy is
+# ADAPTER_LEVEL. It might be the queue's prefix if any other queue strategy is used where multiple queues are
+# configured. If not provided the name is assumed to be the same as the adapter.id property with all white spaces
+# removed and the prefix of 'DELAYED_'.
+delayed.queue.name=Delayed_StudentConsumer
+
+#
+# There are two ways how a consumer can receive messages from a queue. IMMEDIATE or LONG. Refer to SIF3
+# specification for details on the two options. Default is IMMEDIATE.
+delayed.queue.type=IMMEDIATE
+
+#
+# Many concurrent subscriptions are allowed on each queue. This property indicates the number of subscriptions per
+# queue. The default is 1. Care must be taken with other numbers as it could mean that responses are processed out of
+# order! The environment provider might override that value with a lesser value.
+delayed.queue.subscribers=2
+
+#
+# Frequency with which the queues are being polled to check if there are messages available. This value is in seconds
+# and might be overwritten by the environment provider to a larger value. Default is 60 seconds (once a minute).
+delayed.polling.frequency=120
+
+#
+# Number of seconds the connections shall remain open for LONG_POLLING queues before it is closed. See SIF3 Spec
+# for more details. Default is 120 seconds (2minutes).
+delayed.longPolling.timeout=30
+
+#
+# When a consumer is shut down then delayed responses will be queued on the broker. This is generally the desired behaviour.
+# There might be situations where a shutdown of the consumer also means no responses shall be queued during the off-line
+# time. To enable this the subscriptions to delayed responses must be removed from the response queue. This property indicates if
+# subscriptions shall be removed when the consumer shuts down. Default is false => Don't remove subscriptions.
+delayed.subscriptions.removeOnShutdown=false
+
+#-------------------------------------#
+#-- Consumer Assembly Setup Section --#
+#-------------------------------------#
+#The Base Package where all Consumer Classes can be found
+consumer.basePackageName=systemic.sif3.demo.rest.consumer
+
+#Name of all Consumer Classes that make up this Consumer. This is a comma separated list
+#consumer.classes=StudentPersonalConsumer,SchoolInfoConsumer
+consumer.classes=StudentPersonalConsumer
+#consumer.classes=CSVStudentConsumer
+#consumer.classes=StudentPersonalConsumer, StudentDailyAttendanceConsumer
+
+# Each consumer in the list above is started in their own thread. These threads are started with a little delay between them.
+# The default is 10 seconds. The property below allows to override that value. The delay is in seconds.
+consumer.startup.delay=5
+
+# The number of threads processing messages (events) locally. This is the number of threads for each object type that is processed locally.
+# If this value is not set then 1 is assumed (default).
+consumer.local.workerThread=2
+
+#
+# If it is required to set the number of local processing thread differently to the global number for a particular consumer
+# (name of consumer.classes property) then this is set here. The notation is: consumer.local.workerThread.=
+#consumer.local.workerThread.StudentDailyAttendanceConsumer=5
+
+
+#---------------------------------#
+# Brokered Environment Properties
+#---------------------------------#
+#env.xml.file.name=systemicDemo.xml
+#env.application.key=DemoFramework
+#env.pwd=Demo1
+#env.baseURI=https://mybroker.com/systemicDemo/environments/environment
+
+
+#---------------------------------#
+# Custom Properties
+#---------------------------------#
+test.tempDir.output=C:/Development/GitHubRepositories/SIF3InfraRest/SIF3InfraREST/TestData/xml/output
+#test.tempDir.output=C:/DEV/eclipseWorkspace/SIF3InfraREST/TestData/xml/output
+# Time in secs how long a consumer shall pretend to be busy for testing purposes
+test.consumer.busy.delay=30
+test.consumer.write.payload=false
+test.testmode=true
+
diff --git a/SIF3InfraREST/config/consumers/SchoolConsumer.properties b/SIF3InfraREST/src/test/resources/config/consumers/SchoolConsumer.properties
similarity index 100%
rename from SIF3InfraREST/config/consumers/SchoolConsumer.properties
rename to SIF3InfraREST/src/test/resources/config/consumers/SchoolConsumer.properties
diff --git a/SIF3InfraREST/config/consumers/StudentConsumer.properties b/SIF3InfraREST/src/test/resources/config/consumers/StudentConsumer.properties
similarity index 100%
rename from SIF3InfraREST/config/consumers/StudentConsumer.properties
rename to SIF3InfraREST/src/test/resources/config/consumers/StudentConsumer.properties
diff --git a/SIF3InfraREST/config/environment.properties b/SIF3InfraREST/src/test/resources/config/environment.properties
similarity index 90%
rename from SIF3InfraREST/config/environment.properties
rename to SIF3InfraREST/src/test/resources/config/environment.properties
index f234eb34..297a2495 100644
--- a/SIF3InfraREST/config/environment.properties
+++ b/SIF3InfraREST/src/test/resources/config/environment.properties
@@ -6,7 +6,7 @@
# Base directory where environment template information is stored. This location is the root location. Consumers and Providers
# have their Environment templates stored in sub-directories of this root location.
#
-env.store.dir=C:/Development/GitHubRepositories/SIF3InfraRest/SIF3InfraREST/config/environments
+env.store.dir=C:/Development/GitHubRepositories/SIF3InfraRest/SIF3InfraREST/src/test/resources/config/environments
#env.store.dir=C:/DEV/eclipseWorkspace/SIF3InfraREST/config/environments
key.store=C:/keystores/client/keystore.jks
diff --git a/SIF3InfraREST/src/test/resources/config/environments/consumer/template/.gitignore b/SIF3InfraREST/src/test/resources/config/environments/consumer/template/.gitignore
new file mode 100644
index 00000000..afa43844
--- /dev/null
+++ b/SIF3InfraREST/src/test/resources/config/environments/consumer/template/.gitignore
@@ -0,0 +1,4 @@
+/brokeredAttTracker.xml
+/NSWTest.xml
+/QueueTestEnv.xml
+/systemicDemo.xml
diff --git a/SIF3InfraREST/config/environments/consumer/template/HITS.xml b/SIF3InfraREST/src/test/resources/config/environments/consumer/template/HITS.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/consumer/template/HITS.xml
rename to SIF3InfraREST/src/test/resources/config/environments/consumer/template/HITS.xml
diff --git a/SIF3InfraREST/config/environments/consumer/template/auTestSolution.xml b/SIF3InfraREST/src/test/resources/config/environments/consumer/template/auTestSolution.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/consumer/template/auTestSolution.xml
rename to SIF3InfraREST/src/test/resources/config/environments/consumer/template/auTestSolution.xml
diff --git a/SIF3InfraREST/config/environments/consumer/template/devLocal.xml b/SIF3InfraREST/src/test/resources/config/environments/consumer/template/devLocal.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/consumer/template/devLocal.xml
rename to SIF3InfraREST/src/test/resources/config/environments/consumer/template/devLocal.xml
diff --git a/SIF3InfraREST/config/environments/consumer/template/testSolution.xml b/SIF3InfraREST/src/test/resources/config/environments/consumer/template/testSolution.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/consumer/template/testSolution.xml
rename to SIF3InfraREST/src/test/resources/config/environments/consumer/template/testSolution.xml
diff --git a/SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/.gitignore b/SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/.gitignore
new file mode 100644
index 00000000..8049a686
--- /dev/null
+++ b/SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/.gitignore
@@ -0,0 +1 @@
+/devLocal.xml
diff --git a/SIF3InfraREST/config/environments/provider/template/brokered/auBrokeredDemoSIS.xml b/SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/auBrokeredDemoSIS.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/provider/template/brokered/auBrokeredDemoSIS.xml
rename to SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/auBrokeredDemoSIS.xml
diff --git a/SIF3InfraREST/config/environments/provider/template/brokered/brokeredDemoSIS.xml b/SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/brokeredDemoSIS.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/provider/template/brokered/brokeredDemoSIS.xml
rename to SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/brokeredDemoSIS.xml
diff --git a/SIF3InfraREST/config/environments/provider/template/brokered/systemicDemo.xml b/SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/systemicDemo.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/provider/template/brokered/systemicDemo.xml
rename to SIF3InfraREST/src/test/resources/config/environments/provider/template/brokered/systemicDemo.xml
diff --git a/SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/.gitignore b/SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/.gitignore
new file mode 100644
index 00000000..55c44d75
--- /dev/null
+++ b/SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/.gitignore
@@ -0,0 +1 @@
+/secureEnv.xml
diff --git a/SIF3InfraREST/config/environments/provider/template/direct/auTestSolution.xml b/SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/auTestSolution.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/provider/template/direct/auTestSolution.xml
rename to SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/auTestSolution.xml
diff --git a/SIF3InfraREST/config/environments/provider/template/direct/devLocal.xml b/SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/devLocal.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/provider/template/direct/devLocal.xml
rename to SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/devLocal.xml
diff --git a/SIF3InfraREST/config/environments/provider/template/direct/testSolution.xml b/SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/testSolution.xml
similarity index 100%
rename from SIF3InfraREST/config/environments/provider/template/direct/testSolution.xml
rename to SIF3InfraREST/src/test/resources/config/environments/provider/template/direct/testSolution.xml
diff --git a/SIF3InfraREST/config/hibernate/c3p0.properties b/SIF3InfraREST/src/test/resources/config/hibernate/c3p0.properties
similarity index 100%
rename from SIF3InfraREST/config/hibernate/c3p0.properties
rename to SIF3InfraREST/src/test/resources/config/hibernate/c3p0.properties
diff --git a/SIF3InfraREST/config/hibernate/hibernate.properties b/SIF3InfraREST/src/test/resources/config/hibernate/hibernate.properties
similarity index 100%
rename from SIF3InfraREST/config/hibernate/hibernate.properties
rename to SIF3InfraREST/src/test/resources/config/hibernate/hibernate.properties
diff --git a/SIF3InfraREST/config/hibernate/sif3infra.hibernate.cfg.xml b/SIF3InfraREST/src/test/resources/config/hibernate/sif3infra.hibernate.cfg.xml
similarity index 100%
rename from SIF3InfraREST/config/hibernate/sif3infra.hibernate.cfg.xml
rename to SIF3InfraREST/src/test/resources/config/hibernate/sif3infra.hibernate.cfg.xml
diff --git a/SIF3InfraREST/config/log4j.properties b/SIF3InfraREST/src/test/resources/config/log4j.properties
similarity index 84%
rename from SIF3InfraREST/config/log4j.properties
rename to SIF3InfraREST/src/test/resources/config/log4j.properties
index a69f25b6..e7b7d974 100644
--- a/SIF3InfraREST/config/log4j.properties
+++ b/SIF3InfraREST/src/test/resources/config/log4j.properties
@@ -24,12 +24,14 @@ log4j.rootLogger=DEBUG, stdout, file
### Project stuff
log4j.logger.sif3.infra=DEBUG
-log4j.logger.sif3.infra.rest.client.MessageClient=INFO
-log4j.logger.sif3.common.utils.JAXBUtils=INFO
-
-
-#log4j.logger.sif3.infra.rest.client.EventClient=INFO
-
+log4j.logger.sif3.infra.rest.client.ClientConfigMgr=DEBUG
+log4j.logger.sif3.infra.rest.client.MessageClient=DEBUG
+log4j.logger.sif3.infra.rest.client.EventClient=DEBUG
+log4j.logger.sif3.infra.rest.queue.RemoteMessageQueueReader=DEBUG
+
+#log4j.logger.sif3.infra.rest.resource.BaseResource=DEBUG
+log4j.logger.sif3.infra.rest.resource.DataModelResource=DEBUG
+log4j.logger.sif3.common.utils.JAXBUtils=DEBUG
## JSF Stuff
#log4j.logger.javax.faces = ERROR
diff --git a/SIF3InfraREST/src/test/resources/config/providers/.gitignore b/SIF3InfraREST/src/test/resources/config/providers/.gitignore
new file mode 100644
index 00000000..3518908a
--- /dev/null
+++ b/SIF3InfraREST/src/test/resources/config/providers/.gitignore
@@ -0,0 +1 @@
+/BrokeredSISProvider.properties
diff --git a/SIF3InfraREST/config/providers/StudentProvider.properties b/SIF3InfraREST/src/test/resources/config/providers/StudentProvider.properties
similarity index 91%
rename from SIF3InfraREST/config/providers/StudentProvider.properties
rename to SIF3InfraREST/src/test/resources/config/providers/StudentProvider.properties
index 69fe9baa..2ec55c56 100644
--- a/SIF3InfraREST/config/providers/StudentProvider.properties
+++ b/SIF3InfraREST/src/test/resources/config/providers/StudentProvider.properties
@@ -53,6 +53,18 @@ adapter.compression.enabled=false
# validated. Default: false.
adapter.noCertificateCheck=false
+# A set of custom HTTP Headers that are added to every response. If the name is one of the SIF 3.x pre-defined HTTP header names
+# (i.e. timestamp, responseAction etc) then they will be overridden by the framework and the value in this list will be ignored.
+# The various headers are separated by '|' and the value of a header is listed after the ':'. If a HTTP Header shall have
+# more than one value then they are listed as a comma separated list.
+#
+# The exact EBNF notation is: :{,}{|:{,}}
+#
+# Example: Header1:value1,value2|Header2:value3|Header3:value4,value5
+#
+# If this property is not set then no custom headers will automatically be added to the response.
+#adapter.custom.response.headers=joerg: hdr1, hdr2| test: abc | hdr3: 456, yuyu
+adapter.custom.response.headers=
#------------------------------------------#
#-- Environment Related Property Section --#
@@ -81,7 +93,7 @@ env.events.supported=false
# This is a custom implementation that is not yet part of SIF 3.x but may be included in later releases.
# It may not be included, so usage of this feature must be taken with care as it might be removed again!
#
-env.allow.autoCreate=false
+env.allow.autoCreate=true
#
# List of properties that are used independent of the environment type
diff --git a/SIF3InfraREST/test/src/sif3/infra/test/rest/env/TestConsumerConnector.java b/SIF3InfraREST/test/src/sif3/infra/test/rest/env/TestConsumerConnector.java
deleted file mode 100644
index 801407b8..00000000
--- a/SIF3InfraREST/test/src/sif3/infra/test/rest/env/TestConsumerConnector.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package sif3.infra.test.rest.env;
-
-import sif3.infra.common.env.mgr.ConsumerEnvironmentManager;
-import sif3.infra.rest.env.connectors.ConsumerEnvironmentConnector;
-
-public class TestConsumerConnector
-{
-// private static final String CONSUMER_PROP_FILE_NAME = "StudentConsumer";
-// private static final String CONSUMER_PROP_FILE_NAME = "BrokeredAttTrackerConsumer";
-// private static final String CONSUMER_PROP_FILE_NAME = "QueueTestConsumer";
- private static final String CONSUMER_PROP_FILE_NAME = "SecureStudentConsumer";
-
- private ConsumerEnvironmentConnector connector = null;
- private ConsumerEnvironmentManager envMgr = null;
-
- public TestConsumerConnector()
- {
- envMgr = ConsumerEnvironmentManager.initialse(CONSUMER_PROP_FILE_NAME);
- connector = new ConsumerEnvironmentConnector(envMgr);
- }
-
- private void testConnect()
- {
- System.out.println("Start Testing to connect to environment.");
- try
- {
- boolean success = connector.connect();
- if (success)
- {
- System.out.println("Successfully connected to environment " + envMgr.getEnvironmentInfo().getEnvironmentName());
- }
- else
- {
- System.out.println("Failed to connect to environment " + envMgr.getEnvironmentInfo().getEnvironmentName() + ". See error log for details.");
-
- }
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- System.out.println("End Testing to connect to environment.");
- }
-
- private void testDisconnect()
- {
- System.out.println("Start Testing to disconnect from environment.");
- try
- {
- boolean success = connector.disconnect(envMgr.getEnvironmentInfo().getRemoveEnvOnShutdown());
- if (success)
- {
- System.out.println("Successfully disconnected from environment " + envMgr.getEnvironmentInfo().getEnvironmentName());
- }
- else
- {
- System.out.println("Failed to disconnect from environment " + envMgr.getEnvironmentInfo().getEnvironmentName() + ". See error log for details.");
-
- }
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- System.out.println("End Testing to disconnect from environment.");
-
- }
-
- public static void main(String[] args)
- {
- TestConsumerConnector tester = new TestConsumerConnector();
-
- System.out.println("Start Testing TestConsumerConnector...");
-
- tester.testConnect();
- tester.testDisconnect();
-
- System.out.println("End Testing TestConsumerConnector.");
- }
-}
diff --git a/SIF3InfraREST/war/META-INF/MANIFEST.MF b/SIF3InfraREST/war/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e949512..00000000
--- a/SIF3InfraREST/war/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
diff --git a/SIF3InfraREST/war/WEB-INF/lib/antlr-2.7.7.jar b/SIF3InfraREST/war/WEB-INF/lib/antlr-2.7.7.jar
deleted file mode 100644
index 5e5f14b3..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/antlr-2.7.7.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/asm-3.1.jar b/SIF3InfraREST/war/WEB-INF/lib/asm-3.1.jar
deleted file mode 100644
index 8217cae0..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/asm-3.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/c3p0-0.9.2.1.jar b/SIF3InfraREST/war/WEB-INF/lib/c3p0-0.9.2.1.jar
deleted file mode 100644
index 10ec0dc7..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/c3p0-0.9.2.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/commons-beanutils-1.8.3.jar b/SIF3InfraREST/war/WEB-INF/lib/commons-beanutils-1.8.3.jar
deleted file mode 100644
index 218510bc..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/commons-beanutils-1.8.3.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/commons-codec-1.9.jar b/SIF3InfraREST/war/WEB-INF/lib/commons-codec-1.9.jar
deleted file mode 100644
index ef35f1c5..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/commons-codec-1.9.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/commons-collections-3.2.1.jar b/SIF3InfraREST/war/WEB-INF/lib/commons-collections-3.2.1.jar
deleted file mode 100644
index c35fa1fe..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/commons-collections-3.2.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/commons-lang-2.6.jar b/SIF3InfraREST/war/WEB-INF/lib/commons-lang-2.6.jar
deleted file mode 100644
index 98467d3a..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/commons-lang-2.6.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/commons-logging-1.1.1.jar b/SIF3InfraREST/war/WEB-INF/lib/commons-logging-1.1.1.jar
deleted file mode 100644
index 8758a96b..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/commons-logging-1.1.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/dom4j-1.6.1.jar b/SIF3InfraREST/war/WEB-INF/lib/dom4j-1.6.1.jar
deleted file mode 100644
index c8c4dbb9..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/dom4j-1.6.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/hibernate-c3p0-4.3.10.Final.jar b/SIF3InfraREST/war/WEB-INF/lib/hibernate-c3p0-4.3.10.Final.jar
deleted file mode 100644
index 7a91b11e..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/hibernate-c3p0-4.3.10.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar b/SIF3InfraREST/war/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar
deleted file mode 100644
index 6b13dcec..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/hibernate-core-4.3.10.Final.jar b/SIF3InfraREST/war/WEB-INF/lib/hibernate-core-4.3.10.Final.jar
deleted file mode 100644
index d7bb64ce..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/hibernate-core-4.3.10.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar b/SIF3InfraREST/war/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar
deleted file mode 100644
index e2f2c592..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/javassist-3.18.1-GA.jar b/SIF3InfraREST/war/WEB-INF/lib/javassist-3.18.1-GA.jar
deleted file mode 100644
index d5f19ac5..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/javassist-3.18.1-GA.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jaxb-api.jar b/SIF3InfraREST/war/WEB-INF/lib/jaxb-api.jar
deleted file mode 100644
index 8f45754c..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jaxb-api.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jaxb-impl.jar b/SIF3InfraREST/war/WEB-INF/lib/jaxb-impl.jar
deleted file mode 100644
index 3eec2f41..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jaxb-impl.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jboss-logging-3.1.3.GA.jar b/SIF3InfraREST/war/WEB-INF/lib/jboss-logging-3.1.3.GA.jar
deleted file mode 100644
index ff3a103c..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jboss-logging-3.1.3.GA.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar b/SIF3InfraREST/war/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar
deleted file mode 100644
index 7817dc12..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jersey-client-1.19.jar b/SIF3InfraREST/war/WEB-INF/lib/jersey-client-1.19.jar
deleted file mode 100644
index c9e0f561..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jersey-client-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jersey-core-1.19.jar b/SIF3InfraREST/war/WEB-INF/lib/jersey-core-1.19.jar
deleted file mode 100644
index 92feb639..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jersey-core-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jersey-server-1.19.jar b/SIF3InfraREST/war/WEB-INF/lib/jersey-server-1.19.jar
deleted file mode 100644
index 3710b885..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jersey-server-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jersey-servlet-1.19.jar b/SIF3InfraREST/war/WEB-INF/lib/jersey-servlet-1.19.jar
deleted file mode 100644
index 2bfdf820..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jersey-servlet-1.19.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jettison-1.3.3.jar b/SIF3InfraREST/war/WEB-INF/lib/jettison-1.3.3.jar
deleted file mode 100644
index 332a475c..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jettison-1.3.3.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/jsr311-api-1.1.1.jar b/SIF3InfraREST/war/WEB-INF/lib/jsr311-api-1.1.1.jar
deleted file mode 100644
index ec8bc818..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/jsr311-api-1.1.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/log4j.jar b/SIF3InfraREST/war/WEB-INF/lib/log4j.jar
deleted file mode 100644
index 62513071..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/log4j.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/mchange-commons-java-0.2.3.4.jar b/SIF3InfraREST/war/WEB-INF/lib/mchange-commons-java-0.2.3.4.jar
deleted file mode 100644
index f03ed884..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/mchange-commons-java-0.2.3.4.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/mysql.jar b/SIF3InfraREST/war/WEB-INF/lib/mysql.jar
deleted file mode 100644
index 33c35c6e..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/mysql.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/ojdbc6.jar b/SIF3InfraREST/war/WEB-INF/lib/ojdbc6.jar
deleted file mode 100644
index fb50fb93..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/ojdbc6.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/pjl-comp-filter-1.8.1.jar b/SIF3InfraREST/war/WEB-INF/lib/pjl-comp-filter-1.8.1.jar
deleted file mode 100644
index 2e4df98c..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/pjl-comp-filter-1.8.1.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/sifDataModel_au3.4.jar b/SIF3InfraREST/war/WEB-INF/lib/sifDataModel_au3.4.jar
deleted file mode 100644
index c8e8efd6..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/sifDataModel_au3.4.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/slf4j-api-1.5.8.jar b/SIF3InfraREST/war/WEB-INF/lib/slf4j-api-1.5.8.jar
deleted file mode 100644
index 20d1d371..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/slf4j-api-1.5.8.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/slf4j-log4j12-1.5.8.jar b/SIF3InfraREST/war/WEB-INF/lib/slf4j-log4j12-1.5.8.jar
deleted file mode 100644
index b63bcdc7..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/slf4j-log4j12-1.5.8.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/sqlite-jdbc-3.7.2.jar b/SIF3InfraREST/war/WEB-INF/lib/sqlite-jdbc-3.7.2.jar
deleted file mode 100644
index b0bec7b0..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/sqlite-jdbc-3.7.2.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/systemic-framework-20160229.jar b/SIF3InfraREST/war/WEB-INF/lib/systemic-framework-20160229.jar
deleted file mode 100644
index 9b3da0b6..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/systemic-framework-20160229.jar and /dev/null differ
diff --git a/SIF3InfraREST/war/WEB-INF/lib/xom-1.2.8.jar b/SIF3InfraREST/war/WEB-INF/lib/xom-1.2.8.jar
deleted file mode 100644
index 370d40c3..00000000
Binary files a/SIF3InfraREST/war/WEB-INF/lib/xom-1.2.8.jar and /dev/null differ