@Get public Representation getConfig() { try { String result = "{}"; String name = ( String ) getRequest().getAttributes().get( "name" ); File matchingFile = _service.findResourceConfig(name); if (matchingFile != null) { result = _service.replaceProperties(matchingFile); } setStatus(Status.SUCCESS_OK); return new JsonRepresentation( result ); } catch ( Exception e ) { throw new ResourceException( Status.SERVER_ERROR_INTERNAL, "Unable to get configuration", e ); } } }