public class DefaultDocumentationStrategy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
copyright
|
Constructor and Description |
---|
DefaultDocumentationStrategy(AbstractBaseResourceHandler handlerToDocument,
java.util.Locale locale)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPathClarification(java.lang.String path,
org.eclipse.emf.ecore.EClass type)
Clarify the type of a path by name.
|
org.apache.commons.json.JSONObject |
documentApi(java.lang.String urlContextRoot,
AbstractBaseResourceHandler executionHandler,
java.util.Map<java.lang.String,java.lang.String> bundle)
Document the referenced API.
|
static java.lang.String |
getApiVersion()
Get the API Version.
|
java.lang.String |
getClassDescription()
Get the class description based on description annotations.
|
java.lang.Class<? extends AbstractBaseResourceHandler> |
getHandlerClass() |
AbstractBaseResourceHandler |
getHandlerToDocument() |
java.util.Locale |
getLocale() |
static java.lang.Class<?> |
getPrimitiveWrapperClass(java.lang.Class paramType)
Get the class used to wrap primitive types.
|
static java.lang.String |
getResourceBundleNameForHandlerClass(java.lang.Class<? extends AbstractBaseResourceHandler> handlerClass)
Get the resource bundle name to use for a resource handler class.
|
public static final java.lang.String COPYRIGHT
public DefaultDocumentationStrategy(AbstractBaseResourceHandler handlerToDocument, java.util.Locale locale)
handlerToDocument
- Handler to document.locale
- The locale to use.public void addPathClarification(java.lang.String path, org.eclipse.emf.ecore.EClass type)
path
- the path name.type
- The EClass that is actually used on that path.public static java.lang.String getResourceBundleNameForHandlerClass(java.lang.Class<? extends AbstractBaseResourceHandler> handlerClass)
handlerClass
- The handler class.public org.apache.commons.json.JSONObject documentApi(java.lang.String urlContextRoot, AbstractBaseResourceHandler executionHandler, java.util.Map<java.lang.String,java.lang.String> bundle) throws java.lang.Exception
urlContextRoot
- The API context root.executionHandler
- The handler currently executing the request.bundle
- The resource bundle to fill.java.lang.Exception
- If anything goes wrong.public static java.lang.Class<?> getPrimitiveWrapperClass(java.lang.Class paramType)
paramType
- the basic class type to wrap.public java.lang.String getClassDescription()
public java.util.Locale getLocale()
public java.lang.Class<? extends AbstractBaseResourceHandler> getHandlerClass()
public AbstractBaseResourceHandler getHandlerToDocument()
public static java.lang.String getApiVersion()