public synchronized Response getWadl(@Context UriInfo uriInfo) { try { if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); this.lastModified = new SimpleDateFormat(HTTPDATEFORMAT).format(new Date()); ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, detailedWadl); final Marshaller marshaller = wadlContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
@Produces({"application/xml"}) @GET @Path("{path}") public synchronized Response getExternalGrammar( @Context UriInfo uriInfo, @PathParam("path") String path) { try { // Fail if wadl generation is disabled if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); } ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, WadlUtils.isDetailedWadlRequested(uriInfo)); // Fail is we don't have any metadata for this path ApplicationDescription.ExternalGrammar externalMetadata = applicationDescription.getExternalGrammar(path); if (externalMetadata == null) { return Response.status(Response.Status.NOT_FOUND).build(); } // Return the data return Response.ok().type(externalMetadata.getType()) .entity(externalMetadata.getContent()) .build(); } catch (Exception e) { throw new ProcessingException(LocalizationMessages.ERROR_WADL_RESOURCE_EXTERNAL_GRAMMAR(), e); } }
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo, resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo)); final Marshaller marshaller = wadlApplicationContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo, resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo)); final Marshaller marshaller = wadlApplicationContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
@Produces({"application/xml"}) @GET @Path("{path}") public synchronized Response getExternalGrammar( @Context UriInfo uriInfo, @PathParam("path") String path) { try { // Fail if wadl generation is disabled if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); } ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, WadlUtils.isDetailedWadlRequested(uriInfo)); // Fail is we don't have any metadata for this path ApplicationDescription.ExternalGrammar externalMetadata = applicationDescription.getExternalGrammar(path); if (externalMetadata == null) { return Response.status(Response.Status.NOT_FOUND).build(); } // Return the data return Response.ok().type(externalMetadata.getType()) .entity(externalMetadata.getContent()) .build(); } catch (Exception e) { throw new ProcessingException(LocalizationMessages.ERROR_WADL_RESOURCE_EXTERNAL_GRAMMAR(), e); } }
public synchronized Response getWadl(@Context UriInfo uriInfo) { try { if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); this.lastModified = new SimpleDateFormat(HTTPDATEFORMAT).format(new Date()); ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, detailedWadl); final Marshaller marshaller = wadlContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo, resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo)); final Marshaller marshaller = wadlApplicationContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
@Produces({"application/xml"}) @GET @Path("{path}") public synchronized Response getExternalGrammar( @Context UriInfo uriInfo, @PathParam("path") String path) { try { // Fail if wadl generation is disabled if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); } ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, WadlUtils.isDetailedWadlRequested(uriInfo)); // Fail is we don't have any metadata for this path ApplicationDescription.ExternalGrammar externalMetadata = applicationDescription.getExternalGrammar(path); if (externalMetadata == null) { return Response.status(Response.Status.NOT_FOUND).build(); } // Return the data return Response.ok().type(externalMetadata.getType()) .entity(externalMetadata.getContent()) .build(); } catch (Exception e) { throw new ProcessingException(LocalizationMessages.ERROR_WADL_RESOURCE_EXTERNAL_GRAMMAR(), e); } }
public synchronized Response getWadl(@Context UriInfo uriInfo) { try { if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); this.lastModified = new SimpleDateFormat(HTTPDATEFORMAT).format(new Date()); ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, detailedWadl); final Marshaller marshaller = wadlContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo, resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo)); final Marshaller marshaller = wadlApplicationContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
@Produces({"application/xml"}) @GET @Path("{path}") public synchronized Response getExternalGrammar( @Context UriInfo uriInfo, @PathParam("path") String path) { try { // Fail if wadl generation is disabled if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); } ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, WadlUtils.isDetailedWadlRequested(uriInfo)); // Fail is we don't have any metadata for this path ApplicationDescription.ExternalGrammar externalMetadata = applicationDescription.getExternalGrammar(path); if (externalMetadata == null) { return Response.status(Response.Status.NOT_FOUND).build(); } // Return the data return Response.ok().type(externalMetadata.getType()) .entity(externalMetadata.getContent()) .build(); } catch (Exception e) { throw new ProcessingException(LocalizationMessages.ERROR_WADL_RESOURCE_EXTERNAL_GRAMMAR(), e); } }
public synchronized Response getWadl(@Context UriInfo uriInfo) { try { if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); this.lastModified = new SimpleDateFormat(HTTPDATEFORMAT).format(new Date()); ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, detailedWadl); final Marshaller marshaller = wadlContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo, resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo)); final Marshaller marshaller = wadlApplicationContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
@Produces({"application/xml"}) @GET @Path("{path}") public synchronized Response getExternalGrammar( @Context UriInfo uriInfo, @PathParam("path") String path) { try { // Fail if wadl generation is disabled if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); } ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, WadlUtils.isDetailedWadlRequested(uriInfo)); // Fail is we don't have any metadata for this path ApplicationDescription.ExternalGrammar externalMetadata = applicationDescription.getExternalGrammar(path); if (externalMetadata == null) { return Response.status(Response.Status.NOT_FOUND).build(); } // Return the data return Response.ok().type(externalMetadata.getType()) .entity(externalMetadata.getContent()) .build(); } catch (Exception e) { throw new ProcessingException(LocalizationMessages.ERROR_WADL_RESOURCE_EXTERNAL_GRAMMAR(), e); } }
public synchronized Response getWadl(@Context UriInfo uriInfo) { try { if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); this.lastModified = new SimpleDateFormat(HTTPDATEFORMAT).format(new Date()); ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, detailedWadl); final Marshaller marshaller = wadlContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo, resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo)); final Marshaller marshaller = wadlApplicationContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
@Produces({"application/xml"}) @GET @Path("{path}") public synchronized Response getExternalGrammar( @Context UriInfo uriInfo, @PathParam("path") String path) { try { // Fail if wadl generation is disabled if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); } ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, WadlUtils.isDetailedWadlRequested(uriInfo)); // Fail is we don't have any metadata for this path ApplicationDescription.ExternalGrammar externalMetadata = applicationDescription.getExternalGrammar(path); if (externalMetadata == null) { return Response.status(Response.Status.NOT_FOUND).build(); } // Return the data return Response.ok().type(externalMetadata.getType()) .entity(externalMetadata.getContent()) .build(); } catch (Exception e) { throw new ProcessingException(LocalizationMessages.ERROR_WADL_RESOURCE_EXTERNAL_GRAMMAR(), e); } }
public synchronized Response getWadl(@Context UriInfo uriInfo) { try { if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); this.lastModified = new SimpleDateFormat(HTTPDATEFORMAT).format(new Date()); ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, detailedWadl); final Marshaller marshaller = wadlContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo, resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo)); final Marshaller marshaller = wadlApplicationContext.getJAXBContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ByteArrayOutputStream os = new ByteArrayOutputStream();
@Produces({"application/xml"}) @GET @Path("{path}") public synchronized Response getExternalGrammar( @Context UriInfo uriInfo, @PathParam("path") String path) { try { // Fail if wadl generation is disabled if (!wadlContext.isWadlGenerationEnabled()) { return Response.status(Response.Status.NOT_FOUND).build(); } ApplicationDescription applicationDescription = wadlContext.getApplication(uriInfo, WadlUtils.isDetailedWadlRequested(uriInfo)); // Fail is we don't have any metadata for this path ApplicationDescription.ExternalGrammar externalMetadata = applicationDescription.getExternalGrammar(path); if (externalMetadata == null) { return Response.status(Response.Status.NOT_FOUND).build(); } // Return the data return Response.ok().type(externalMetadata.getType()) .entity(externalMetadata.getContent()) .build(); } catch (Exception e) { throw new ProcessingException(LocalizationMessages.ERROR_WADL_RESOURCE_EXTERNAL_GRAMMAR(), e); } }