@Override public com.sun.research.ws.wadl.Method createMethod( org.glassfish.jersey.server.model.Resource r, final ResourceMethod m) { com.sun.research.ws.wadl.Method wadlMethod = new com.sun.research.ws.wadl.Method(); wadlMethod.setName(m.getHttpMethod()); wadlMethod.setId(m.getInvocable().getDefinitionMethod().getName()); if (m.isExtended()) { wadlMethod.getAny().add(WadlApplicationContextImpl.EXTENDED_ELEMENT); } return wadlMethod; }
/** * @param resource Jersey resource component. * @param resourceMethod resource method. * @return the enhanced {@link com.sun.research.ws.wadl.Method}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createMethod(org.glassfish.jersey.server.model.Resource, * org.glassfish.jersey.server.model.ResourceMethod) */ public Method createMethod(final org.glassfish.jersey.server.model.Resource resource, final ResourceMethod resourceMethod) { final Method result = delegate.createMethod(resource, resourceMethod); final java.lang.reflect.Method method = resourceMethod.getInvocable().getDefinitionMethod(); final MethodDocType methodDoc = resourceDoc.getMethodDoc(method.getDeclaringClass(), method); if (methodDoc != null && !isEmpty(methodDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(methodDoc.getCommentText()); // doc.getOtherAttributes().put( new QName( "xmlns" ), "http://www.w3.org/1999/xhtml" ); result.getDoc().add(doc); } return result; }
private com.sun.research.ws.wadl.Method generateMethod(AbstractResource r, final Map<String, Param> wadlResourceParams, final AbstractResourceMethod m) { com.sun.research.ws.wadl.Method wadlMethod = _wadlGenerator.createMethod(r, m); // generate the request part Request wadlRequest = generateRequest(r, m, wadlResourceParams); if (wadlRequest != null) { wadlMethod.setRequest(wadlRequest); } // generate the response part final List<Response> responses = generateResponses(r, m); if(responses != null) { wadlMethod.getResponse().addAll(responses); } return wadlMethod; }
@Override public com.sun.research.ws.wadl.Method createMethod( AbstractResource r, final AbstractResourceMethod m ) { com.sun.research.ws.wadl.Method wadlMethod = new com.sun.research.ws.wadl.Method(); wadlMethod.setName(m.getHttpMethod()); wadlMethod.setId( m.getMethod().getName() ); return wadlMethod; }
/** * Create an instance of {@link Method } * */ public Method createMethod() { return new Method(); }
@Override public com.sun.research.ws.wadl.Method createMethod( AbstractResource r, final AbstractResourceMethod m ) { com.sun.research.ws.wadl.Method wadlMethod = new com.sun.research.ws.wadl.Method(); wadlMethod.setName(m.getHttpMethod()); wadlMethod.setId( m.getMethod().getName() ); return wadlMethod; }
/** * Create an instance of {@link Method } * */ public Method createMethod() { return new Method(); }
@Override public com.sun.research.ws.wadl.Method createMethod( org.glassfish.jersey.server.model.Resource r, final ResourceMethod m) { com.sun.research.ws.wadl.Method wadlMethod = new com.sun.research.ws.wadl.Method(); wadlMethod.setName(m.getHttpMethod()); wadlMethod.setId(m.getInvocable().getDefinitionMethod().getName()); if (m.isExtended()) { wadlMethod.getAny().add(WadlApplicationContextImpl.EXTENDED_ELEMENT); } return wadlMethod; }
private com.sun.research.ws.wadl.Method generateMethod( final org.glassfish.jersey.server.model.Resource parentResource, final Map<String, Param> wadlResourceParams, final org.glassfish.jersey.server.model.ResourceMethod resourceMethod) { try { if (!detailedWadl && resourceMethod.isExtended()) { return null; } com.sun.research.ws.wadl.Method wadlMethod = _wadlGenerator.createMethod(parentResource, resourceMethod); // generate the request part Request wadlRequest = generateRequest(parentResource, resourceMethod, wadlResourceParams); if (wadlRequest != null) { wadlMethod.setRequest(wadlRequest); } // generate the response part final List<Response> responses = generateResponses(parentResource, resourceMethod); if (responses != null) { wadlMethod.getResponse().addAll(responses); } return wadlMethod; } catch (Exception e) { throw new ProcessingException( LocalizationMessages.ERROR_WADL_BUILDER_GENERATION_METHOD(resourceMethod, parentResource), e); } }
@Override public com.sun.research.ws.wadl.Method createMethod( AbstractResource r, final AbstractResourceMethod m ) { com.sun.research.ws.wadl.Method wadlMethod = new com.sun.research.ws.wadl.Method(); wadlMethod.setName(m.getHttpMethod()); wadlMethod.setId( m.getMethod().getName() ); return wadlMethod; }
/** * @param resource Jersey resource component. * @param resourceMethod resource method. * @return the enhanced {@link com.sun.research.ws.wadl.Method}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createMethod(org.glassfish.jersey.server.model.Resource, * org.glassfish.jersey.server.model.ResourceMethod) */ public Method createMethod(final org.glassfish.jersey.server.model.Resource resource, final ResourceMethod resourceMethod) { final Method result = delegate.createMethod(resource, resourceMethod); final java.lang.reflect.Method method = resourceMethod.getInvocable().getDefinitionMethod(); final MethodDocType methodDoc = resourceDoc.getMethodDoc(method.getDeclaringClass(), method); if (methodDoc != null && !isEmpty(methodDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(methodDoc.getCommentText()); // doc.getOtherAttributes().put( new QName( "xmlns" ), "http://www.w3.org/1999/xhtml" ); result.getDoc().add(doc); } return result; }
/** * Create an instance of {@link Method } * */ public Method createMethod() { return new Method(); }
@Override public com.sun.research.ws.wadl.Method createMethod( org.glassfish.jersey.server.model.Resource r, final ResourceMethod m) { com.sun.research.ws.wadl.Method wadlMethod = new com.sun.research.ws.wadl.Method(); wadlMethod.setName(m.getHttpMethod()); wadlMethod.setId(m.getInvocable().getDefinitionMethod().getName()); if (m.isExtended()) { wadlMethod.getAny().add(WadlApplicationContextImpl.EXTENDED_ELEMENT); } return wadlMethod; }
private com.sun.research.ws.wadl.Method generateMethod( final org.glassfish.jersey.server.model.Resource parentResource, final Map<String, Param> wadlResourceParams, final org.glassfish.jersey.server.model.ResourceMethod resourceMethod) { try { if (!detailedWadl && resourceMethod.isExtended()) { return null; } com.sun.research.ws.wadl.Method wadlMethod = _wadlGenerator.createMethod(parentResource, resourceMethod); // generate the request part Request wadlRequest = generateRequest(parentResource, resourceMethod, wadlResourceParams); if (wadlRequest != null) { wadlMethod.setRequest(wadlRequest); } // generate the response part final List<Response> responses = generateResponses(parentResource, resourceMethod); if (responses != null) { wadlMethod.getResponse().addAll(responses); } return wadlMethod; } catch (Exception e) { throw new ProcessingException( LocalizationMessages.ERROR_WADL_BUILDER_GENERATION_METHOD(resourceMethod, parentResource), e); } }
/** * @param r * @param m * @return the enhanced {@link Method} * @see com.sun.jersey.server.wadl.WadlGenerator#createMethod(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractResourceMethod) */ public Method createMethod( AbstractResource r, AbstractResourceMethod m ) { final Method result = _delegate.createMethod( r, m ); final MethodDocType methodDoc = resourceDoc.getMethodDoc( r.getResourceClass(), m.getMethod() ); if ( methodDoc != null && !isEmpty( methodDoc.getCommentText() ) ) { final Doc doc = new Doc(); doc.getContent().add( methodDoc.getCommentText() ); // doc.getOtherAttributes().put( new QName( "xmlns" ), "http://www.w3.org/1999/xhtml" ); result.getDoc().add( doc ); } return result; }
/** * Create an instance of {@link Method } * */ public Method createMethod() { return new Method(); }
@Override public com.sun.research.ws.wadl.Method createMethod( org.glassfish.jersey.server.model.Resource r, final ResourceMethod m) { com.sun.research.ws.wadl.Method wadlMethod = new com.sun.research.ws.wadl.Method(); wadlMethod.setName(m.getHttpMethod()); wadlMethod.setId(m.getInvocable().getDefinitionMethod().getName()); if (m.isExtended()) { wadlMethod.getAny().add(WadlApplicationContextImpl.EXTENDED_ELEMENT); } return wadlMethod; }
private com.sun.research.ws.wadl.Method generateMethod( final org.glassfish.jersey.server.model.Resource parentResource, final Map<String, Param> wadlResourceParams, final org.glassfish.jersey.server.model.ResourceMethod resourceMethod) { try { if (!detailedWadl && resourceMethod.isExtended()) { return null; } com.sun.research.ws.wadl.Method wadlMethod = _wadlGenerator.createMethod(parentResource, resourceMethod); // generate the request part Request wadlRequest = generateRequest(parentResource, resourceMethod, wadlResourceParams); if (wadlRequest != null) { wadlMethod.setRequest(wadlRequest); } // generate the response part final List<Response> responses = generateResponses(parentResource, resourceMethod); if (responses != null) { wadlMethod.getResponse().addAll(responses); } return wadlMethod; } catch (Exception e) { throw new ProcessingException( LocalizationMessages.ERROR_WADL_BUILDER_GENERATION_METHOD(resourceMethod, parentResource), e); } }
/** * @param resource Jersey resource component. * @param resourceMethod resource method. * @return the enhanced {@link com.sun.research.ws.wadl.Method}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createMethod(org.glassfish.jersey.server.model.Resource, * org.glassfish.jersey.server.model.ResourceMethod) */ public Method createMethod(final org.glassfish.jersey.server.model.Resource resource, final ResourceMethod resourceMethod) { final Method result = delegate.createMethod(resource, resourceMethod); final java.lang.reflect.Method method = resourceMethod.getInvocable().getDefinitionMethod(); final MethodDocType methodDoc = resourceDoc.getMethodDoc(method.getDeclaringClass(), method); if (methodDoc != null && !isEmpty(methodDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(methodDoc.getCommentText()); // doc.getOtherAttributes().put( new QName( "xmlns" ), "http://www.w3.org/1999/xhtml" ); result.getDoc().add(doc); } return result; }
/** * Create an instance of {@link Method } * */ public Method createMethod() { return new Method(); }