Apache CXF API

org.apache.cxf.jaxrs.model.wadl
Class WadlGenerator

java.lang.Object
  extended by org.apache.cxf.jaxrs.model.wadl.WadlGenerator
All Implemented Interfaces:
RequestHandler

public class WadlGenerator
extends Object
implements RequestHandler


Nested Class Summary
protected static interface WadlGenerator.SchemaWriter
           
 
Field Summary
static String WADL_NS
           
static String WADL_QUERY
           
static javax.ws.rs.core.MediaType WADL_TYPE
           
 
Constructor Summary
WadlGenerator()
           
WadlGenerator(WadlGenerator other)
           
 
Method Summary
 boolean addSchemaDocument(SchemaCollection col, Document d, String systemId, boolean hackAroundEmptyNamespaceIssue)
           
protected  boolean compareOperations(OperationResourceInfo ori1, OperationResourceInfo ori2)
           
protected  ElementQNameResolver createElementQNameResolver(javax.xml.bind.JAXBContext context)
           
protected  WadlGenerator.SchemaWriter createSchemaWriter(javax.xml.bind.JAXBContext context, javax.ws.rs.core.UriInfo ui)
           
protected  void doWriteParam(StringBuilder sb, Parameter pm, Class<?> type, Type genericType, String paramName, Annotation[] anns)
           
 javax.ws.rs.core.Response getExistingSchema(Message m, javax.ws.rs.core.UriInfo ui, String href)
           
 javax.ws.rs.core.Response getExistingWadl(Message m, javax.ws.rs.core.UriInfo ui, javax.ws.rs.core.MediaType mt)
           
 List<String> getPrivateAddresses()
           
 List<ClassResourceInfo> getResourcesList(Message m, ClassResourceInfo cri)
           
protected  void handleDynamicSubresource(StringBuilder sb, Set<Class<?>> jaxbTypes, ElementQNameResolver qnameResolver, Map<Class<?>,QName> clsMap, OperationResourceInfo ori, ClassResourceInfo subcri)
           
 javax.ws.rs.core.Response handleRequest(Message m, ClassResourceInfo resource)
           
 void setAddResourceAndMethodIds(boolean addResourceAndMethodIds)
           
 void setApplicationTitle(String applicationTitle)
           
 void setDefaultMediaType(String mt)
           
 void setExternalLinks(List<String> externalLinks)
           
 void setIgnoreForwardSlash(boolean ignoreForwardSlash)
           
 void setIgnoreMessageWriters(boolean ignoreMessageWriters)
           
 void setIgnoreRequests(boolean ignoreRequests)
           
 void setNamespacePrefix(String prefix)
           
 void setPrivateAddresses(List<String> privateAddresses)
           
 void setResolver(ElementQNameResolver resolver)
           
 void setSchemaLocations(List<String> locations)
           
 void setSingleResourceMultipleMethods(boolean singleResourceMultipleMethods)
           
 void setUseJaxbContextForQnames(boolean checkJaxbOnly)
           
 void setUseSingleSlashResource(boolean useSingleSlashResource)
           
 void setWadlNamespace(String namespace)
           
protected  List<OperationResourceInfo> sortOperationsByPath(Set<OperationResourceInfo> ops)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WADL_QUERY

public static final String WADL_QUERY
See Also:
Constant Field Values

WADL_TYPE

public static final javax.ws.rs.core.MediaType WADL_TYPE

WADL_NS

public static final String WADL_NS
See Also:
Constant Field Values
Constructor Detail

WadlGenerator

public WadlGenerator()

WadlGenerator

public WadlGenerator(WadlGenerator other)
Method Detail

handleRequest

public javax.ws.rs.core.Response handleRequest(Message m,
                                               ClassResourceInfo resource)
Specified by:
handleRequest in interface RequestHandler

compareOperations

protected boolean compareOperations(OperationResourceInfo ori1,
                                    OperationResourceInfo ori2)

handleDynamicSubresource

protected void handleDynamicSubresource(StringBuilder sb,
                                        Set<Class<?>> jaxbTypes,
                                        ElementQNameResolver qnameResolver,
                                        Map<Class<?>,QName> clsMap,
                                        OperationResourceInfo ori,
                                        ClassResourceInfo subcri)

doWriteParam

protected void doWriteParam(StringBuilder sb,
                            Parameter pm,
                            Class<?> type,
                            Type genericType,
                            String paramName,
                            Annotation[] anns)

sortOperationsByPath

protected List<OperationResourceInfo> sortOperationsByPath(Set<OperationResourceInfo> ops)

getResourcesList

public List<ClassResourceInfo> getResourcesList(Message m,
                                                ClassResourceInfo cri)

getExistingWadl

public javax.ws.rs.core.Response getExistingWadl(Message m,
                                                 javax.ws.rs.core.UriInfo ui,
                                                 javax.ws.rs.core.MediaType mt)

getExistingSchema

public javax.ws.rs.core.Response getExistingSchema(Message m,
                                                   javax.ws.rs.core.UriInfo ui,
                                                   String href)

addSchemaDocument

public boolean addSchemaDocument(SchemaCollection col,
                                 Document d,
                                 String systemId,
                                 boolean hackAroundEmptyNamespaceIssue)

setIgnoreMessageWriters

public void setIgnoreMessageWriters(boolean ignoreMessageWriters)

setWadlNamespace

public void setWadlNamespace(String namespace)

setSingleResourceMultipleMethods

public void setSingleResourceMultipleMethods(boolean singleResourceMultipleMethods)

setUseSingleSlashResource

public void setUseSingleSlashResource(boolean useSingleSlashResource)

setSchemaLocations

public void setSchemaLocations(List<String> locations)

setUseJaxbContextForQnames

public void setUseJaxbContextForQnames(boolean checkJaxbOnly)

createElementQNameResolver

protected ElementQNameResolver createElementQNameResolver(javax.xml.bind.JAXBContext context)

createSchemaWriter

protected WadlGenerator.SchemaWriter createSchemaWriter(javax.xml.bind.JAXBContext context,
                                                        javax.ws.rs.core.UriInfo ui)

setExternalLinks

public void setExternalLinks(List<String> externalLinks)

setResolver

public void setResolver(ElementQNameResolver resolver)

setPrivateAddresses

public void setPrivateAddresses(List<String> privateAddresses)

getPrivateAddresses

public List<String> getPrivateAddresses()

setAddResourceAndMethodIds

public void setAddResourceAndMethodIds(boolean addResourceAndMethodIds)

setApplicationTitle

public void setApplicationTitle(String applicationTitle)

setNamespacePrefix

public void setNamespacePrefix(String prefix)

setIgnoreForwardSlash

public void setIgnoreForwardSlash(boolean ignoreForwardSlash)

setIgnoreRequests

public void setIgnoreRequests(boolean ignoreRequests)

setDefaultMediaType

public void setDefaultMediaType(String mt)

Apache CXF API

Apache CXF