...
 
Commits (481)
......@@ -2,6 +2,19 @@ variables:
GENESYS_VERSION: "2.3"
DOCKER_HOST: genesys1.swarm.genesys-pgr.org
DOCKER_VERSION: latest
# 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.
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "--batch-mode --errors --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
paths:
- .m2/repository
stages:
# - compile
......@@ -9,22 +22,12 @@ stages:
- dockerize
- deploy
# compile and test:
# stage: compile
# image: dockerhub.croptrust.org/docker/custom/maven-with-compass:latest
# except:
# - master
# - production
# - tags
# script:
# - echo "CI_COMMIT_REF_SLUG ${CI_COMMIT_REF_SLUG}"
# - echo "CI_ENVIRONMENT_SLUG ${CI_ENVIRONMENT_SLUG}"
# - MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn compile test -B -U
.package_template: &maven_package
image: dockerhub.croptrust.org/docker/custom/maven-with-compass:latest
image: dockerhub.croptrust.org/docker/custom/maven-with-compass:2020
script:
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn package -B -U
- mvn -v
- mvn package -B -U
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}"
expire_in: 1 day
......@@ -90,8 +93,9 @@ dockerize genesys branch:
stage: dockerize
dependencies:
- package genesys branch
# when: manual
allow_failure: false
when: manual
# If we set allow_failure it will block the pipeline
# allow_failure: true
except:
- master
- tags
......@@ -191,6 +195,8 @@ deploy to production:
only:
- /^production-.*/
when: manual
# Don't terminate the pipeline!
allow_failure: false
variables:
GIT_STRATEGY: none
script:
......
......@@ -78,24 +78,6 @@ module.exports = function(grunt) {
cwd : 'node_modules/notosans-fontface/fonts/',
src : '*',
dest : '<%= app.dist1 %>/styles/fonts'
}, {
// tinyMCE
expand : true,
cwd : 'node_modules/tinymce/skins',
src : [ '**' ],
dest : '<%= app.dist1 %>/js/skins'
}, {
// leaflet
expand : true,
cwd : 'node_modules/leaflet/dist/',
src : [ 'leaflet.css', 'images/*.png' ],
dest : '<%= app.dist1 %>/styles'
}, {
// simplecolorpicker
expand : true,
cwd : 'node_modules/jquery-simplecolorpicker/',
src : [ 'jquery.simplecolorpicker.css', 'jquery.simplecolorpicker-regularfont.css' ],
dest : '<%= app.dist1 %>/styles'
}, {
expand : true,
cwd : 'node_modules/jquery-ui-dist/',
......@@ -103,13 +85,6 @@ module.exports = function(grunt) {
dest : '<%= app.dist1 %>/styles'
} ]
}
// styles : {
// expand : true,
// cwd : '<%= app.source %>/styles',
// dest : '.tmp/styles/',
// src : '{,*/}*.css'
// }
},
// Make sure code styles are up to par and there are no obvious mistakes
......@@ -133,21 +108,8 @@ module.exports = function(grunt) {
dist1 : {
src : [
'node_modules/jquery/dist/jquery.js',
'node_modules/jquery-flot/jquery.flot.js',
'node_modules/jquery-flot/jquery.flot.pie.js',
'node_modules/jquery-flot/jquery.flot.fillbetween.js',
'node_modules/jquery-simplecolorpicker/jquery.simplecolorpicker.js',
'node_modules/tinymce/tinymce.js',
'node_modules/tinymce/tinymce.jquery.js',
'node_modules/tinymce/themes/modern/theme.js',
'node_modules/tinymce/plugins/link/plugin.js',
'node_modules/tinymce/plugins/autolink/plugin.js',
'node_modules/tinymce/plugins/code/plugin.js',
'node_modules/leaflet/dist/leaflet.js',
'node_modules/leaflet.locationfilter/src/locationfilter.js',
'node_modules/bootstrap-sass/assets/javascripts/bootstrap.js',
'node_modules/jquery-ui-dist/jquery-ui.js',
'node_modules/jstree/dist/jstree.js',
'node_modules/modernizr/bin/modernizr.js',
'node_modules/form-serializer/jquery.serialize-object.js'
],
......@@ -157,18 +119,9 @@ module.exports = function(grunt) {
src : [
'<%= app.source1 %>/js/prologue.js',
'<%= app.source1 %>/js/crophub.js',
'<%= app.source1 %>/js/browse.js',
'<%= app.source1 %>/js/epilogue.js'
],
dest : '<%= app.dist1 %>/js/genesys.js'
},
world1 : {
src : [
'node_modules/highmaps-release/highmaps.src.js',
'node_modules/highcharts/lib/modules/data.src.js',
'<%= app.source1 %>/js/world.js'
],
dest : '<%= app.dist1 %>/js/genesyshighcharts.js'
}
},
......@@ -196,18 +149,12 @@ module.exports = function(grunt) {
'<%= app.dist1 %>/styles/other.min.css' : [
'<%= app.dist1 %>/styles/jquery-ui.css',
'<%= app.dist1 %>/styles/forza.css',
'<%= app.dist1 %>/styles/leaflet.css',
'<%= app.dist1 %>/styles/jquery.simplecolorpicker.css',
'<%= app.dist1 %>/styles/jquery.simplecolorpicker-regularfont.css'
],
'<%= app.dist1 %>/styles/genesys.min.css' : [ '<%= app.dist1 %>/styles/genesys.css' ],
'<%= app.dist1 %>/styles/all.min.css' : [
'<%= app.dist1 %>/styles/bootstrap.css',
'<%= app.dist1 %>/styles/jquery-ui.css',
'<%= app.dist1 %>/styles/forza.css',
'<%= app.dist1 %>/styles/leaflet.css',
'<%= app.dist1 %>/styles/jquery.simplecolorpicker.css',
'<%= app.dist1 %>/styles/jquery.simplecolorpicker-regularfont.css',
'<%= app.dist1 %>/styles/genesys.css'
]
}
......@@ -251,7 +198,7 @@ module.exports = function(grunt) {
},
js1 : {
files : [ 'src/main/sourceapp/1/{,*/}*.js' ],
tasks : [ 'newer:jshint:dist1', 'concat:world1', 'concat:app1' ],
tasks : [ 'newer:jshint:dist1', 'concat:app1' ],
options : {
livereload : true
}
......@@ -265,7 +212,6 @@ module.exports = function(grunt) {
{ src : [ '<%= app.dist1 %>/js/libraries.min.js'], dest : '<%= app.dist1 %>/js/libraries.min.' + buildNumber + '.js' },
{ src : [ '<%= app.dist1 %>/js/libraries.js'], dest : '<%= app.dist1 %>/js/libraries.' + buildNumber + '.js' },
{ src : [ '<%= app.dist1 %>/js/genesys.js'], dest : '<%= app.dist1 %>/js/genesys.' + buildNumber + '.js' },
{ src : [ '<%= app.dist1 %>/js/genesyshighcharts.min.js'], dest : '<%= app.dist1 %>/js/genesyshighcharts.min.' + buildNumber + '.js' },
{ src : [ '<%= app.dist1 %>/styles/bootstrap.css'], dest : '<%= app.dist1 %>/styles/bootstrap.' + buildNumber + '.css' },
{ src : [ '<%= app.dist1 %>/styles/bootstrap.min.css'], dest : '<%= app.dist1 %>/styles/bootstrap.min.' + buildNumber + '.css' },
......@@ -283,7 +229,7 @@ module.exports = function(grunt) {
// grunt.loadNpmTasks('grunt-contrib-watch');
// grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('build1', [ 'newer:jshint:dist1', 'compass:dist1', 'copy:dist1', 'concat:dist1', 'concat:world1', 'concat:app1', 'autoprefixer:dist1', 'uglify:dist1', 'cssmin:dist1' ]);
grunt.registerTask('build1', [ 'newer:jshint:dist1', 'compass:dist1', 'copy:dist1', 'concat:dist1', 'concat:app1', 'autoprefixer:dist1', 'uglify:dist1', 'cssmin:dist1' ]);
// grunt.registerTask('js', [ 'jshint:all', 'copy:dist', 'concat',
// 'autoprefixer', 'uglify:dist' ]);
// grunt.registerTask('css', [ 'compass:dist', 'copy:dist', 'concat',
......
#
# Build Genesys server on top of jetty-alpine
#
FROM jetty:9.4.12
FROM jetty:9.4.27-jre8
LABEL maintainer "Matija Obreza <matija.obreza@croptrust.org>"
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-base</artifactId>
<version>2.9.8</version>
</parent>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate-parent</artifactId>
<name>Hibernate module parent</name>
<version>2.9.9-SNAPSHOT</version>
<packaging>pom</packaging>
<description>Parent pom for shared settings for project sub-modules
</description>
<modules>
<module>hibernate3</module>
<module>hibernate4</module>
<module>hibernate5</module>
<!--
<module>hibernate5_2-test</module>
-->
</modules>
<url>https://github.com/FasterXML/jackson-datatype-hibernate</url>
<scm>
<connection>scm:git:git@github.com:FasterXML/jackson-datatype-hibernate.git</connection>
<developerConnection>scm:git:git@github.com:FasterXML/jackson-datatype-hibernate.git</developerConnection>
<url>http://github.com/FasterXML/jackson-datatype-hibernate</url>
<tag>HEAD</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- But there are also some well-known test dependencies we may as well add directly -->
<!-- and for testing, JUnit is needed, as well as annotations -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<!-- Alas, need to include snapshot reference since otherwise can not find
snapshot of parent... -->
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<!-- Inherited from oss-base. Generate PackageVersion.java.-->
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<id>process-packageVersion</id>
<phase>generate-sources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>com/fasterxml/jackson/**/failing/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate-parent</artifactId>
<version>2.9.9-SNAPSHOT</version>
</parent>
<artifactId>jackson-datatype-hibernate4</artifactId>
<name>Jackson-datatype-Hibernate4</name>
<packaging>bundle</packaging>
<description>Add-on module for Jackson (http://jackson.codehaus.org) to support
Hibernate (http://hibernate.org) version 4.x data types.
</description>
<url>https://github.com/FasterXML/jackson-datatype-hibernate</url>
<properties>
<!-- Generate PackageVersion.java into this directory. -->
<packageVersion.dir>com/fasterxml/jackson/datatype/hibernate4</packageVersion.dir>
<packageVersion.package>${project.groupId}.hibernate4</packageVersion.package>
<!-- Hibernate with JPA 2.0 -->
<hibernate.version>4.1.0.Final</hibernate.version>
<surefire.version>2.12</surefire.version>
<osgi.export>${project.groupId}.hibernate4</osgi.export>
</properties>
<dependencies>
<!-- what would be the best scope to use here? -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.155</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- Inherited from oss-base. Generate PackageVersion.java.-->
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<id>process-packageVersion</id>
<phase>generate-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -82,7 +82,7 @@ To add images to an accession you must first upload the image to Genesys with a
[source,bash]
----
$ curl 'https://sandbox.genesys-pgr.org/api/v0/img/XXX001/acn/ACC001/?originalFilename=IMG0012.jpg' -i -X PUT -H 'Content-Type: image/jpeg' -d @path/to/IMG0012.jpg
$ curl 'https://api.sandbox.genesys-pgr.org/api/v0/img/XXX001/acn/ACC001/?originalFilename=IMG0012.jpg' -i -X PUT -H 'Content-Type: image/jpeg' -d @path/to/IMG0012.jpg
----
The request `Content-Type` header must be set to the image content type (e.g.
......
......@@ -53,7 +53,7 @@ initiated by opening the authorization URL in a browser (please substitute `CLIE
with valid data):
----
https://sandbox.genesys-pgr.org/oauth/authorize?client_id=CLIENTID&client_secret=SECRET&response_type=code&redirect_uri=oob&scope=write
https://api.sandbox.genesys-pgr.org/oauth/authorize?client_id=CLIENTID&client_secret=SECRET&response_type=code&redirect_uri=oob&scope=write
----
The server will prompt you to authorize the access to your protected resources on Genesys.
......@@ -61,7 +61,7 @@ After your confirmation, the server will present an authorization code (which wi
From a shell, execute the following `curl` command, with your authorization code in place of `THECODE`:
----
$ curl 'https://sandbox.genesys-pgr.org/oauth/token?grant_type=authorization_code&client_id=CLIENTID&client_secret=SECRET&redirect_uri=oob&code=THECODE'
$ curl 'https://api.sandbox.genesys-pgr.org/oauth/token?grant_type=authorization_code&client_id=CLIENTID&client_secret=SECRET&redirect_uri=oob&code=THECODE'
----
==== Username and password
......@@ -71,7 +71,7 @@ applications) where the user's password will not be captured or stored -- i.e.
it will be used once. A password grant can be used as follows:
----
$ curl 'https://sandbox.genesys-pgr.org/oauth/token' --data 'scope=write+read&grant_type=password&username=USERNAME&password=PASSWORD&client_id=CLIENT_ID&client_secret=CLIENT_SECRET'
$ curl 'https://api.sandbox.genesys-pgr.org/oauth/token' --data 'scope=write+read&grant_type=password&username=USERNAME&password=PASSWORD&client_id=CLIENT_ID&client_secret=CLIENT_SECRET'
----
==== Client credentials
......@@ -93,7 +93,7 @@ To obtain a valid (but short-lived) access token, a simple `POST` request to
Genesys is required:
----
$ curl -X POST 'https://sandbox.genesys-pgr.org/oauth/token?grant_type=client_credentials&client_id=CLIENTID&client_secret=SECRET&redirect_uri=oob'
$ curl -X POST 'https://api.sandbox.genesys-pgr.org/oauth/token?grant_type=client_credentials&client_id=CLIENTID&client_secret=SECRET&redirect_uri=oob'
----
This type of grant takes out the *user* authentication and authenticates the
......@@ -132,7 +132,7 @@ or by including it in the request URL as a query string parameter:
[source,bash]
----
$ curl 'https://sandbox.genesys-pgr.org/api/v0/me?access_token=OAUTH-ACCESS-TOKEN'
$ curl 'https://api.sandbox.genesys-pgr.org/api/v0/me?access_token=OAUTH-ACCESS-TOKEN'
----
=== Using the refresh token
......@@ -156,7 +156,7 @@ The refresh token must be securely persisted and can be used to request a new ac
when the previous access token expires:
----
$ curl 'https://sandbox.genesys-pgr.org/oauth/token?grant_type=refresh_token&client_id=CLIENTID&client_secret=SECRET&redirect_uri=oob&refresh_token=OAUTH-REFRESH-TOKEN'
$ curl 'https://api.sandbox.genesys-pgr.org/oauth/token?grant_type=refresh_token&client_id=CLIENTID&client_secret=SECRET&redirect_uri=oob&refresh_token=OAUTH-REFRESH-TOKEN'
----
......
......@@ -13,9 +13,9 @@ December 2015: Documentation commit {buildNumber}
All API access is over HTTPS, and accessed from the https://www.genesys-pgr.org domain or
through https://sandbox.genesys-pgr.org for testing purposes. All data is sent and received as JSON.
In this manual, all URLs are pointing to the Genesys sandbox environment at https://sandbox.genesys-pgr.org.
All API access is over HTTPS, and accessed from the https://api.genesys-pgr.org domain or
through https://api.sandbox.genesys-pgr.org for testing purposes. All data is sent and received as JSON.
In this manual, all URLs are pointing to the Genesys sandbox environment at https://api.sandbox.genesys-pgr.org.
include::api/security.adoc[]
......
......@@ -14,9 +14,9 @@ March 2017: Documentation commit {buildNumber}
Genesys implements basic <<brapiv1, BrAPI v1 specification>>
All API access is over HTTPS, and accessed from the https://www.genesys-pgr.org domain or
through https://sandbox.genesys-pgr.org for testing purposes. All data is sent and received as JSON.
In this manual, all URLs are pointing to the Genesys sandbox environment at https://sandbox.genesys-pgr.org.
All API access is over HTTPS, and accessed from the https://api.genesys-pgr.org domain or
through https://api.sandbox.genesys-pgr.org for testing purposes. All data is sent and received as JSON.
In this manual, all URLs are pointing to the Genesys sandbox environment at https://api.sandbox.genesys-pgr.org.
include::brapi/auth.adoc[]
......
......@@ -2,12 +2,16 @@
== Authentication
All BrAPI requests can be made anonymously, without providing the OAuth2
*Bearer: <TOKEN>* authentication header.
All BrAPI requests require OAuth2 authentication header in HTTP requests:
----
Authorization: Bearer <TOKEN>
----
=== Login
Genesys does not support the `/login` endpoint.
Genesys does not support the `/login` endpoint. You must obtain the OAuth access token as described
in Genesys API manual.
=== Logout
......
......@@ -34,7 +34,7 @@ Genesys returns the standard BrAPI Germplasm response:
},
"result": <1> [{
"defaultDisplayName": "DJUG 16",
"germplasmPUI": null,
"germplasmPUI": "10.0000/ABCD*",
"pedigree": null,
"seedSource": null,
"synonyms": ["DJUG 16"],
......
......@@ -3,7 +3,8 @@
== Multi-crop Passport Descriptors
The http://www.bioversityinternational.org/e-library/publications/detail/faobioversity-multi-crop-passport-descriptors-v21-mcpd-v21/[Multi-crop Passport Descriptors (MCPD) V.2.1]
were released in 2012 as an update to the MCPD V.2. The MCPD V.2, in turn, was a 2001 revision of the first FAO/IPGRI publication,
were released in 2015 as an update to the MCPD V.2 from 2012.
The MCPD V.2, in turn, was a 2001 revision of the first FAO/IPGRI publication,
expanded to accommodate emerging needs such as the broader use of GPS tools and the
implementation of the http://www.planttreaty.org[International Treaty on Plant Genetic Resources for
Food and Agriculture] Multilateral System for access and benefit sharing.
......
......@@ -51,6 +51,13 @@ public class MapColorsFilter extends PointFilter {
public int filterRGB(int x, int y, int rgb) {
if (rgb == oldColor) {
return newColor;
} else if (rgb != 0) {
int alpha = (rgb >> 24) & 0xFF; // isolate alpha
alpha &= 0xff; //keeps alpha in 0-255 range
int newRGB = newColor;
newRGB &= 0x00ffffff; //remove old alpha info
newRGB |= (alpha << 24); //add new alpha info
return newRGB;
}
return rgb;
}
......
/*
* Copyright 2017 Global Crop Diversity Trust
*
* 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 org.genesys.catalog.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.genesys.catalog.service.PublishValidationInterface;
import static java.lang.annotation.ElementType.FIELD;
/**
* Fields with this annotation are required fields, they have to be filled
* during publication process. You should implement
* {@link PublishValidationInterface} for parent class. That give you use
* {@link PublishValidationInterface#validation()} for validate before publish.
* And if you want use {@link PublishValidation#innerCheck()} you should
* implement {@link PublishValidationInterface} for child class and override
* {@link PublishValidationInterface#validation()} method.
*
* @author Andrey Lugovskoy.
*/
@Documented
@Target({ FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface PublishValidation {
/**
* If field is object and innerCheck=true than we have to check inner fields.
*
* @return boolean value
*/
boolean innerCheck() default false;
/**
* You should set {@link Boolean#TRUE} for this field to avoid recursive invoke
* {@link PublishValidationInterface#validation()} method if child class has
* link to parent class.
*
* @return boolean value
*/
boolean ignoreValidation() default false;
}
/*
* Copyright 2017 Global Crop Diversity Trust
*
* 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 org.genesys.catalog.annotations;
import java.util.HashMap;
import java.util.Map;
import org.genesys2.server.exception.InvalidApiUsageException;
/**
* The Class PublishValidationException.
*
* @author Andrey Lugovskoy.
*/
public class PublishValidationException extends InvalidApiUsageException {
private static final long serialVersionUID = 3227086532743886389L;
private Map<String, String> errorMap = new HashMap<>();
/**
* Gets the error map.
*
* @return the error map
*/
public Map<String, String> getErrorMap() {
return errorMap;
}
/**
* Adds the error.
*
* @param key the key
* @param value the value
*/
public void addError(final String key, final String value) {
errorMap.put(key, value);
}
/**
* Instantiates a new publish validation exception.
*/
public PublishValidationException() {
super();
}
/**
* Instantiates a new publish validation exception.
*
* @param errorMap the error map
*/
public PublishValidationException