Search in sources :

Example 1 with XFormManifest

use of org.activityinfo.io.xform.manifest.XFormManifest in project activityinfo by bedatadriven.

the class XFormResources method manifest.

@GET
@Path("{id}/manifest")
@Produces(MediaType.TEXT_XML)
public Response manifest(@Context UriInfo uri, @PathParam("id") int id) {
    AuthenticatedUser user = authProvider.get();
    LOGGER.finer("ODK manifest for " + id + " requested by " + user.getEmail() + " (" + user.getId() + ")");
    MediaFile itemSet = new MediaFile();
    itemSet.setFilename("itemsets.csv");
    itemSet.setHash("md5:00000000000000000000000000000000");
    itemSet.setDownloadUrl(uri.getBaseUriBuilder().path(XFormResources.class).path(Integer.toString(id)).path("itemsets.csv").build());
    XFormManifest manifest = new XFormManifest();
    return OpenRosaResponse.build(manifest);
}
Also used : MediaFile(org.activityinfo.io.xform.manifest.MediaFile) XFormManifest(org.activityinfo.io.xform.manifest.XFormManifest) AuthenticatedUser(org.activityinfo.legacy.shared.AuthenticatedUser)

Aggregations

MediaFile (org.activityinfo.io.xform.manifest.MediaFile)1 XFormManifest (org.activityinfo.io.xform.manifest.XFormManifest)1 AuthenticatedUser (org.activityinfo.legacy.shared.AuthenticatedUser)1