public abstract class DataSourceVO<T extends DataSourceVO<?>> extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, com.serotonin.json.JsonSerializable, ChangeComparable<T>
Modifier and Type | Class and Description |
---|---|
static class |
DataSourceVO.Type |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Integer,java.lang.Integer> |
alarmLevels |
private boolean |
enabled |
private int |
id |
private java.lang.String |
name |
private static long |
serialVersionUID |
private static int |
version |
private java.lang.String |
xid |
static java.lang.String |
XID_PREFIX |
Constructor and Description |
---|
DataSourceVO() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addEventTypes(java.util.List<EventTypeVO> eventTypes) |
void |
addProperties(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list) |
protected abstract void |
addPropertiesImpl(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list) |
void |
addPropertyChanges(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list,
T from) |
protected abstract void |
addPropertyChangesImpl(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list,
T from) |
DataSourceVO<?> |
copy() |
abstract DataSourceRT |
createDataSourceRT() |
static DataSourceVO<?> |
createDataSourceVO(int typeId) |
protected EventTypeVO |
createEventType(int eventId,
com.serotonin.web.i18n.LocalizableMessage message) |
protected EventTypeVO |
createEventType(int eventId,
com.serotonin.web.i18n.LocalizableMessage message,
int duplicateHandling,
int defaultAlarmLevel) |
abstract PointLocatorVO |
createPointLocator() |
protected java.lang.Integer |
deserializeUpdatePeriodType(com.serotonin.json.JsonObject json) |
static java.lang.String |
generateXid() |
int |
getAlarmLevel(int eventId,
int defaultLevel) |
abstract com.serotonin.web.i18n.LocalizableMessage |
getConnectionDescription() |
abstract ExportCodes |
getEventCodes() |
EventTypeVO |
getEventType(int eventId) |
java.util.List<EventTypeVO> |
getEventTypes() |
int |
getId() |
protected java.lang.String |
getMessage(java.util.ResourceBundle bundle,
java.lang.String key,
java.lang.Object... args) |
java.lang.String |
getName() |
abstract DataSourceVO.Type |
getType() |
java.lang.String |
getTypeKey() |
java.lang.String |
getXid() |
boolean |
isEnabled() |
boolean |
isNew() |
void |
jsonDeserialize(com.serotonin.json.JsonReader reader,
com.serotonin.json.JsonObject json) |
void |
jsonSerialize(java.util.Map<java.lang.String,java.lang.Object> map) |
private void |
readObject(java.io.ObjectInputStream in) |
protected void |
serializeUpdatePeriodType(java.util.Map<java.lang.String,java.lang.Object> map,
int updatePeriodType) |
void |
setAlarmLevel(int eventId,
int level) |
void |
setEnabled(boolean enabled) |
void |
setId(int id) |
void |
setName(java.lang.String name) |
void |
setXid(java.lang.String xid) |
void |
validate(com.serotonin.web.dwr.DwrResponseI18n response) |
private void |
writeObject(java.io.ObjectOutputStream out) |
public static final java.lang.String XID_PREFIX
private int id
private java.lang.String xid
private java.lang.String name
private boolean enabled
private java.util.Map<java.lang.Integer,java.lang.Integer> alarmLevels
private static final long serialVersionUID
private static final int version
public static DataSourceVO<?> createDataSourceVO(int typeId)
public static java.lang.String generateXid()
public abstract DataSourceVO.Type getType()
public abstract com.serotonin.web.i18n.LocalizableMessage getConnectionDescription()
public abstract PointLocatorVO createPointLocator()
public abstract DataSourceRT createDataSourceRT()
public abstract ExportCodes getEventCodes()
public final java.util.List<EventTypeVO> getEventTypes()
protected abstract void addEventTypes(java.util.List<EventTypeVO> eventTypes)
public boolean isNew()
public boolean isEnabled()
public void setEnabled(boolean enabled)
public int getId()
getId
in interface ChangeComparable<T extends DataSourceVO<?>>
public void setId(int id)
public java.lang.String getXid()
public void setXid(java.lang.String xid)
public java.lang.String getName()
public void setName(java.lang.String name)
public void setAlarmLevel(int eventId, int level)
public int getAlarmLevel(int eventId, int defaultLevel)
public EventTypeVO getEventType(int eventId)
protected EventTypeVO createEventType(int eventId, com.serotonin.web.i18n.LocalizableMessage message)
protected EventTypeVO createEventType(int eventId, com.serotonin.web.i18n.LocalizableMessage message, int duplicateHandling, int defaultAlarmLevel)
public void validate(com.serotonin.web.dwr.DwrResponseI18n response)
protected java.lang.String getMessage(java.util.ResourceBundle bundle, java.lang.String key, java.lang.Object... args)
public DataSourceVO<?> copy()
public java.lang.String getTypeKey()
getTypeKey
in interface ChangeComparable<T extends DataSourceVO<?>>
public final void addProperties(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list)
addProperties
in interface ChangeComparable<T extends DataSourceVO<?>>
public final void addPropertyChanges(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list, T from)
addPropertyChanges
in interface ChangeComparable<T extends DataSourceVO<?>>
protected abstract void addPropertiesImpl(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list)
protected abstract void addPropertyChangesImpl(java.util.List<com.serotonin.web.i18n.LocalizableMessage> list, T from)
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void jsonSerialize(java.util.Map<java.lang.String,java.lang.Object> map)
jsonSerialize
in interface com.serotonin.json.JsonSerializable
public void jsonDeserialize(com.serotonin.json.JsonReader reader, com.serotonin.json.JsonObject json) throws com.serotonin.json.JsonException
jsonDeserialize
in interface com.serotonin.json.JsonSerializable
com.serotonin.json.JsonException
protected void serializeUpdatePeriodType(java.util.Map<java.lang.String,java.lang.Object> map, int updatePeriodType)
protected java.lang.Integer deserializeUpdatePeriodType(com.serotonin.json.JsonObject json) throws com.serotonin.json.JsonException
com.serotonin.json.JsonException