@GET @Produces(MediaType.TEXT_PLAIN) public String get(@MatrixParam("m") final String m, @QueryParam("q") final String q) { return String.format("p=%s, m=%s, q=%s", p, m, q); } }
@GET @Path("srm/{p}") @Produces(MediaType.TEXT_PLAIN) public String get(@PathParam("p") final String p, @MatrixParam("m") final String m, @QueryParam("q") final String q) { return String.format("p=%s, m=%s, q=%s", p, m, q); } }
/** * Sign up new user directly with request/confirm process * * @param sessionId Current user session Id * @param user User request to sign up * @param type Type of user to sign up * @return Operation result */ @POST @Path( "/{sessionId}/signUp" ) UserOperationResult signUp( @PathParam( "sessionId" ) String sessionId, User user, @MatrixParam( "type" ) @DefaultValue( "LOCAL" ) UserType type );
@GET @Path(__DAGS + "{dag}" + _JOURNAL) @Produces(TEXT_PLAIN) public String rebuildJournalDag_GET_TEXT_PLAIN( final @PathParam("dag") String dagkey, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope) throws Exception { return rebuildJournalDagBus_GET_TEXT_PLAIN(dagkey, scope); } @GET
@DELETE @Path(__DAGS + "{dag}" + __SUBS + "{sub}") @Produces(APPLICATION_JSON) public Response rebuildCancelDagSubDELETE( final @PathParam("dag") String dagkey, final @PathParam("sub") String subkey, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope) throws Exception { return rebuildCancelDagSubBusDELETE(dagkey, scope, subkey); } @DELETE
@DELETE @Path(__DAGS + "{dag}") @Produces(APPLICATION_JSON) public Response rebuildCancelDagDELETE( final @PathParam("dag") String dagkey, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope) throws Exception { return rebuildCancelDagSubBusDELETE(dagkey, scope, null); } @DELETE
@GET @Path(__DAGS + "{dag}" + __NODES + "{node}" + __STATES) @Produces(APPLICATION_JSON) public NodeState dagNodeStateGET_JSONfinal (final @PathParam("dag") String dagkey, final @PathParam("node") String nodename, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope) throws Exception { return dagNodeStateGET_JSONfinal(dagkey, scope, nodename); } @GET
/** * @deprecated since 10.3, use {@link BulkActionFrameworkObject BAF} instead */ @Path("bulk") @Deprecated public Object getBulkDocuments(@MatrixParam("id") List<String> ids) { return getBulkDocuments(this, ids); }
@PATCH @Path(__DAGS + "{dag}" + __SUBS + "{sub}") @Produces(APPLICATION_JSON) public Response rebuildDagSub_PATCH( final @PathParam("dag") String dagkey, final @PathParam("sub") String subkey, final @QueryParam("onlyThisNodeAndSuccessors") String onlyThisNodeAndSuccessors, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope) throws Exception { return rebuildDagBusSub_PATCH(dagkey, scope, subkey, onlyThisNodeAndSuccessors); } @PATCH
@PATCH @Path(__DAGS + "{dag}") @Produces(APPLICATION_JSON) public Response rebuildDag_PATCH( final @PathParam("dag") String dagkey, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope, final @QueryParam("onlyThisNodeAndSuccessors") String onlyThisNodeAndSuccessors) throws Exception { return rebuildDagBusSub_PATCH(dagkey, scope, null, onlyThisNodeAndSuccessors); } @PATCH
@PATCH @Path(__DAGS + "{dag}" + __NODES + "{node}" + __EVENTS + "{event}") @Consumes(TEXT_PLAIN) @Produces(APPLICATION_JSON) public Response dagNodeEventSendPATCH( final String cleanerId, final @PathParam("dag") String dagkey, final @PathParam("node") String node, final @PathParam("event") BusEvent.Type eventType, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope) { return dagNodeEventBusSendPATCH(cleanerId, dagkey, scope, node, eventType); } @PATCH
@PATCH @Path(__DAGS + "{dag}" + __NODES + "{node}") @Produces(APPLICATION_JSON) public Response dagNodeCleanPOST( final @PathParam("dag") String dagkey, final @PathParam("node") String node, final @MatrixParam("bus") @DefaultValue("JOB") Scope scope) throws Exception { return dagNodeCleanBusPOST( dagkey, scope, node); } @PATCH
@GET @Path("/segment/matrix") public Book getBookByMatrixParams(@MatrixParam("first") String s1, @MatrixParam("second") String s2) throws Exception { return doGetBook(s1 + s2); }
@GET @Path("/segment/matrix-middle") public Book getBookByMatrixParamsMiddle(@MatrixParam("first") String s1, @MatrixParam("second") String s2) throws Exception { return doGetBook(s1 + s2); }
@POST @Path("/subresource2/{n1:.*}") @Consumes("text/plain") @Produces("application/xml") Book getTheBook2(@PathParam("n1") String name1, @QueryParam("n2") String name2, @MatrixParam("n3") String name3, @MatrixParam("n33") String name33, @HeaderParam("N4") String name4, @CookieParam("n5") String name5, String name6) throws BookNotFoundFault;
@POST @Path("/subresource4/{id}/{name}") @Produces("application/xml") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) Book getTheBook4(@PathParam("") Book bookPath, @QueryParam("") Book bookQuery, @MatrixParam("") Book matrixBook, @FormParam("") Book formBook) throws BookNotFoundFault;
@GET @Path("/semicolon2{id}") @Produces("application/xml") public Book getBookWithSemicolnAndMatrixParam(@PathParam("id") String name, @MatrixParam("a") String matrixParam) { return new Book(name + matrixParam, 333L); }
@GET @Path("/segment/matrix-list") public Book getBookByMatrixListParams(@MatrixParam("first") List<String> list) throws Exception { if (list.size() != 2) { throw new RuntimeException(); } return doGetBook(list.get(0) + list.get(1)); }
@GET public Book getDefaultBook(@MatrixParam("a") String a) { return new Book("Default" + (a == null ? "" : a), 123L); } @GET
@GET @Path("books/xslt/{id}") @Produces({"text/html", "application/xhtml+xml", "application/xml" }) public Book getBookXSLT(@PathParam("id") long id, @QueryParam("name") String name, @MatrixParam("name2") String name2) { // how to have Book2 populated ? Book b = new Book(); b.setId(999); b.setName("CXF in "); return b; }