public abstract class Extension
extends java.lang.Object
An extension is not necessarily tied to only one certain point. If all of the need return values are defined it can be used to extend any point. A module can contain many extensions for many different points.
Modifier and Type | Class and Description |
---|---|
static class |
Extension.MEDIA_TYPE
All media types allowed by the module extension system.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
extensionIdSeparator
String separating the pointId and media type in an extension id
|
Constructor and Description |
---|
Extension()
default constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExtensionId()
Get the extension point id
|
abstract Extension.MEDIA_TYPE |
getMediaType()
Sets the content type of this extension.
|
java.lang.String |
getModuleId()
Get this extension's module id
|
java.lang.String |
getOverrideContent(java.lang.String bodyContent)
If this method returns a non-null value then the return value will be used as the default
content for this extension at this extension point
|
java.util.Map<java.lang.String,java.lang.String> |
getParameterMap()
Get all of the parameters given to this extension point
|
java.lang.String |
getPointId()
Get the point id
|
void |
initialize(java.util.Map<java.lang.String,java.lang.String> parameterMap)
Called before being displayed each time
|
void |
setModuleId(java.lang.String moduleId)
Set the module id of this extension
|
void |
setParameterMap(java.util.Map<java.lang.String,java.lang.String> parameterMap)
Parameters given at the extension point This method is usually called only during extension
initialization
|
void |
setPointId(java.lang.String pointId)
Set the point id
|
static java.lang.String |
toExtensionId(java.lang.String pointId,
Extension.MEDIA_TYPE mediaType)
Convert the given pointId and mediaType to an extensionId.
|
java.lang.String |
toString()
Get the string representation of this extension
|
public static final java.lang.String extensionIdSeparator
public void initialize(java.util.Map<java.lang.String,java.lang.String> parameterMap)
parameterMap
- public java.lang.String getPointId()
String
Point Idpublic void setPointId(java.lang.String pointId)
pointId
- public java.util.Map<java.lang.String,java.lang.String> getParameterMap()
public void setParameterMap(java.util.Map<java.lang.String,java.lang.String> parameterMap)
parameterMap
- key-value parameter mappublic abstract Extension.MEDIA_TYPE getMediaType()
public java.lang.String getExtensionId()
String
Extension Idpublic java.lang.String getOverrideContent(java.lang.String bodyContent)
public final java.lang.String getModuleId()
String
Module Idpublic final void setModuleId(java.lang.String moduleId)
moduleId
- public final java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static final java.lang.String toExtensionId(java.lang.String pointId, Extension.MEDIA_TYPE mediaType)
pointId
- mediaType
- Copyright © 2018 OpenMRS Inc.. All Rights Reserved.