Package com.sun.jersey.server.wadl.generators.resourcedoc.model

Examples of com.sun.jersey.server.wadl.generators.resourcedoc.model.MethodDocType


     * @return
     * @author Martin Grotzke
     */
    public ParamDocType getParamDoc( Class<?> resourceClass, Method method,
            Parameter p ) {
        final MethodDocType methodDoc = getMethodDoc( resourceClass, method );
        if ( methodDoc != null ) {
            for ( ParamDocType paramDocType : methodDoc.getParamDocs() ) {
                for ( AnnotationDocType annotationDocType : paramDocType.getAnnotationDocs() ) {
                    final Class<? extends Annotation> annotationType = p.getAnnotation().annotationType();
                    if ( annotationType != null ) {
                        final String sourceName = getSourceName( p, paramDocType, annotationDocType );
                        if ( sourceName != null && sourceName.equals( p.getSourceName() ) ) {
View Full Code Here


    public RepresentationDocType getRequestRepresentation( Class<?> resourceClass, Method method, String mediaType ) {
        if ( mediaType == null ) {
            return null;
        }
        final MethodDocType methodDoc = getMethodDoc( resourceClass, method );
        return methodDoc != null
            && methodDoc.getRequestDoc() != null
            && methodDoc.getRequestDoc().getRepresentationDoc() != null
            // && mediaType.equals( methodDoc.getRequestDoc().getRepresentationDoc().getMediaType() )
                ? methodDoc.getRequestDoc().getRepresentationDoc() : null;
    }
View Full Code Here

            // && mediaType.equals( methodDoc.getRequestDoc().getRepresentationDoc().getMediaType() )
                ? methodDoc.getRequestDoc().getRepresentationDoc() : null;
    }

    public ResponseDocType getResponse( Class<?> resourceClass, Method method ) {
        final MethodDocType methodDoc = getMethodDoc( resourceClass, method );
        return methodDoc != null && methodDoc.getResponseDoc() != null
                ? methodDoc.getResponseDoc() : null;
    }
View Full Code Here

     * @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;
    }
View Full Code Here

     * @param p
     * @return param doc type
     */
    public ParamDocType getParamDoc( Class<?> resourceClass, Method method,
            Parameter p ) {
        final MethodDocType methodDoc = getMethodDoc( resourceClass, method );
        if ( methodDoc != null ) {
            for ( ParamDocType paramDocType : methodDoc.getParamDocs() ) {
                for ( AnnotationDocType annotationDocType : paramDocType.getAnnotationDocs() ) {
                    final Class<? extends Annotation> annotationType = p.getAnnotation().annotationType();
                    if ( annotationType != null ) {
                        final String sourceName = getSourceName( p, paramDocType, annotationDocType );
                        if ( sourceName != null && sourceName.equals( p.getSourceName() ) ) {
View Full Code Here

    public RepresentationDocType getRequestRepresentation( Class<?> resourceClass, Method method, String mediaType ) {
        if ( mediaType == null ) {
            return null;
        }
        final MethodDocType methodDoc = getMethodDoc( resourceClass, method );
        return methodDoc != null
            && methodDoc.getRequestDoc() != null
            && methodDoc.getRequestDoc().getRepresentationDoc() != null
            // && mediaType.equals( methodDoc.getRequestDoc().getRepresentationDoc().getMediaType() )
                ? methodDoc.getRequestDoc().getRepresentationDoc() : null;
    }
View Full Code Here

            // && mediaType.equals( methodDoc.getRequestDoc().getRepresentationDoc().getMediaType() )
                ? methodDoc.getRequestDoc().getRepresentationDoc() : null;
    }

    public ResponseDocType getResponse( Class<?> resourceClass, Method method ) {
        final MethodDocType methodDoc = getMethodDoc( resourceClass, method );
        return methodDoc != null && methodDoc.getResponseDoc() != null
                ? methodDoc.getResponseDoc() : null;
    }
View Full Code Here

    }

    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 && methodDoc.getAny() != null && !methodDoc.getAny().isEmpty() ) {
            for ( Object any : methodDoc.getAny() ) {
                System.out.println( "test: " + ( any instanceof MyNamedValueType ) + " any: " + any );
                if ( any instanceof MyNamedValueType ) {
                    final MyNamedValueType namedValue = (MyNamedValueType) any;
                    if ( ExampleDocProcessor.EXAMPLE_TAG.equals( namedValue.getName() ) ) {
                        final Doc doc = new Doc();
View Full Code Here

    }

    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 && methodDoc.getAny() != null && !methodDoc.getAny().isEmpty() ) {
            for ( Object any : methodDoc.getAny() ) {
                System.out.println( "test: " + ( any instanceof MyNamedValueType ) + " any: " + any );
                if ( any instanceof MyNamedValueType ) {
                    final MyNamedValueType namedValue = (MyNamedValueType) any;
                    if ( ExampleDocProcessor.EXAMPLE_TAG.equals( namedValue.getName() ) ) {
                        final Doc doc = new Doc();
View Full Code Here

                classDocType.setCommentText( classDoc.commentText() );
                docProcessor.processClassDoc( classDoc, classDocType );
               
                for ( MethodDoc methodDoc : classDoc.methods() ) {
                   
                    final MethodDocType methodDocType = new MethodDocType();
                    methodDocType.setMethodName( methodDoc.name() );
                    methodDocType.setCommentText( methodDoc.commentText() );
                    docProcessor.processMethodDoc( methodDoc, methodDocType );
                   
                    addParamDocs( methodDoc, methodDocType, docProcessor );
                   
                    addRequestRepresentationDoc( methodDoc, methodDocType );
View Full Code Here

TOP

Related Classes of com.sun.jersey.server.wadl.generators.resourcedoc.model.MethodDocType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.