Search in sources :

Example 1 with GraphInventoryUriComputationException

use of org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException in project so by onap.

the class HttpLookupUri method build.

@Override
public URI build() {
    try {
        if (this.values.length == 1) {
            String uri = getObjectById(this.values[0]);
            Map<String, String> map = super.getURIKeys(uri);
            this.values = map.values().toArray(values);
            return super.build(values);
        }
    } catch (GraphInventoryUriNotFoundException | GraphInventoryPayloadException e) {
        throw new GraphInventoryUriComputationException(e);
    }
    return super.build();
}
Also used : GraphInventoryUriNotFoundException(org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriNotFoundException) GraphInventoryUriComputationException(org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException) GraphInventoryPayloadException(org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryPayloadException)

Example 2 with GraphInventoryUriComputationException

use of org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException in project so by onap.

the class HttpLookupUri method locateAndBuild.

@Override
public URI locateAndBuild() {
    try {
        if (this.values.length == 1) {
            String uri = getObjectById(this.values[0]);
            Map<String, String> map = super.getURIKeys(uri);
            this.values = map.values().toArray(values);
            return super.build(values);
        }
    } catch (GraphInventoryUriNotFoundException | GraphInventoryPayloadException e) {
        throw new GraphInventoryUriComputationException(e);
    }
    return super.build();
}
Also used : GraphInventoryUriNotFoundException(org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriNotFoundException) GraphInventoryUriComputationException(org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException) GraphInventoryPayloadException(org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryPayloadException)

Aggregations

GraphInventoryPayloadException (org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryPayloadException)2 GraphInventoryUriComputationException (org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException)2 GraphInventoryUriNotFoundException (org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriNotFoundException)2