Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
Java Client API
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Genesys PGR
Java Client API
Commits
665b3e16
Commit
665b3e16
authored
Nov 20, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[maven-release-plugin] prepare release genesys-client-api-1.3
parent
96dc2037
Pipeline
#7727
failed with stage
in 32 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
139 deletions
+168
-139
CHANGELOG.md
CHANGELOG.md
+12
-2
README.md
README.md
+2
-2
pom.xml
pom.xml
+2
-2
src/main/java/org/genesys2/client/oauth/GenesysClient.java
src/main/java/org/genesys2/client/oauth/GenesysClient.java
+152
-133
No files found.
CHANGELOG.md
View file @
665b3e16
# Genesys Client API changelog
## Release 1.3
November 2018.
Minor updates to the Genesys client library:
-
96dc203 Retry on Gateway timeout response
-
39f2a0a Support blank OAuth client secret
-
2d6c53c Support for Password grant (username+password combo)
## Release 1.2
October 2017
-
4aeb301 Logging
-
4c12425 Upgraded to scribe-java:4.2.0
-
4aeb301 Logging
-
4c12425 Upgraded to scribe-java:4.2.0
README.md
View file @
665b3e16
...
...
@@ -92,7 +92,7 @@ try {
<dependency>
<groupId>
org.genesys-pgr
</groupId>
<artifactId>
genesys-client-api
</artifactId>
<version>
1.
2
</version>
<version>
1.
3
</version>
</dependency>
```
...
...
@@ -102,7 +102,7 @@ Or for the development version:
<dependency>
<groupId>
org.genesys-pgr
</groupId>
<artifactId>
genesys-client-api
</artifactId>
<version>
1.
3
-SNAPSHOT
</version>
<version>
1.
4
-SNAPSHOT
</version>
</dependency>
```
...
...
pom.xml
View file @
665b3e16
...
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.genesys-pgr
</groupId>
<artifactId>
genesys-client-api
</artifactId>
<version>
1.3
-SNAPSHOT
</version>
<version>
1.3
</version>
<name>
Genesys API client library
</name>
<packaging>
jar
</packaging>
<url>
https://bitbucket.org/genesys2/genesys-client-api
</url>
...
...
@@ -20,7 +20,7 @@
<connection>
https://bitbucket.org/genesys2/genesys-client-api.git
</connection>
<developerConnection>
scm:git:git@bitbucket.org:genesys2/genesys-client-api.git
</developerConnection>
<url>
git@bitbucket.org:genesys2/genesys-client-api.git
</url>
<tag>
HEAD
</tag>
<tag>
genesys-client-api-1.3
</tag>
</scm>
<developers>
...
...
src/main/java/org/genesys2/client/oauth/GenesysClient.java
View file @
665b3e16
...
...
@@ -89,6 +89,12 @@ public class GenesysClient {
/**
* Instantiates a new genesys client.
*
* @param baseUrl the base url
* @param clientId the client id
* @param clientSecret the client secret
* @param callbackUrl the callback url
* @param scope the scope
*/
public
GenesysClient
(
final
String
baseUrl
,
final
String
clientId
,
final
String
clientSecret
,
final
String
callbackUrl
,
String
scope
)
{
this
.
baseUrl
=
baseUrl
;
...
...
@@ -103,6 +109,7 @@ public class GenesysClient {
* Load client configuration from {@link Properties}.
*
* @param properties the properties
* @return the genesys client
*/
public
static
GenesysClient
build
(
final
Properties
properties
)
{
...
...
@@ -117,6 +124,11 @@ public class GenesysClient {
properties
.
getProperty
(
"client.scope"
));
}
/**
* Gets the authorization url.
*
* @return the authorization url
*/
public
String
getAuthorizationUrl
()
{
return
service
.
getAuthorizationUrl
();
}
...
...
@@ -144,9 +156,9 @@ public class GenesysClient {
*
* @param url the url
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
query
(
final
String
url
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
GET
,
url
,
null
,
null
);
...
...
@@ -158,9 +170,9 @@ public class GenesysClient {
* @param method the HTTP method
* @param url the url
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
query
(
final
Verb
method
,
final
String
url
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
method
,
url
,
null
,
null
);
...
...
@@ -174,10 +186,10 @@ public class GenesysClient {
* @param queryString the query string
* @param postBody the post body
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws HttpRedirectException the http redirect exception
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
query
(
final
Verb
method
,
final
String
url
,
final
Map
<
String
,
String
>
queryString
,
final
String
postBody
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
HttpRedirectException
,
GenesysApiException
{
...
...
@@ -298,7 +310,7 @@ public class GenesysClient {
/**
* Refresh accessToken with refreshToken.
*
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
*/
public
void
refreshAccessToken
()
throws
GenesysApiException
{
if
(
tokens
.
hasRefreshToken
())
{
...
...
@@ -324,7 +336,7 @@ public class GenesysClient {
* @param acceNumb the acce numb
* @param genus the genus
* @return the string
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
accessionExists
(
final
String
instCode
,
final
String
acceNumb
,
final
String
genus
)
throws
GenesysApiException
{
...
...
@@ -361,8 +373,8 @@ public class GenesysClient {
* @param instCode the inst code
* @param accns the accns
* @return the string
* @throws GenesysApiException the
genesys api
exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
Genesys API
exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws JsonProcessingException the json processing exception
* @deprecated Please use {@link #updateAccessions(String, Collection)} with only the instCode,
* acceNumb, (genus, ) and mlsStat provided.
...
...
@@ -411,7 +423,7 @@ public class GenesysClient {
* @param instCode the inst code
* @param accns the accns
* @return the string
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
* @throws InterruptedException the interrupted exception
* @throws JsonProcessingException the json processing exception
*/
...
...
@@ -444,7 +456,7 @@ public class GenesysClient {
* @param organizationSlug the organization slug
* @param institutes the institutes
* @return the string
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
updateOrganizationMembers
(
final
String
organizationSlug
,
final
ArrayNode
institutes
)
throws
GenesysApiException
{
LOG
.
debug
(
"Sending: {}"
,
institutes
);
...
...
@@ -467,7 +479,7 @@ public class GenesysClient {
* @param instCode the inst code
* @param batch the batch
* @return the string
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
updateAccessionNames
(
final
String
instCode
,
final
Collection
<
ObjectNode
>
batch
)
throws
GenesysApiException
{
LOG
.
debug
(
"Sending: {}"
,
batch
);
...
...
@@ -491,7 +503,7 @@ public class GenesysClient {
* @param instCode the inst code
* @param array the array
* @return the string
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
*
* @deprecated Use {@link #deleteAccessionsByName(String, String)}
*/
...
...
@@ -506,7 +518,7 @@ public class GenesysClient {
* @param instCode the inst code
* @param jsonAccessionId3List the json accession id3 list
* @return the string
* @throws GenesysApiException the
genesys api
exception
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
deleteAccessionsByName
(
final
String
instCode
,
final
String
jsonAccessionId3List
)
throws
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/acn/"
+
instCode
+
"/delete-named"
,
null
,
jsonAccessionId3List
);
...
...
@@ -518,9 +530,9 @@ public class GenesysClient {
* @param instCode the inst code
* @param ids the ids
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*
* @deprecated Use
*/
...
...
@@ -535,15 +547,22 @@ public class GenesysClient {
* @param instCode the inst code
* @param jsonAccessionIdList the json accession id list
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
deleteAccessionsByGenesysId
(
final
String
instCode
,
final
String
jsonAccessionIdList
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/acn/"
+
instCode
+
"/delete"
,
null
,
jsonAccessionIdList
);
}
/**
* Authenticate.
*
* @param uname the uname
* @param password the password
* @throws OAuthAuthenticationException when authentication fails
*/
public
void
authenticate
(
String
uname
,
String
password
)
throws
OAuthAuthenticationException
{
try
{
OAuth2AccessToken
accessToken
=
service
.
getAccessTokenPasswordGrant
(
uname
,
password
);
...
...
@@ -566,7 +585,7 @@ public class GenesysClient {
* Obtain access and refresh tokens with verifier code.
*
* @param verifierCode the verifier code
* @throws OAuthAuthenticationException
* @throws OAuthAuthenticationException
when authentication fails
*/
public
void
authenticate
(
final
String
verifierCode
)
throws
OAuthAuthenticationException
{
try
{
...
...
@@ -590,9 +609,9 @@ public class GenesysClient {
* Me.
*
* @return the string
* @throws OAuthAuthenticationException
the o auth authentication exception
* @throws PleaseRetryException
the please retry exceptio
n
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException
when authentication fails
* @throws PleaseRetryException
exception indicating the call should be attempted agai
n
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
me
()
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/me"
);
...
...
@@ -603,9 +622,9 @@ public class GenesysClient {
*
* @param shortName the short name
* @return the crop
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getCrop
(
final
String
shortName
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
if
(!
shortName
.
matches
(
"^\\w+$"
))
{
...
...
@@ -618,9 +637,9 @@ public class GenesysClient {
* List parameters.
*
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
listParameters
()
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/kpi/parameter/list"
);
...
...
@@ -631,9 +650,9 @@ public class GenesysClient {
*
* @param node the node
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
putParameter
(
final
ObjectNode
node
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/kpi/parameter"
,
null
,
node
.
toString
());
...
...
@@ -644,9 +663,9 @@ public class GenesysClient {
*
* @param name the name
* @return the parameter
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getParameter
(
final
String
name
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/kpi/parameter/"
+
name
);
...
...
@@ -656,9 +675,9 @@ public class GenesysClient {
* List dimensions.
*
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
listDimensions
()
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/kpi/dimension/list"
);
...
...
@@ -669,9 +688,9 @@ public class GenesysClient {
*
* @param id the id
* @return the dimension
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getDimension
(
final
long
id
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/kpi/dimension/"
+
id
);
...
...
@@ -682,9 +701,9 @@ public class GenesysClient {
*
* @param node the node
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
putDimension
(
final
ObjectNode
node
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/kpi/dimension"
,
null
,
node
.
toString
());
...
...
@@ -694,9 +713,9 @@ public class GenesysClient {
* List executions.
*
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
listExecutions
()
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/kpi/execution/list"
);
...
...
@@ -707,9 +726,9 @@ public class GenesysClient {
*
* @param name the name
* @return the execution
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getExecution
(
final
String
name
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/kpi/execution/"
+
name
);
...
...
@@ -720,9 +739,9 @@ public class GenesysClient {
*
* @param node the node
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
putExecution
(
final
ObjectNode
node
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/kpi/execution"
,
null
,
node
.
toString
());
...
...
@@ -733,9 +752,9 @@ public class GenesysClient {
*
* @param name the name
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
kpiExecute
(
final
String
name
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/kpi/execution/"
+
name
+
"/execute"
,
null
,
null
);
...
...
@@ -746,9 +765,9 @@ public class GenesysClient {
*
* @param id the id
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
deleteDimension
(
final
long
id
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
DELETE
,
"/kpi/dimension/"
+
id
,
null
,
null
);
...
...
@@ -759,9 +778,9 @@ public class GenesysClient {
*
* @param name the name
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
deleteExecution
(
final
String
name
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
DELETE
,
"/kpi/execution/"
+
name
,
null
,
null
);
...
...
@@ -772,9 +791,9 @@ public class GenesysClient {
*
* @param name the name
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
deleteParameter
(
final
String
name
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
DELETE
,
"/kpi/parameter/"
+
name
,
null
,
null
);
...
...
@@ -784,9 +803,9 @@ public class GenesysClient {
* List crops.
*
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
listCrops
()
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/crops"
);
...
...
@@ -797,9 +816,9 @@ public class GenesysClient {
*
* @param node the node
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
putCrop
(
final
ObjectNode
node
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/crops"
,
null
,
node
.
toString
());
...
...
@@ -810,9 +829,9 @@ public class GenesysClient {
*
* @param shortName the short name
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
deleteCrop
(
final
String
shortName
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
DELETE
,
"/crops/"
+
shortName
,
null
,
null
);
...
...
@@ -823,9 +842,9 @@ public class GenesysClient {
*
* @param shortName the short name
* @return the crop rules
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getCropRules
(
final
String
shortName
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/crops/"
+
shortName
+
"/rules"
);
...
...
@@ -837,9 +856,9 @@ public class GenesysClient {
* @param shortName the short name
* @param currentCropRules the current crop rules
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
putCropRules
(
final
String
shortName
,
final
ArrayNode
currentCropRules
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
PUT
,
"/crops/"
+
shortName
+
"/rules"
,
null
,
currentCropRules
.
toString
());
...
...
@@ -849,9 +868,9 @@ public class GenesysClient {
* Rebuild crop taxa.
*
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
rebuildCropTaxa
()
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/crops/rebuild"
,
null
,
null
);
...
...
@@ -862,9 +881,9 @@ public class GenesysClient {
*
* @param shortName the short name
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
rebuildCropTaxa
(
final
String
shortName
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/crops/"
+
shortName
+
"/rebuild"
,
null
,
null
);
...
...
@@ -875,9 +894,9 @@ public class GenesysClient {
*
* @param page the page
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
listOrganizations
(
final
int
page
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
final
Map
<
String
,
String
>
qs
=
new
HashMap
<
String
,
String
>();
...
...
@@ -890,9 +909,9 @@ public class GenesysClient {
*
* @param slug the slug
* @return the organization
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getOrganization
(
final
String
slug
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/org/"
+
slug
);
...
...
@@ -903,9 +922,9 @@ public class GenesysClient {
*
* @param org the org
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
updateOrganization
(
final
ObjectNode
org
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
POST
,
"/org"
,
null
,
org
.
toString
());
...
...
@@ -916,9 +935,9 @@ public class GenesysClient {
*
* @param slug the slug
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
deleteOrganization
(
final
String
slug
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
DELETE
,
"/org/"
+
slug
,
null
,
null
);
...
...
@@ -929,9 +948,9 @@ public class GenesysClient {
*
* @param slug the slug
* @return the organization members
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getOrganizationMembers
(
final
String
slug
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/org/"
+
slug
+
"/institutes"
);
...
...
@@ -943,9 +962,9 @@ public class GenesysClient {
* @param slug the slug
* @param currentMembers the current members
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
putOrganizationMembers
(
final
String
slug
,
final
ArrayNode
currentMembers
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
Verb
.
PUT
,
"/org/"
+
slug
+
"/set-institutes"
,
null
,
currentMembers
.
toString
());
...
...
@@ -957,9 +976,9 @@ public class GenesysClient {
* @param slug the slug
* @param language the language
* @return the organization blurp
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception
*/
public
String
getOrganizationBlurp
(
final
String
slug
,
final
String
language
)
throws
OAuthAuthenticationException
,
PleaseRetryException
,
GenesysApiException
{
return
query
(
"/org/"
+
slug
+
"/blurp/"
+
language
);
...
...
@@ -971,9 +990,9 @@ public class GenesysClient {
* @param slug the slug
* @param blurp the blurp
* @return the string
* @throws OAuthAuthenticationException
the o auth
authentication exception
* @throws PleaseRetryException
the please retry exception
* @throws GenesysApiException the
genesys api
exception
* @throws OAuthAuthenticationException authentication exception
* @throws PleaseRetryException
exception indicating the call shold be re-attempted
* @throws GenesysApiException the
Genesys API
exception