private void addDoc(final List<Doc> docs, final String text) { if (!isEmpty(text)) { final Doc doc = new Doc(); doc.getContent().add(text); docs.add(doc); } }
private void addDoc(final List<Doc> docs, final String text) { if (!isEmpty(text)) { final Doc doc = new Doc(); doc.getContent().add(text); docs.add(doc); } }
private void addDoc( final List<Doc> docs, final String text ) { if ( !isEmpty( text ) ) { final Doc doc = new Doc(); doc.getContent().add( text ); docs.add( doc ); } }
private void addDocForExample( final List<Doc> docs, final String example ) { if ( !isEmpty( example ) ) { final Doc doc = new Doc(); final Elements pElement = Elements.el( "p" ) .add( Elements.val( "h6", "Example" ) ) .add( Elements.el( "pre" ).add( Elements.val( "code", example ) ) ); doc.getContent().add( pElement ); docs.add( doc ); } }
private void addDocForExample(final List<Doc> docs, final String example) { if (!isEmpty(example)) { final Doc doc = new Doc(); final Elements pElement = Elements.el("p") .add(Elements.val("h6", "Example")) .add(Elements.el("pre").add(Elements.val("code", example))); doc.getContent().add(pElement); docs.add(doc); } }
private void addDocForExample(final List<Doc> docs, final String example) { if (!isEmpty(example)) { final Doc doc = new Doc(); final Elements pElement = Elements.el("p") .add(Elements.val("h6", "Example")) .add(Elements.el("pre").add(Elements.val("code", example))); doc.getContent().add(pElement); docs.add(doc); } }
/** * @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; }
/** * @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; }
/** * @param r Jersey resource component for which the WADL reource is to be created. * @param path path where the resource is exposed. * @return the enhanced {@link com.sun.research.ws.wadl.Resource}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createResource(org.glassfish.jersey.server.model.Resource, String) */ public Resource createResource(final org.glassfish.jersey.server.model.Resource r, final String path) { final Resource result = delegate.createResource(r, path); for (final Class<?> resourceClass : r.getHandlerClasses()) { final ClassDocType classDoc = resourceDoc.getClassDoc(resourceClass); if (classDoc != null && !isEmpty(classDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(classDoc.getCommentText()); result.getDoc().add(doc); } } return result; }
/** * @param r Jersey resource component for which the WADL reource is to be created. * @param path path where the resource is exposed. * @return the enhanced {@link com.sun.research.ws.wadl.Resource}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createResource(org.glassfish.jersey.server.model.Resource, String) */ public Resource createResource(final org.glassfish.jersey.server.model.Resource r, final String path) { final Resource result = delegate.createResource(r, path); for (final Class<?> resourceClass : r.getHandlerClasses()) { final ClassDocType classDoc = resourceDoc.getClassDoc(resourceClass); if (classDoc != null && !isEmpty(classDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(classDoc.getCommentText()); result.getDoc().add(doc); } } return result; }
/** * @param r * @param path * @return the enhanced {@link Resource} * @see com.sun.jersey.server.wadl.WadlGenerator#createResource(com.sun.jersey.api.model.AbstractResource, java.lang.String) */ public Resource createResource( AbstractResource r, String path ) { final Resource result = _delegate.createResource( r, path ); final ClassDocType classDoc = resourceDoc.getClassDoc( r.getResourceClass() ); if ( classDoc != null && !isEmpty( classDoc.getCommentText() ) ) { final Doc doc = new Doc(); doc.getContent().add( classDoc.getCommentText() ); result.getDoc().add( doc ); } return result; }
/** * @param r Jersey resource component. * @param m resource method. * @param p method parameter. * @return the enhanced {@link Param}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createParam(org.glassfish.jersey.server.model.Resource, * org.glassfish.jersey.server.model.ResourceMethod, org.glassfish.jersey.server.model.Parameter) */ public Param createParam(final org.glassfish.jersey.server.model.Resource r, final org.glassfish.jersey.server.model.ResourceMethod m, final Parameter p) { final Param result = delegate.createParam(r, m, p); if (result != null) { final ParamDocType paramDoc = resourceDoc.getParamDoc(m.getInvocable().getDefinitionMethod().getDeclaringClass(), m.getInvocable().getDefinitionMethod(), p); if (paramDoc != null && !isEmpty(paramDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(paramDoc.getCommentText()); result.getDoc().add(doc); } } return result; }
/** * @param r Jersey resource component. * @param m resource method. * @param p method parameter. * @return the enhanced {@link Param}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createParam(org.glassfish.jersey.server.model.Resource, * org.glassfish.jersey.server.model.ResourceMethod, org.glassfish.jersey.server.model.Parameter) */ public Param createParam(final org.glassfish.jersey.server.model.Resource r, final org.glassfish.jersey.server.model.ResourceMethod m, final Parameter p) { final Param result = delegate.createParam(r, m, p); if (result != null) { final ParamDocType paramDoc = resourceDoc.getParamDoc(m.getInvocable().getDefinitionMethod().getDeclaringClass(), m.getInvocable().getDefinitionMethod(), p); if (paramDoc != null && !isEmpty(paramDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(paramDoc.getCommentText()); result.getDoc().add(doc); } } return result; }
/** * @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; }
/** * @param r * @param m * @param p * @return the enhanced {@link Param} * @see com.sun.jersey.server.wadl.WadlGenerator#createParam(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractMethod, com.sun.jersey.api.model.Parameter) */ public Param createParam(AbstractResource r, AbstractMethod m, Parameter p) { final Param result = _delegate.createParam(r, m, p); if (result != null) { final ParamDocType paramDoc = resourceDoc.getParamDoc( r.getResourceClass(), (m == null ? null : m.getMethod()), p ); if(paramDoc != null && !isEmpty( paramDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add( paramDoc.getCommentText() ); result.getDoc().add( doc ); } } return result; }
private void addDoc(final List<Doc> docs, final String text) { if (!isEmpty(text)) { final Doc doc = new Doc(); doc.getContent().add(text); docs.add(doc); } }
private void addDocForExample(final List<Doc> docs, final String example) { if (!isEmpty(example)) { final Doc doc = new Doc(); final Elements pElement = Elements.el("p") .add(Elements.val("h6", "Example")) .add(Elements.el("pre").add(Elements.val("code", example))); doc.getContent().add(pElement); docs.add(doc); } }
/** * @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; }
/** * @param r Jersey resource component for which the WADL reource is to be created. * @param path path where the resource is exposed. * @return the enhanced {@link com.sun.research.ws.wadl.Resource}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createResource(org.glassfish.jersey.server.model.Resource, String) */ public Resource createResource(final org.glassfish.jersey.server.model.Resource r, final String path) { final Resource result = delegate.createResource(r, path); for (final Class<?> resourceClass : r.getHandlerClasses()) { final ClassDocType classDoc = resourceDoc.getClassDoc(resourceClass); if (classDoc != null && !isEmpty(classDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(classDoc.getCommentText()); result.getDoc().add(doc); } } return result; }
/** * @param r Jersey resource component. * @param m resource method. * @param p method parameter. * @return the enhanced {@link Param}. * @see org.glassfish.jersey.server.wadl.WadlGenerator#createParam(org.glassfish.jersey.server.model.Resource, * org.glassfish.jersey.server.model.ResourceMethod, org.glassfish.jersey.server.model.Parameter) */ public Param createParam(final org.glassfish.jersey.server.model.Resource r, final org.glassfish.jersey.server.model.ResourceMethod m, final Parameter p) { final Param result = delegate.createParam(r, m, p); if (result != null) { final ParamDocType paramDoc = resourceDoc.getParamDoc(m.getInvocable().getDefinitionMethod().getDeclaringClass(), m.getInvocable().getDefinitionMethod(), p); if (paramDoc != null && !isEmpty(paramDoc.getCommentText())) { final Doc doc = new Doc(); doc.getContent().add(paramDoc.getCommentText()); result.getDoc().add(doc); } } return result; }