Uniformed raised exception
This commit is contained in:
parent
4e091a25de
commit
323fe367e6
|
@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for Resource Registry Context Client
|
||||
|
||||
## [v4.0.1-SNAPSHOT]
|
||||
|
||||
- Uniformed raised exception [#21993]
|
||||
|
||||
## [v4.0.0]
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.information-system</groupId>
|
||||
<artifactId>resource-registry-context-client</artifactId>
|
||||
<version>4.0.0</version>
|
||||
<version>4.0.1-SNAPSHOT</version>
|
||||
<name>Resource Registry Context Client</name>
|
||||
<description>Resource Registry Context Client is a library designed to interact with Resource Registry Context APIs</description>
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ public interface ResourceRegistryContextClient {
|
|||
|
||||
public Context readCurrentContext() throws ContextNotFoundException, ResourceRegistryException;
|
||||
|
||||
public Context update(Context context) throws ResourceRegistryException;
|
||||
public Context update(Context context) throws ContextNotFoundException, ResourceRegistryException;
|
||||
|
||||
public String update(String context) throws ResourceRegistryException;
|
||||
public String update(String context) throws ContextNotFoundException, ResourceRegistryException;
|
||||
|
||||
public boolean delete(Context context) throws ContextNotFoundException, ResourceRegistryException;
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ public class ResourceRegistryContextClientImpl implements ResourceRegistryContex
|
|||
}
|
||||
}
|
||||
|
||||
public String internalUpdate(Context context) throws ResourceRegistryException {
|
||||
public String internalUpdate(Context context) throws ContextNotFoundException, ResourceRegistryException {
|
||||
try {
|
||||
String contextString = ElementMapper.marshal(context);
|
||||
logger.trace("Going to update {}", contextString);
|
||||
|
@ -244,7 +244,7 @@ public class ResourceRegistryContextClientImpl implements ResourceRegistryContex
|
|||
}
|
||||
|
||||
@Override
|
||||
public Context update(Context context) throws ResourceRegistryException {
|
||||
public Context update(Context context) throws ContextNotFoundException, ResourceRegistryException {
|
||||
try {
|
||||
String res = internalUpdate(context);
|
||||
return ElementMapper.unmarshal(Context.class, res);
|
||||
|
@ -258,7 +258,7 @@ public class ResourceRegistryContextClientImpl implements ResourceRegistryContex
|
|||
}
|
||||
|
||||
@Override
|
||||
public String update(String context) throws ResourceRegistryException {
|
||||
public String update(String context) throws ContextNotFoundException, ResourceRegistryException {
|
||||
try {
|
||||
Context c = ElementMapper.unmarshal(Context.class, context);
|
||||
return internalUpdate(c);
|
||||
|
|
Loading…
Reference in New Issue