public abstract class AbstractCloupiaModule extends CustomModule
ACCOUNT_ENTRY_TYPE, CATEGORY, CATEGORY_ID, CATEGORY_LABEL, CONTACT, DESCRIPTION, FORMAT, KEY, MODULE_FORMAT_V1, MODULE_ID, MODULE_ORG, MODULE_PROPERTIES, MODULE_SUBORG, NAME, properties, STATUS, UCSDVERSION, VERSION
Constructor and Description |
---|
AbstractCloupiaModule() |
Modifier and Type | Method and Description |
---|---|
void |
addScheduleTask(AbstractScheduleTask task)
Adds a schedule task to be executed by the system scheduler.
|
abstract CollectorFactory[] |
getCollectors()
External modules extending this class shall provide implementation for this method.
|
abstract CloupiaReport[] |
getReports()
External modules extending this class shall provide implementation for this method.
|
java.util.List<java.lang.String> |
getTableNames()
Iterates through the jdo.files contained in the jar to locate all the JDO annotated POJOs and returns
the table names for each POJO
|
abstract AbstractTask[] |
getTasks()
External modules extending this class shall provide implementation for this method.
|
abstract void |
onStart(CustomFeatureRegistry registry)
Use this method to execute any initialization tasks.
|
void |
registerCollectors() |
void |
registerComponents(CustomFeatureRegistry cfr) |
void |
registerReports(ReportRegistryProxy registry) |
void |
registerResourceLimiter(java.lang.String resourceTypeID,
java.lang.String resourceTypeLabel,
ResourceCountComputerIf computer)
Use this method to introduce new resource types which you would like to monitor for limiting purposes.
|
void |
registerRestFrameworkDefinitions(RestDefinitionWrapper wrapper) |
protected void |
registerTasks(CustomFeatureRegistry cfr) |
void |
removeScheduleTask(java.lang.String taskName)
Removes a schedule task from the system scheduler.
|
getCategoryID, getFeatureName, getFormat, getProperties, initFeature, isValidated
getDependecies, initForms, initHealthChecker, initReports, initSchedules, installMoPointer, updateGlobalCache
public void registerComponents(CustomFeatureRegistry cfr) throws java.lang.Exception
registerComponents
in class CustomModule
java.lang.Exception
protected void registerTasks(CustomFeatureRegistry cfr) throws java.lang.Exception
java.lang.Exception
public void registerReports(ReportRegistryProxy registry) throws java.lang.Exception
registerReports
in class CustomModule
java.lang.Exception
public void registerCollectors()
registerCollectors
in class CustomModule
public java.util.List<java.lang.String> getTableNames() throws java.io.IOException
java.io.IOException
public abstract void onStart(CustomFeatureRegistry registry)
registry
- The CustomFeatureRegistry gives you access to register various components into the system.public abstract AbstractTask[] getTasks()
public abstract CloupiaReport[] getReports()
public abstract CollectorFactory[] getCollectors()
public void addScheduleTask(AbstractScheduleTask task) throws java.lang.Exception
task
- the task to be added.java.lang.Exception
- an exception is thrown if the task's name is not unique.public void removeScheduleTask(java.lang.String taskName) throws java.lang.Exception
taskName
- the name of the task you wish to remove. this should be the same thing you put in your
implementation of com.cloupia.service.cIM.inframgr.AbstractScheduleTask.getScheduleTaskName().java.lang.Exception
- an exception is thrown when you try to remove a task you are not allowed to, i.e. tasks you
did not implement yourself.public void registerResourceLimiter(java.lang.String resourceTypeID, java.lang.String resourceTypeLabel, ResourceCountComputerIf computer)
resourceTypeID
- a string used to uniquely identify this resource type. it is recommended you prefix the id
with your moduleID, e.g. foo_lun_use_by_gb, foo_cpu_use_by_server.resourceTypeLabel
- this string is displayed in the Edit Resources Limit UI for this new type you introduced.computer
- an instance of ResourceCountComputerIf specifically designed to perform the usage of the particular
resource you have just introduced.public void registerRestFrameworkDefinitions(RestDefinitionWrapper wrapper)