class MetadataResource {

	@POST
	@Produces(MediaType.APPLICATION_JSON)
	@ConfiguredRolesAllowed(ConfiguredRolesAllowedDynamicFeature.CCH_ADMIN_USER_PROP)
	public Response getMetadata(@Context HttpServletRequest req, @FormDataParam("file") String postBody) {
		ParsedMetadata result = MetadataUtil.parseMetadataXmlFile(postBody);

		if(result != null) {
			return Response.ok(GsonUtil.getDefault().toJson(result)).build();
		}
		return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR).build();
	}

}