Skip to content

Commit

Permalink
does order matter for jax-rs resources?
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Mar 14, 2013
1 parent b22a74c commit ff0e6d6
Showing 1 changed file with 9 additions and 8 deletions.
Expand Up @@ -80,11 +80,11 @@ public Response describeModeshape() throws JsonGenerationException,
session.logout();
return ok(repoproperties.build().toString()).build();
}

@GET
@Path("/describe")
@Produces(TEXT_HTML)
public String describeHtml() throws LoginException,
@Produces({TEXT_XML, APPLICATION_JSON})
public DescribeRepository describe() throws LoginException,
RepositoryException {

Session session = repo.login();
Expand All @@ -97,14 +97,14 @@ public String describeHtml() throws LoginException,
description.numberOfObjects =
session.getNode("/objects").getNodes().getSize();
session.logout();
VelocityViewer view = new VelocityViewer();
return view.getRepoInfo(description);
return description;
}


@GET
@Path("/describe")
@Produces({TEXT_XML, APPLICATION_JSON})
public DescribeRepository describe() throws LoginException,
@Produces(TEXT_HTML)
public String describeHtml() throws LoginException,
RepositoryException {

Session session = repo.login();
Expand All @@ -117,7 +117,8 @@ public DescribeRepository describe() throws LoginException,
description.numberOfObjects =
session.getNode("/objects").getNodes().getSize();
session.logout();
return description;
VelocityViewer view = new VelocityViewer();
return view.getRepoInfo(description);
}

}

0 comments on commit ff0e6d6

Please sign in to comment.