com.serotonin.m2m2.module
Class PublisherDefinition

java.lang.Object
  extended by com.serotonin.m2m2.module.ModuleElementDefinition
      extended by com.serotonin.m2m2.module.PublisherDefinition

public abstract class PublisherDefinition
extends ModuleElementDefinition

A publisher allows point values to be written (or published) to targets outside of the m2m2 instance. Typically any data points can be provided to a publisher regardless of the data source. When creating a publisher for m2m2, the following components are required:

Subclass of PublisherVO
A configuration object of a publisher
Subclass of PublishedPointVO
A configuration object of a published point
Subclass of PublisherRT
A runtime implementation of the publisher.
Editing JSP
The page on which a user can edit an instance of the publisher
Subclass of PublisherEditDwr
The server-side AJAX controller for the editing JSP
Optional
Online documentation files, translation files (strongly recommended), publisher commissioning tools.

Author:
Matthew Lohbihler

Constructor Summary
PublisherDefinition()
           
 
Method Summary
 com.serotonin.m2m2.vo.publish.PublisherVO<?> baseCreatePublisherVO()
          Used by m2m2 core code to create a new publisher instance as required.
protected abstract  com.serotonin.m2m2.vo.publish.PublisherVO<? extends com.serotonin.m2m2.vo.publish.PublishedPointVO> createPublisherVO()
          Create and return an instance of the publisher.
abstract  java.lang.String getDescriptionKey()
          A reference to a human readable and translatable brief description of the publisher.
abstract  java.lang.Class<?> getDwrClass()
          The class of the DWR page with which the publisher editing page communicates.
abstract  java.lang.String getEditPagePath()
          The path to the publisher editing page relative to the module.
abstract  java.lang.String getPublisherTypeName()
          An internal identifier for this type of publisher.
 
Methods inherited from class com.serotonin.m2m2.module.ModuleElementDefinition
getModule, initialize, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublisherDefinition

public PublisherDefinition()
Method Detail

baseCreatePublisherVO

public com.serotonin.m2m2.vo.publish.PublisherVO<?> baseCreatePublisherVO()
Used by m2m2 core code to create a new publisher instance as required. Should not be used by client code.


getPublisherTypeName

public abstract java.lang.String getPublisherTypeName()
An internal identifier for this type of publisher. Must be unique within an m2m2 instance, and is recommended to be unique inasmuch as possible across all modules.

Returns:
the publisher type name.

getDescriptionKey

public abstract java.lang.String getDescriptionKey()
A reference to a human readable and translatable brief description of the publisher. Key reference values in i18n.properties files. Descriptions are used in drop down select boxes, and so should be as brief as possible.

Returns:
the reference key to the publisher short description.

createPublisherVO

protected abstract com.serotonin.m2m2.vo.publish.PublisherVO<? extends com.serotonin.m2m2.vo.publish.PublishedPointVO> createPublisherVO()
Create and return an instance of the publisher.

Returns:
a new instance of the publisher.

getEditPagePath

public abstract java.lang.String getEditPagePath()
The path to the publisher editing page relative to the module.

Returns:
the relative path to the editing page.

getDwrClass

public abstract java.lang.Class<?> getDwrClass()
The class of the DWR page with which the publisher editing page communicates. This class will be instantiated upon startup and registered as a DWR proxy.

Returns:
the class of the DWR proxy.