public final class Module
extends java.lang.Object
Constructor and Description |
---|
Module(java.lang.String name)
Simple constructor
|
Module(java.lang.String name,
java.lang.String moduleId,
java.lang.String packageName,
java.lang.String author,
java.lang.String description,
java.lang.String version)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clearStartupError() |
void |
disposeAdvicePointsClassInstance() |
boolean |
equals(java.lang.Object obj) |
Activator |
getActivator()
Deprecated.
replaced by
getModuleActivator() |
java.lang.String |
getActivatorName() |
java.util.List<AdvicePoint> |
getAdvicePoints() |
java.lang.String |
getAuthor() |
java.util.List<java.lang.String> |
getAwareOfModules()
This list of strings is just what is included in the config.xml file, the full package names:
e.g.
|
java.lang.String |
getAwareOfModuleVersion(java.lang.String awareOfModule) |
java.util.List<ModuleConditionalResource> |
getConditionalResources() |
org.w3c.dom.Document |
getConfig() |
java.lang.String |
getDescription() |
java.lang.String |
getDownloadURL() |
java.util.List<Extension> |
getExtensions() |
java.io.File |
getFile() |
java.util.List<GlobalProperty> |
getGlobalProperties() |
org.w3c.dom.Document |
getLog4j() |
java.util.List<java.lang.String> |
getMappingFiles() |
java.util.Map<java.lang.String,java.util.Properties> |
getMessages()
Gets a mapping from locale to properties used by this module.
|
ModuleActivator |
getModuleActivator() |
java.lang.String |
getModuleId() |
java.lang.String |
getModuleIdAsPath() |
java.lang.String |
getName() |
java.lang.String |
getPackageName() |
java.util.Set<java.lang.String> |
getPackagesWithMappedClasses()
Packages to scan for classes with JPA annotated classes.
|
java.util.List<Privilege> |
getPrivileges() |
java.lang.String |
getRequireDatabaseVersion() |
java.util.List<java.lang.String> |
getRequiredModules()
This list of strings is just what is included in the config.xml file, the full package names:
e.g.
|
java.lang.String |
getRequiredModuleVersion(java.lang.String moduleName)
Convenience method to get the version of this given module that is required
|
java.lang.String |
getRequireOpenmrsVersion() |
org.w3c.dom.Document |
getSqldiff() |
java.lang.String |
getStartupErrorMessage() |
java.lang.String |
getUpdateURL() |
java.lang.String |
getUpdateVersion() |
java.lang.String |
getVersion() |
java.lang.Boolean |
hasStartupError() |
boolean |
isCore() |
boolean |
isCoreModule()
This is a convenience method to know whether this module is core to OpenMRS.
|
boolean |
isMandatory()
This property is set by the module owner to tell OpenMRS that once it is installed, it must
always startup.
|
boolean |
isStarted() |
void |
setActivator(Activator activator) |
void |
setActivatorName(java.lang.String activatorName) |
void |
setAdvicePoints(java.util.List<AdvicePoint> advicePoints) |
void |
setAuthor(java.lang.String author) |
void |
setAwareOfModulesMap(java.util.Map<java.lang.String,java.lang.String> awareOfModulesMap)
Sets the modules that this module is aware of.
|
void |
setConditionalResources(java.util.List<ModuleConditionalResource> conditionalResources) |
void |
setConfig(org.w3c.dom.Document config) |
void |
setDescription(java.lang.String description) |
void |
setDownloadURL(java.lang.String downloadURL) |
void |
setExtensionNames(java.util.IdentityHashMap<java.lang.String,java.lang.String> map)
A map of pointid to classname.
|
void |
setExtensions(java.util.List<Extension> extensions) |
void |
setFile(java.io.File file) |
void |
setGlobalProperties(java.util.List<GlobalProperty> globalProperties) |
void |
setLog4j(org.w3c.dom.Document log4j) |
void |
setMandatory(boolean mandatory) |
void |
setMappingFiles(java.util.List<java.lang.String> mappingFiles) |
void |
setMessages(java.util.Map<java.lang.String,java.util.Properties> messages)
Sets the map from locale to properties used by this module.
|
void |
setModuleActivator(ModuleActivator moduleActivator) |
void |
setModuleId(java.lang.String moduleId) |
void |
setName(java.lang.String name) |
void |
setPackageName(java.lang.String packageName) |
void |
setPackagesWithMappedClasses(java.util.Set<java.lang.String> packagesToScan) |
void |
setPrivileges(java.util.List<Privilege> privileges) |
void |
setRequireDatabaseVersion(java.lang.String requireDatabaseVersion) |
void |
setRequiredModules(java.util.List<java.lang.String> requiredModules)
This is a convenience method to set all the required modules without any version requirements
|
java.util.Map<java.lang.String,java.lang.String> |
setRequiredModulesMap()
Get the modules that are required for this module.
|
void |
setRequiredModulesMap(java.util.Map<java.lang.String,java.lang.String> requiredModulesMap) |
void |
setRequireOpenmrsVersion(java.lang.String requireOpenmrsVersion) |
void |
setSqldiff(org.w3c.dom.Document sqldiff) |
void |
setStartupErrorMessage(java.lang.String e) |
void |
setStartupErrorMessage(java.lang.String exceptionMessage,
java.lang.Throwable t)
Add the given exceptionMessage and throwable as the startup error for this module.
|
void |
setUpdateURL(java.lang.String updateURL) |
void |
setUpdateVersion(java.lang.String updateVersion) |
void |
setVersion(java.lang.String version) |
java.lang.String |
toString() |
public Module(java.lang.String name)
name
- public Module(java.lang.String name, java.lang.String moduleId, java.lang.String packageName, java.lang.String author, java.lang.String description, java.lang.String version)
name
- moduleId
- packageName
- author
- description
- version
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
@Deprecated public Activator getActivator()
getModuleActivator()
public void setActivator(Activator activator)
activator
- the activator to setpublic ModuleActivator getModuleActivator()
public void setModuleActivator(ModuleActivator moduleActivator)
moduleActivator
- the moduleActivator to setpublic java.lang.String getActivatorName()
public void setActivatorName(java.lang.String activatorName)
activatorName
- the activatorName to setpublic java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
author
- the author to setpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- the description to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic java.lang.String getRequireDatabaseVersion()
public void setRequireDatabaseVersion(java.lang.String requireDatabaseVersion)
requireDatabaseVersion
- the requireDatabaseVersion to setpublic java.util.List<java.lang.String> getRequiredModules()
public java.lang.String getRequiredModuleVersion(java.lang.String moduleName)
public void setRequiredModules(java.util.List<java.lang.String> requiredModules)
requiredModules
- the requiredModules to set for this modulepublic void setRequiredModulesMap(java.util.Map<java.lang.String,java.lang.String> requiredModulesMap)
requiredModulesMap
- Map
of the requiredModule
s
to setpublic java.util.Map<java.lang.String,java.lang.String> setRequiredModulesMap()
public void setAwareOfModulesMap(java.util.Map<java.lang.String,java.lang.String> awareOfModulesMap)
awareOfModulesMap
- Map
of the
awareOfModulesMap
s to setpublic java.util.List<java.lang.String> getAwareOfModules()
public java.lang.String getAwareOfModuleVersion(java.lang.String awareOfModule)
public java.lang.String getRequireOpenmrsVersion()
public void setRequireOpenmrsVersion(java.lang.String requireOpenmrsVersion)
requireOpenmrsVersion
- the requireOpenmrsVersion to setpublic java.lang.String getModuleId()
public java.lang.String getModuleIdAsPath()
public void setModuleId(java.lang.String moduleId)
moduleId
- the module id to setpublic java.lang.String getPackageName()
public void setPackageName(java.lang.String packageName)
packageName
- the packageName to setpublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- the version to setpublic java.lang.String getUpdateURL()
public void setUpdateURL(java.lang.String updateURL)
updateURL
- the updateURL to setpublic java.lang.String getDownloadURL()
public void setDownloadURL(java.lang.String downloadURL)
downloadURL
- the downloadURL to setpublic java.lang.String getUpdateVersion()
public void setUpdateVersion(java.lang.String updateVersion)
updateVersion
- the updateVersion to setpublic java.util.List<Extension> getExtensions()
public void setExtensions(java.util.List<Extension> extensions)
extensions
- the extensions to setpublic void setExtensionNames(java.util.IdentityHashMap<java.lang.String,java.lang.String> map)
Extension
object. getExtensions()
is calledmap
- from pointid to classnameModuleFileParser
public java.util.List<AdvicePoint> getAdvicePoints()
public void setAdvicePoints(java.util.List<AdvicePoint> advicePoints)
advicePoints
- the advicePoints to setpublic java.io.File getFile()
public void setFile(java.io.File file)
public java.util.Map<java.lang.String,java.util.Properties> getMessages()
public void setMessages(java.util.Map<java.lang.String,java.util.Properties> messages)
messages
- map of locale to properties for that localepublic java.util.List<GlobalProperty> getGlobalProperties()
public void setGlobalProperties(java.util.List<GlobalProperty> globalProperties)
public java.util.List<Privilege> getPrivileges()
public void setPrivileges(java.util.List<Privilege> privileges)
public org.w3c.dom.Document getConfig()
public void setConfig(org.w3c.dom.Document config)
public org.w3c.dom.Document getLog4j()
public void setLog4j(org.w3c.dom.Document log4j)
public org.w3c.dom.Document getSqldiff()
public void setSqldiff(org.w3c.dom.Document sqldiff)
public java.util.List<java.lang.String> getMappingFiles()
public void setMappingFiles(java.util.List<java.lang.String> mappingFiles)
public java.util.Set<java.lang.String> getPackagesWithMappedClasses()
public void setPackagesWithMappedClasses(java.util.Set<java.lang.String> packagesToScan)
packagesToScan
- getPackagesWithMappedClasses()
public boolean isMandatory()
public void setMandatory(boolean mandatory)
public boolean isCoreModule()
ModuleConstants#CORE_MODULES}
public boolean isStarted()
public void setStartupErrorMessage(java.lang.String e)
public void setStartupErrorMessage(java.lang.String exceptionMessage, java.lang.Throwable t)
exceptionMessage
- optional. the default message to show on the first line of the error
messaget
- throwable stacktrace to include in the error messagepublic java.lang.String getStartupErrorMessage()
public java.lang.Boolean hasStartupError()
public void clearStartupError()
public java.lang.String toString()
toString
in class java.lang.Object
public void disposeAdvicePointsClassInstance()
public java.util.List<ModuleConditionalResource> getConditionalResources()
public void setConditionalResources(java.util.List<ModuleConditionalResource> conditionalResources)
public boolean isCore()
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.