|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.WrappingTemplateModel
freemarker.template.SimpleHash
net.sf.jelly.apt.freemarker.FreemarkerModel
org.codehaus.enunciate.apt.EnunciateFreemarkerModel
public class EnunciateFreemarkerModel
| Field Summary |
|---|
| Fields inherited from interface freemarker.template.TemplateModel |
|---|
NOTHING |
| Constructor Summary | |
|---|---|
EnunciateFreemarkerModel()
|
|
| Method Summary | |
|---|---|
void |
add(EndpointInterface ei)
Add an endpoint interface to the model. |
void |
add(LocalElementDeclaration led)
|
void |
add(Registry registry)
Add an XML registry. |
void |
add(RootElementDeclaration rootElement)
Add a root element to the model. |
void |
add(RootResource rootResource)
Add a root resource to the model. |
void |
add(Schema schema)
Adds a schema declaration to the model. |
void |
add(TypeDefinition typeDef)
Add a type definition to the model. |
void |
addContentType(java.lang.String contentType)
Add a content type. |
void |
addJAXRSProvider(com.sun.mirror.declaration.TypeDeclaration declaration)
Add a JAX-RS provider to the model. |
void |
addJsonRootElement(JsonRootElementDeclaration rootElementDeclaration)
Add a JSON root element to the model. |
void |
addJsonRootElement(RootElementDeclaration rootElement)
Add a JSON root element to the model to reflect an XML root element being serialized as JSON with jackson. |
protected void |
addJsonSeeAlsoTypeDefinitions(com.sun.mirror.declaration.Declaration declaration)
Add any type definitions that are referenced using XmlSeeAlso as JSON serializable types. |
void |
addJsonType(JsonTypeDefinition typeDefinition)
Add a json type definition to the model. |
java.lang.String |
addNamespace(java.lang.String namespace)
Add a namespace. |
protected void |
addReferencedJsonTypeDefinitions(com.sun.mirror.type.TypeMirror type)
Adds any referenced type definitions for the specified type mirror. |
protected void |
addReferencedTypeDefinitions(Accessor accessor)
|
protected void |
addReferencedTypeDefinitions(Attribute attribute)
Add the type definition(s) referenced by the given attribute. |
protected void |
addReferencedTypeDefinitions(Element element)
Add the referenced type definitions for the specified element. |
protected void |
addReferencedTypeDefinitions(EndpointInterface ei)
Adds any type definitions referenced by an endpoint interface. |
protected void |
addReferencedTypeDefinitions(LocalElementDeclaration led)
Adds the referenced type definitions for the specified local element declaration. |
protected void |
addReferencedTypeDefinitions(Registry registry)
Add the referenced type definitions for a registry.. |
protected void |
addReferencedTypeDefinitions(ResourceMethod resourceMethod)
Add the referenced type definitions for the specified resource method. |
protected void |
addReferencedTypeDefinitions(RootElementDeclaration rootEl)
Add any statically-referenced type definitions to the model. |
protected void |
addReferencedTypeDefinitions(com.sun.mirror.type.TypeMirror type)
Adds any referenced type definitions for the specified type mirror. |
protected void |
addReferencedTypeDefinitions(Value value)
Add the type definition(s) referenced by the given value. |
protected void |
addReferencedTypeDefinitions(WebFault webFault)
Adds any type definitions referenced by a web fault. |
protected void |
addReferencedTypeDefinitions(WebMethod webMethod)
Adds any type definitions referenced by a web method. |
protected void |
addSeeAlsoReference(com.sun.mirror.declaration.ClassDeclaration typeDeclaration)
Add a "see also" reference. |
protected void |
addSeeAlsoTypeDefinitions(com.sun.mirror.declaration.Declaration declaration)
Add any type definitions that are referenced using XmlSeeAlso. |
protected TypeDefinition |
createTypeDefinition(com.sun.mirror.declaration.ClassDeclaration declaration)
Find the type definition for a class given the class's declaration. |
protected java.lang.String |
currentReferenceLocation()
A descrition of the current reference location. |
ElementDeclaration |
findElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
Find the element declaration (local or global) for the specified declaration. |
ResourceMethod |
findExampleResourceMethod()
Finds an example resource method, according to the following preference order: The first method annotated with DocumentationExample. |
WebMethod |
findExampleWebMethod()
Finds an example resource method, according to the following preference order: The first method annotated with DocumentationExample. |
JsonRootElementDeclaration |
findJsonRootElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
Find the root JSON element declaration for the specified class. |
JsonType |
findJsonTypeDefinition(com.sun.mirror.declaration.ClassDeclaration declaration)
Find the JSON type definition for a class given the class's declaration, or null if the class hasn't been added to the model. |
JsonType |
findJsonTypeDefinition(java.lang.String qualifiedName)
Find the JSON type definition for a class given the class's qualified name, or null if the class hasn't been added to the model. |
LocalElementDeclaration |
findLocalElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
Finds the local element declaration for the specified class declaration. |
RootElementDeclaration |
findRootElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
Find the root element declaration for the specified class. |
TypeDefinition |
findTypeDefinition(com.sun.mirror.declaration.ClassDeclaration declaration)
Find the type definition for a class given the class's declaration, or null if the class hasn't been added to the model. |
protected java.lang.String |
generatePrefix(java.lang.String namespace)
Generate a prefix for the given namespace. |
java.lang.String |
getBaseDeploymentAddress()
The base deployment address for the Enunciate application. |
java.util.Map<java.lang.String,java.lang.String> |
getContentTypesToIds()
A map of content types to ids. |
protected java.lang.String |
getDefaultContentTypeId(java.lang.String contentType)
Get the default content type id for the specified content type. |
java.util.List<EndpointInterface> |
getEndpointInterfaces()
The list of endpoint interfaces. |
EnunciateConfiguration |
getEnunciateConfig()
The enunciate configuration. |
java.io.File |
getFileOutputDirectory()
The file output directory. |
java.util.Map<java.lang.String,JsonSchemaInfo> |
getIdsToJsonSchemas()
A map of IDs to their associated JSON schema information. |
protected ImplicitSchemaAttribute |
getImplicitAttribute(Attribute attribute)
Gets the implicit attribute for the specified attribute, or null if there is no implicit attribute. |
protected ImplicitSchemaElement |
getImplicitElement(Element element)
Gets the implicit element for the specified element, or null if there is no implicit element. |
java.util.List<com.sun.mirror.declaration.TypeDeclaration> |
getJAXRSProviders()
The list of JAX-RS providers. |
XmlType |
getKnownType(com.sun.mirror.type.DeclaredType declaredType)
Gets the known type for the given declared type. |
XmlType |
getKnownType(com.sun.mirror.declaration.TypeDeclaration declaration)
Gets the known type for the given declaration. |
java.util.Map<java.lang.String,java.lang.String> |
getNamespacesToPrefixes()
A map of namespace URIs to their associated prefixes. |
java.util.Map<java.lang.String,SchemaInfo> |
getNamespacesToSchemas()
A map of namespace URIs to their associated schema information. |
java.util.Map<java.lang.String,WsdlInfo> |
getNamespacesToWSDLs()
A map of namespace URIs to their associated WSDL information. |
java.util.List<RootElementDeclaration> |
getRootElementDeclarations()
The list of root element declarations found in the model. |
java.util.List<RootResource> |
getRootResources()
The list of root resources. |
java.util.List<TypeDefinition> |
getTypeDefinitions()
The list of type definitions found in the model. |
java.io.File |
getWadlFile()
The wadl file for the model. |
protected boolean |
hasNeitherAttributesNorElements(org.codehaus.enunciate.apt.GenericTypeDefinition typeDef)
Whether the specified type definition has neither attributes nor elements. |
protected boolean |
includeReferencedClasses()
Whether to include referenced type definitions. |
protected boolean |
isComplexType(com.sun.mirror.declaration.TypeDeclaration declaration)
A quick check to see if a declaration defines a complex schema type. |
protected boolean |
isEnumType(com.sun.mirror.declaration.TypeDeclaration declaration)
A quick check to see if a declaration defines a enum schema type. |
protected boolean |
isKnownType(TypeDefinition typeDef)
Whether the specified type is a known type. |
protected boolean |
isSimpleType(com.sun.mirror.declaration.TypeDeclaration declaration)
A quick check to see if a declaration defines a simple schema type. |
protected java.util.HashMap<java.lang.String,java.lang.String> |
loadKnownContentTypes()
Load the known content types (map of content type to id). |
protected java.util.Map<java.lang.String,java.lang.String> |
loadKnownNamespaces()
Loads a map of known namespaces as keys to their associated prefixes. |
protected java.util.Map<java.lang.String,XmlType> |
loadKnownTypes()
Loads the known types, keyed off the Java fqn. |
protected com.sun.mirror.declaration.ClassDeclaration |
narrowToAdaptingType(com.sun.mirror.declaration.ClassDeclaration declaration)
Narrows the existing declaration down to its adapting declaration, if it's being adapted. |
void |
setBaseDeploymentAddress(java.lang.String baseDeploymentAddress)
The base deployment address for the Enunciate application. |
void |
setEnunciateConfig(EnunciateConfiguration enunciateConfig)
The enunciate configuration. |
void |
setFileOutputDirectory(java.io.File fileOutputDirectory)
The file output directory. |
void |
setWadlFile(java.io.File wadlFile)
The wadl file for the model. |
| Methods inherited from class net.sf.jelly.apt.freemarker.FreemarkerModel |
|---|
get, getVariable, set, setVariable |
| Methods inherited from class freemarker.template.SimpleHash |
|---|
copyMap, get, isEmpty, keys, put, put, putAll, remove, size, synchronizedWrapper, toMap, toString, values |
| Methods inherited from class freemarker.template.WrappingTemplateModel |
|---|
getDefaultObjectWrapper, getObjectWrapper, setDefaultObjectWrapper, setObjectWrapper, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EnunciateFreemarkerModel()
| Method Detail |
|---|
protected java.util.HashMap<java.lang.String,java.lang.String> loadKnownContentTypes()
protected java.util.Map<java.lang.String,java.lang.String> loadKnownNamespaces()
protected java.util.Map<java.lang.String,XmlType> loadKnownTypes()
public java.util.Map<java.lang.String,java.lang.String> getNamespacesToPrefixes()
public java.util.Map<java.lang.String,java.lang.String> getContentTypesToIds()
public java.util.Map<java.lang.String,SchemaInfo> getNamespacesToSchemas()
public java.util.Map<java.lang.String,WsdlInfo> getNamespacesToWSDLs()
public java.util.Map<java.lang.String,JsonSchemaInfo> getIdsToJsonSchemas()
public java.util.List<RootResource> getRootResources()
public java.util.List<com.sun.mirror.declaration.TypeDeclaration> getJAXRSProviders()
public void add(EndpointInterface ei)
ei - The endpoint interface to add to the model.protected boolean includeReferencedClasses()
public void addJsonType(JsonTypeDefinition typeDefinition)
typeDefinition - The json type definition to add to the model.public void add(TypeDefinition typeDef)
typeDef - The type definition to add to the model.protected java.lang.String currentReferenceLocation()
protected boolean isKnownType(TypeDefinition typeDef)
typeDef - The type def.
protected void addReferencedTypeDefinitions(Accessor accessor)
protected void addReferencedTypeDefinitions(Attribute attribute)
attribute - The attribute.protected void addReferencedTypeDefinitions(Value value)
value - The value.protected void addReferencedTypeDefinitions(Element element)
element - The element.protected ImplicitSchemaElement getImplicitElement(Element element)
element - The element.
protected ImplicitSchemaAttribute getImplicitAttribute(Attribute attribute)
attribute - The attribute.
public void add(RootResource rootResource)
rootResource - The root resource to add to the model.protected void addReferencedTypeDefinitions(ResourceMethod resourceMethod)
resourceMethod - The resource method.public void addJAXRSProvider(com.sun.mirror.declaration.TypeDeclaration declaration)
declaration - The declaration of the provider.public void addJsonRootElement(RootElementDeclaration rootElement)
rootElement - The root element to add.public void addJsonRootElement(JsonRootElementDeclaration rootElementDeclaration)
rootElementDeclaration - The root element to add.public void add(RootElementDeclaration rootElement)
rootElement - The root element to add.protected void addReferencedTypeDefinitions(RootElementDeclaration rootEl)
rootEl - The root element.protected void addReferencedTypeDefinitions(EndpointInterface ei)
ei - The endpoint interface.protected void addReferencedTypeDefinitions(WebMethod webMethod)
webMethod - The web method.protected void addReferencedTypeDefinitions(WebFault webFault)
webFault - The web fault.protected void addReferencedTypeDefinitions(com.sun.mirror.type.TypeMirror type)
type - The type mirror.protected void addReferencedJsonTypeDefinitions(com.sun.mirror.type.TypeMirror type)
type - The type mirror.protected void addSeeAlsoTypeDefinitions(com.sun.mirror.declaration.Declaration declaration)
XmlSeeAlso.
declaration - The declaration.protected void addSeeAlsoReference(com.sun.mirror.declaration.ClassDeclaration typeDeclaration)
typeDeclaration - The reference.protected void addJsonSeeAlsoTypeDefinitions(com.sun.mirror.declaration.Declaration declaration)
XmlSeeAlso as JSON serializable types.
declaration - The declaration.protected TypeDefinition createTypeDefinition(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The declaration.
protected com.sun.mirror.declaration.ClassDeclaration narrowToAdaptingType(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The declaration to narrow.
protected boolean isComplexType(com.sun.mirror.declaration.TypeDeclaration declaration)
declaration - The declaration to check.
protected boolean isEnumType(com.sun.mirror.declaration.TypeDeclaration declaration)
declaration - The declaration to check.
protected boolean isSimpleType(com.sun.mirror.declaration.TypeDeclaration declaration)
declaration - The declaration to check.
protected boolean hasNeitherAttributesNorElements(org.codehaus.enunciate.apt.GenericTypeDefinition typeDef)
typeDef - The type def.
public void add(Registry registry)
registry - The registry to add.protected void addReferencedTypeDefinitions(Registry registry)
registry - The registry.public void add(LocalElementDeclaration led)
protected void addReferencedTypeDefinitions(LocalElementDeclaration led)
led - The local element declaration.public void add(Schema schema)
schema - The schema declaration to add to the model.public java.lang.String addNamespace(java.lang.String namespace)
namespace - The namespace to add.
public void addContentType(java.lang.String contentType)
contentType - The content type to add.protected java.lang.String getDefaultContentTypeId(java.lang.String contentType)
contentType - The content type.
protected java.lang.String generatePrefix(java.lang.String namespace)
namespace - The namespace for which to generate a prefix.
public XmlType getKnownType(com.sun.mirror.type.DeclaredType declaredType)
declaredType - The declared type.
public XmlType getKnownType(com.sun.mirror.declaration.TypeDeclaration declaration)
declaration - The declaration.
public JsonType findJsonTypeDefinition(java.lang.String qualifiedName)
qualifiedName - Qualified name of the class to find the JSON type for.
public JsonType findJsonTypeDefinition(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The declaration.
public TypeDefinition findTypeDefinition(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The declaration.
public JsonRootElementDeclaration findJsonRootElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The class declaration
public RootElementDeclaration findRootElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The class declaration
public LocalElementDeclaration findLocalElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The declaration for which to find the local element declaration.
public ElementDeclaration findElementDeclaration(com.sun.mirror.declaration.ClassDeclaration declaration)
declaration - The declaration.
public ResourceMethod findExampleResourceMethod()
DocumentationExample.
public WebMethod findExampleWebMethod()
DocumentationExample.
public java.util.List<TypeDefinition> getTypeDefinitions()
public java.util.List<EndpointInterface> getEndpointInterfaces()
public java.util.List<RootElementDeclaration> getRootElementDeclarations()
public java.io.File getFileOutputDirectory()
public void setFileOutputDirectory(java.io.File fileOutputDirectory)
fileOutputDirectory - The file output directory.public java.io.File getWadlFile()
public void setWadlFile(java.io.File wadlFile)
wadlFile - The wadl file for the model.public java.lang.String getBaseDeploymentAddress()
public void setBaseDeploymentAddress(java.lang.String baseDeploymentAddress)
baseDeploymentAddress - The base deployment address for the Enunciate application.public EnunciateConfiguration getEnunciateConfig()
public void setEnunciateConfig(EnunciateConfiguration enunciateConfig)
enunciateConfig - The enunciate configuration.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||