Commit a7a624a9 authored by Stefan Funk's avatar Stefan Funk 🐧
Browse files

Merge branch 'release/11.1.2-TG-RELEASE'

parents 5b34e825 3af04d9d
# This template uses jdk8 for verifying and deploying images
image: maven:3.8.3-jdk-8
variables:
# This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
# when running from the command line.
#MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
# Nexus Deployment settings, please use env vars in Settings -> CI/CD -> Variables.
MAVEN_SETTINGS_PATH: ".m2/settings.xml"
MAVEN_DEPLOY_OPTS: "--settings=$MAVEN_SETTINGS_PATH"
# File for storing the POM project.version
VARIABLES_FILE: ./variables.txt
stages:
- build_version
- deploy_java
- deploy_deb
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
key: $CI_JOB_NAME
paths:
- .m2/repository
# Get the project version from main POM file and store it to artifact.
get_version_dev:
only:
- develop
stage: build_version
script:
- 'PVERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate -Dexpression=project.version -q -DforceStdout)'
- echo "export PVERSION=$PVERSION" > $VARIABLES_FILE
- echo "Project version from main pom file is $PVERSION"
artifacts:
name: POM_VERSION
paths:
- $VARIABLES_FILE
# Build and deploy all the JARs to GWDG Nexus, and build all the DEBs and store DEBs to artifacts.
build_and_deploy_dev:
only:
- develop
stage: deploy_java
script:
- 'mvn $MAVEN_OPTS $MAVEN_CLI_OPTS $MAVEN_DEPLOY_OPTS -U clean deploy -Pdhrep.deb'
artifacts:
name: WEBAPP_DEB_PACKAGES
paths:
- ./tgcrud-webapp/target/*.deb
- ./tgcrud-webapp-public/target/*.deb
- ./dhcrud-webapp/target/*.deb
- ./dhcrud-webapp-public/target/*.deb
# Deploy DEB files to APTLY repository.
# All four DEB files are deployed with SNAPSHOT version (branch: develop)!
# Only the {tg/dh}crud-webapps are deployed for branch main, depending on the version (suffix -TG or -DH)!
# FIXME --> Use a common lib for uploading the deb files to Aptly!
deploy_tgcrud-webapp_dev:
only:
- develop
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'tgcrud-webapp'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
deploy_tgcrud-webapp-public_dev:
only:
- develop
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'tgcrud-webapp-public'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
deploy_dhcrud-webapp_dev:
only:
- develop
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'dhcrud-webapp'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
deploy_dhcrud-webapp-public_dev:
only:
- develop
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'dhcrud-webapp-public'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
deploy_tgcrud-webapp_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'tgcrud-webapp'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then echo "---A TGREP RELEASE BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
deploy_tgcrud-webapp-public_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'tgcrud-webapp-public'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then echo "---A TGREP RELEASE BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
deploy_dhcrud-webapp_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'dhcrud-webapp'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then echo "---A DHREP RELEASE BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
deploy_dhcrud-webapp-public_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'dhcrud-webapp-public'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then echo "---A DHREP RELEASE BUILD IS BEING PERFORMED---"; fi'
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}; fi'
- 'if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy; fi'
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>maven-dariah-public</id>
<username>${env.NEXUS_REPO_USER}</username>
<password>${env.NEXUS_REPO_PW}</password>
</server>
</servers>
</settings>
11.1.0-SNAPSHOT
===============
* Remove index page
* Add infos to landing page
* Metadata formatting for landing page
* Add humanised extent to landing page (KB, MB, etcpp.)
* Change DOI and HDL identifiers on landing page
11.0.0-SNAPSHOT
===============
* Merge feature/elastic6
10.6.3-ES6-SNAPSHOT
===================
* Fix #35572: TG-crud shall deliver filenames and mimetype as HTML headers
* Fix #35026: Check if dir exists before creating it using .mkdirs()
10.4.0-ES6-SNAPSHOT
===================
* Increase CXF version to 3.3.9
* Adapt dhcrud classes and config files to ES6
10.3.0.1-DH
===========
* Remove client folder and added online tests to crudclient-online module
10.2.5.7-SNAPSHOT
=================
* Increase CXF version to 3.3.6
* Allowing BagIt 1.0 in RDAResearchDataRepositoryInteropWG new bagit-profile version 0.2
9.8.2
=====
* Add RESTful method #recache for DH-crud only (for the moment)
* Increase CXF to version 3.2.8
9.4.1
=====
......
#!/usr/bin/env groovy
node {
def mvnHome
stage('Preparation') {
mvnHome = tool 'Maven 3.5.0'
checkout scm
}
stage('Build') {
// We are deploying all JARs build here, SNAPSHOTs and RELEASEs!
sh "'${mvnHome}/bin/mvn' -U clean deploy -Pdhrep.deb"
}
stage('Publish') {
def pom = readMavenPom file: 'pom.xml'
def pVersion = pom.version
def snapshot = pVersion.contains("SNAPSHOT")
def tgrelease = pVersion.contains("TG-RELEASE")
def dhrelease = pVersion.contains("DH-RELEASE")
if (snapshot) {
doDebSnapshot('tgcrud-webapp', 'tgcrud-webapp/target', pVersion)
doDebSnapshot('tgcrud-webapp-public', 'tgcrud-webapp-public/target', pVersion)
doDebSnapshot('dhcrud-webapp', 'dhcrud-webapp/target', pVersion)
doDebSnapshot('dhcrud-webapp-public', 'dhcrud-webapp-public/target', pVersion)
}
if (tgrelease) {
doDebRelease('tgcrud-webapp', 'tgcrud-webapp/target', pVersion)
doDebRelease('tgcrud-webapp-public', 'tgcrud-webapp-public/target', pVersion)
}
if (dhrelease) {
doDebRelease('dhcrud-webapp', 'dhcrud-webapp/target', pVersion)
doDebRelease('dhcrud-webapp-public', 'dhcrud-webapp-public/target', pVersion)
}
}
}
# DARIAH-DE CRUD Service (TG-crud and DH-crud)
# The DARIAH-DE {TG|DH}-crud Services
## Overview
TG-crud and DH-crud are the services for all the CREATE, RETRIEVE, UPDATE and DELETE operations of the TextGrid and the DARIAH-DE Repository. Both the TextGrid and the DARIAH-DE CRUDservices are offering all it's methods via REST and SOAP protocols.
TG-crud and DH-crud are the services for all the CREATE, RETRIEVE, UPDATE and DELETE operations of the TextGrid and the DARIAH-DE Repository. Both the TextGrid and the DARIAH-DE CRUD Services are offering all it's methods via REST and SOAP protocols.
## Technical Information
++TODO++
The package *crud-base* provides general CRUD Service classes, including the TGCrudServiceImpl class for the TextGrid CRUD service. The DARIAH-DE CRUD Service classes can be found in module *dhcrud-base*, and the web service implamentations are covered by the *{tg|dh}crud-webapp* and *{tg|dh}crud-webapp-public* modules.
The classes {TG|DH}CrudServiceImpl implement the service interface created by the CXF web service implementation. All service methods can be used with the Java client classes that are provided in the middleware.tgcrud.clients.tgcrudclient folder, using the JAXB data binding, or using every client to be build to serve the TG-crud's WSDL, or WADL file, or using the tgcrud-client Maven module provided with the parent TG-crud module. The DH-crud Service only offers a REST API.
The class TGCrudServiceImpl implements the service interface created by the CXF webservice implementation. This service is used to ingest, access, and delete TextGrid objects - which actually have two components: the metadata file and the data file. It is ment to be used by the TextGridLab software and by other TextGrid Services that are used by the TextGridLab. All service methods can be used with the Java client classes that are provided in the middleware.tgcrud.clients.tgcrudclient folder, using the JAXB data binding, or using every client to be build to serve the TG-crud's WSDL, or WADL file, or using the tgcrud-client Maven module provided with the parent tgcrud module.
## Documentation
For service and API documentation please have a look at the [TG-crud Documentation](https://textgridlab.org/doc/services//submodules/tg-crud/tgcrud-webapp/docs/index.html) and the [DH-crud Documentation](https://repository.de.dariah.eu/doc/services/submodules/tg-crud/dhcrud-webapp-public/docs/index.html).
## Installation
++TODO++
Both services are provided with a Gitlab CI workflow to build .DEB files to be deployed and installed on TextGrid and DARIAH-DE servers.
### Building from GIT
### Building from GIT using Maven
You can either check out the TG-crud from the GIT (trunk or tagged productive version), and use Maven to build the TG-crud service WAR file. First go to your favorite home directory, and create a folder for the code:
You can check out the {TG|DH}-crud from our [GIT Repository](https://gitlab.gwdg.de/dariah-de/dariah-de-crud-services), develop or main branch, or get yourself a certain tag, and then use Maven to build the {TG|DH}-crud Service WAR file:
mkdir src
cd src
git clone git://git.projects.gwdg.de/tg-crud.git
Now checkout the TG-crud service code via GIT...
... build the WAR packages via:
git clone git://git.projects.gwdg.de/tg-crud.git
mvn clean package
... and build the package:
... build the DEB packagea using:
cd services/tgcrudservice
mvn package
mvn clean package -Pdhrep.deb
You will get a TG-crud WAR file in the folder ./tgcrud-base/target.
You will get a {TG|DH}-crud WAR and/or DEB file in the folders ./{tg|dh}crud-webapp/target and ./{tg|dh}crud-webapp-public/target.
### Using DEB File
### Using Pre-Build WAR File
Or you can use a DEB file from the DARIAH-DE [APTLY Repository](https://ci.de.dariah.eu/packages/)
Or you can use the WAR file from our [Nexus Repository Server](http://dev.dariah.eu/nexus/service/local/artifact/maven/redirect?r=snapshots&g=info.textgrid.middleware&a=tgcrud-webapp&v=5.9.148-SNAPSHOT&e=war)
++TODO Use latest release version here++
## Deploying the {TG|DH}-crud Service
The service is deployed just by installing the appropriate DEB package.
## Deploying the TG-crud Service
## Links and References
This WAR file tgcrud.war simply is deployed into your favorite Application Server, e.g. Apache Tomcat.
* [{DH|TG}-crud Gitlab page](https://gitlab.gwdg.de/dariah-de/dariah-de-crud-services)
* [TG-crud CII Best Practices](https://bestpractices.coreinfrastructure.org/en/projects/3885)
* [Old page on projects.gwdg.de](https://projects.gwdg.de/projects/tg-crud)
For releasing a new version, please have a look at the [DARIAH-DE Release Managmenet Page] (https://wiki.de.dariah.eu/display/DARIAH3/DARIAH-DE+Release+Management).
For releasing a new version, please have a look at the [DARIAH-DE Release Management Page] (https://wiki.de.dariah.eu/display/DARIAH3/DARIAH-DE+Release+Management).
Specials in TG- and DH-crud releases are the following:
* Please set the **RELEASE** version to “x.y.z-TG" or x.y.z.DH“ for TextGrid or DARIAH-DE Crud Service releases. Depending on that only TG- or DH-crud RELEASE DEB packages will be deployed!
* Please set the **RELEASE** version to “x.y.z-TG-RELEASE" or x.y.z.DH-RELEASE“ for TextGrid or DARIAH-DE Crud Service releases. Depending on that only TG- or DH-crud RELEASE DEB packages will be deployed!
* Please set the **SNAPSHOT** version to “x.y.z-TG-SNAPSHOT“ or “x.y.z.DH-SNAPSHOT“ for TextGrid or DARIAH-DE Crud Service snapshots. Depending on that only TG- or DH-crud SNAPSHOT DEB packages will be deployed!
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>info.textgrid.middleware</groupId>
<artifactId>crud</artifactId>
<version>11.0.0-TG-RELEASE</version>
<version>11.1.2-TG-RELEASE</version>
</parent>
<artifactId>crud-base</artifactId>
<name>DARIAHDE :: CrudService :: Base</name>
......@@ -151,6 +151,12 @@
<finalName>tgcrud</finalName>
<defaultGoal>package</defaultGoal>
<plugins>
<!-- Do deploy JAR file to the Nexus repository -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
......
......@@ -245,10 +245,10 @@ public abstract class CrudService {
try {
setConfiguration(CrudServiceConfigurator.getInstance(configFileLocation));
} catch (FileNotFoundException e) {
throw TGCrudServiceExceptions.ioFault("CRUD properties file not found: " + configFileLocation
throw CrudServiceExceptions.ioFault("CRUD properties file not found: " + configFileLocation
+ "! Please configure in beans.xml!");
} catch (IOException e) {
throw TGCrudServiceExceptions
throw CrudServiceExceptions
.ioFault("IOException while configuring CRUD service: " + e.getMessage());
}
......@@ -266,7 +266,7 @@ public abstract class CrudService {
if (intlogConf != null && !intlogConf.equals("")) {
PropertyConfigurator.configureAndWatch(intlogConf, WATCH_EVERY_FIVE_MINUTES);
} else {
throw TGCrudServiceExceptions.ioFault("CRUD log4j config file not found: " + intlogConf);
throw CrudServiceExceptions.ioFault("CRUD log4j config file not found: " + intlogConf);
}
}
......
......@@ -60,7 +60,7 @@ import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.UpdateC
* @since 2010-02-26
******************************************************************************/
public final class TGCrudServiceExceptions {
public final class CrudServiceExceptions {
// **
// STATIC FINALS
......
......@@ -104,7 +104,7 @@ public abstract class CrudServiceMessageProducerAbs {
try {
session = getNewSession(theConf);
} catch (NamingException | JMSException e) {
TGCrudServiceExceptions.ioFault(e, "Error initializing message context!");
CrudServiceExceptions.ioFault(e, "Error initializing message context!");
}
}
......@@ -199,7 +199,7 @@ public abstract class CrudServiceMessageProducerAbs {
TGCrudServiceUtilities.serviceLog(CrudService.DEBUG, meth, "Message sent: " + messageLog);
} catch (NamingException e) {
TGCrudServiceExceptions.ioFault(e, ERROR_MESSAGE + ": " + messageLog);
CrudServiceExceptions.ioFault(e, ERROR_MESSAGE + ": " + messageLog);
} catch (JMSException e) {
try {
session = getNewSession(theConf);
......@@ -211,7 +211,7 @@ public abstract class CrudServiceMessageProducerAbs {
"Message sent after renewing messaging session: " + messageLog);
} catch (NamingException | JMSException e1) {
TGCrudServiceExceptions.ioFault(e1, ERROR_MESSAGE + ": " + messageLog);
CrudServiceExceptions.ioFault(e1, ERROR_MESSAGE + ": " + messageLog);
}
}
}
......
......@@ -248,7 +248,7 @@ public class CrudServiceUtilities {
try {
return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
} catch (DatatypeConfigurationException e) {
throw TGCrudServiceExceptions.ioFault(e, "Unable to create XMLGregorianCalendar");
throw CrudServiceExceptions.ioFault(e, "Unable to create XMLGregorianCalendar");
}
}
......@@ -425,15 +425,15 @@ public class CrudServiceUtilities {
return result;
} catch (ClassNotFoundException e) {
throw TGCrudServiceExceptions.ioFault(e,
throw CrudServiceExceptions.ioFault(e,
"Crud Service AAI implementation class not found: "
+ theConfiguration.getAAIiMPLEMENTATION());
} catch (InstantiationException e) {
throw TGCrudServiceExceptions.ioFault(e,
throw CrudServiceExceptions.ioFault(e,
"Crud Service AAI implementation class could not be instantiated: "
+ theConfiguration.getAAIiMPLEMENTATION());
} catch (IllegalAccessException e) {
throw TGCrudServiceExceptions.ioFault(e,
throw CrudServiceExceptions.ioFault(e,
"Crud Service AAI implementation class access failure: "
+ theConfiguration.getAAIiMPLEMENTATION());
}
......@@ -467,15 +467,15 @@ public class CrudServiceUtilities {
return result;
} catch (ClassNotFoundException e) {
throw TGCrudServiceExceptions.ioFault(e,
throw CrudServiceExceptions.ioFault(e,
"Crud Service Identifier implementation class not found: "
+ theConfiguration.getIDiMPLEMENTATION());
} catch (InstantiationException e) {
throw TGCrudServiceExceptions.ioFault(e,
throw CrudServiceExceptions.ioFault(e,
"Crud Service Identifier implementation class could not be instantiated: "
+ theConfiguration.getIDiMPLEMENTATION());
} catch (IllegalAccessException e) {
throw TGCrudServiceExceptions.ioFault(e,
throw CrudServiceExceptions.ioFault(e,
"Crud Service Identifier implementation class access failure: "
+ theConfiguration.getIDiMPLEMENTATION());
}
......
......@@ -166,10 +166,10 @@ public class TGCrudServiceAaiTgextraImpl extends CrudServiceAaiAbs {
+ " permission is granted for resource: " + theResource);
}
} catch (UnknownResourceFault e) {
throw TGCrudServiceExceptions.objectNotFoundFault(e,
throw CrudServiceExceptions.objectNotFoundFault(e,
ERROR_UNKNOWNRESOURCE + ": " + theResource);
} catch (AuthFault e) {
throw TGCrudServiceExceptions.authFault(e, ERROR_ACCESSDENIED);
throw CrudServiceExceptions.authFault(e, ERROR_ACCESSDENIED);
}
TGCrudServiceUtilities.serviceLog(CrudService.DEBUG, meth, "tgextra query duration: "
......@@ -217,18 +217,18 @@ public class TGCrudServiceAaiTgextraImpl extends CrudServiceAaiAbs {
} catch (SOAPFaultException e) {
// TODO Remove workaround for TG-635, if fixed!!
if (e.getMessage().equals(TGEXTRA_UNKNOWNRESOURCE_STRING)) {
throw TGCrudServiceExceptions.objectNotFoundFault(e,
throw CrudServiceExceptions.objectNotFoundFault(e,
ERROR_UNKNOWNRESOURCE + ": " + theResource);
}
throw e;
} catch (info.textgrid.namespaces.middleware.tgauth_crud.UnknownResourceFault e) {
throw TGCrudServiceExceptions.objectNotFoundFault(e,
throw CrudServiceExceptions.objectNotFoundFault(e,
ERROR_UNKNOWNRESOURCE + ": " + theResource);
} catch (info.textgrid.namespaces.middleware.tgauth_crud.AuthenticationFault e) {
throw TGCrudServiceExceptions.ioFault(e,
throw CrudServiceExceptions.ioFault(e,
ERROR_ACCESSDENIED + "! BTW: Who is not cruddy enough??");
} catch (AuthFault e) {
throw TGCrudServiceExceptions.authFault(e, ERROR_ACCESSDENIED);
throw CrudServiceExceptions.authFault(e, ERROR_ACCESSDENIED);
}
TGCrudServiceUtilities.serviceLog(CrudService.DEBUG, meth, "tgextra query duration: "
......@@ -275,9 +275,9 @@ public class TGCrudServiceAaiTgextraImpl extends CrudServiceAaiAbs {
"Sucessfully registered: " + theUri);
} catch (info.textgrid.namespaces.middleware.tgauth_crud.AuthenticationFault e) {
throw TGCrudServiceExceptions.authFault(e, ERROR_REGISTER);
throw CrudServiceExceptions.authFault(e, ERROR_REGISTER);
} catch (RbacFault e) {
throw TGCrudServiceExceptions.ioFault(e, ERROR_REGISTER);
throw CrudServiceExceptions.ioFault(e, ERROR_REGISTER);
}
TGCrudServiceUtilities.serviceLog(CrudService.DEBUG, meth,
......@@ -323,15 +323,15 @@ public class TGCrudServiceAaiTgextraImpl extends CrudServiceAaiAbs {
} catch (SOAPFaultException e) {
// TODO Remove workaround for TG-635, if fixed!!
if (e.getMessage().equals(TGEXTRA_UNKNOWNRESOURCE_STRING)) {
throw TGCrudServiceExceptions.objectNotFoundFault(e, ERROR_UNKNOWNRESOURCE + ": " + theUri);
throw CrudServiceExceptions.objectNotFoundFault(e, ERROR_UNKNOWNRESOURCE + ": " + theUri);
}
throw e;
} catch (info.