예제 #1
0
 @POST
 @Path(PATH_RELATIONSHIP_EXTENSION_METHOD)
 public Response invokeRelationshipExtension(
     @PathParam("name") String name,
     @PathParam("method") String method,
     @PathParam("relationshipId") long relationshipId,
     String data) {
   try {
     return output.ok(
         this.invokeRelationshipExtension(
             relationshipId, name, method, input.readParameterList(data)));
   } catch (RelationshipNotFoundException e) {
     return output.notFound(e);
   } catch (BadInputException e) {
     return output.badRequest(e);
   } catch (PluginLookupException e) {
     return output.notFound(e);
   } catch (BadPluginInvocationException e) {
     return output.badRequest(e.getCause());
   } catch (PluginInvocationFailureException e) {
     return output.serverError(e.getCause());
   } catch (Exception e) {
     return output.serverError(e.getCause());
   }
 }
예제 #2
0
 @POST
 @Path(PATH_GRAPHDB_EXTENSION_METHOD)
 public Response invokeGraphDatabaseExtension(
     @PathParam("name") String name, @PathParam("method") String method, String data) {
   try {
     return output.ok(
         this.invokeGraphDatabaseExtension(name, method, input.readParameterList(data)));
   } catch (BadInputException e) {
     return output.badRequest(e);
   } catch (PluginLookupException e) {
     return output.notFound(e);
   } catch (BadPluginInvocationException e) {
     return output.badRequest(e.getCause());
   } catch (SyntaxException e) {
     return output.badRequest(e.getCause());
   } catch (PluginInvocationFailureException e) {
     return output.serverError(e.getCause());
   } catch (Exception e) {
     return output.serverError(e);
   }
 }