Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
rhbz1110627 - add REST endpoint for project config
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Jul 3, 2014
1 parent f3b0e18 commit cf4da90
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Expand Up @@ -31,4 +31,10 @@ public interface IProjectIterationResource extends ProjectIterationResource {
MediaTypes.APPLICATION_ZANATA_PROJECT_ITERATION_JSON,
MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public ClientResponse put(ProjectIteration project);

@GET
@Path("/config")
@Produces({ MediaType.APPLICATION_XML })
@Override
ClientResponse sampleConfiguration();
}
Expand Up @@ -25,6 +25,7 @@
import javax.ws.rs.GET;
import javax.ws.rs.HEAD;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
Expand Down Expand Up @@ -109,4 +110,23 @@ public interface ProjectIterationResource {
MediaTypes.APPLICATION_ZANATA_PROJECT_ITERATION_JSON,
MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response put(ProjectIteration project);

/**
* Get a project iteration's sample general configuration file(zanata.xml).
* Note: this will only be a sample configuration which does not contain any
* customization done on the client side, such as, locale mapping and/or
* command hooks.
*
* @return The following response status codes will be returned from this
* operation:<br>
* OK(200) - Contains the Project iteration config xml. <br>
* NOT FOUND(404) - response, if a Project iteration could not be
* found for the given parameters.<br>
* INTERNAL SERVER ERROR(500) - If there is an unexpected error in
* the server while performing this operation.
*/
@GET
@Path("/config")
@Produces({ MediaType.APPLICATION_XML })
public Response sampleConfiguration();
}

0 comments on commit cf4da90

Please sign in to comment.