|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.module.Extension
public abstract class Extension
An extension is a small snippet of code that is run at certain "extension points" throughout the user interface
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.
Nested Class Summary | |
---|---|
static class |
Extension.MEDIA_TYPE
All media types allowed by the module extension system. |
Field Summary | |
---|---|
static java.lang.String |
extensionIdSeparator
String separating the pointId and media type in an extension id |
Constructor Summary | |
---|---|
Extension()
default constructor |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String extensionIdSeparator
toExtensionId(String, MEDIA_TYPE)
,
Constant Field ValuesConstructor Detail |
---|
public Extension()
Method Detail |
---|
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
-
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |