|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.dbtools.DBRecord<RT> org.opengts.db.AccountRecord<RT> org.opengts.db.DeviceRecord<StatusCode> org.opengts.db.tables.StatusCode
public class StatusCode
Nested Class Summary | |
---|---|
static class |
StatusCode.Key
|
Nested classes/interfaces inherited from class org.opengts.db.DeviceRecord |
---|
DeviceRecord.DeviceKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.db.AccountRecord |
---|
AccountRecord.AccountKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.dbtools.DBRecord |
---|
DBRecord.DBChangeListener |
Field Summary | |
---|---|
static java.lang.String |
_TABLE_NAME
|
static java.lang.String |
ALL_DEVICES
|
static java.lang.String |
FLD_backgroundColor
|
static java.lang.String |
FLD_foregroundColor
|
static java.lang.String |
FLD_iconName
|
static java.lang.String |
FLD_iconSelector
|
static java.lang.String |
FLD_statusCode
|
static java.lang.String |
FLD_statusName
|
Fields inherited from class org.opengts.db.DeviceRecord |
---|
FLD_deviceID |
Fields inherited from class org.opengts.db.AccountRecord |
---|
FLD_accountID, FLD_displayName, FLD_isActive, FLD_notes |
Fields inherited from class org.opengts.dbtools.DBRecord |
---|
errorDescription, excludedUpdateFields, FLD_creationMillis, FLD_creationTime, FLD_description, FLD_lastUpdateAccount, FLD_lastUpdateTime, FLD_lastUpdateUser, hasError, ID_SIZE, isValidating, lastSQLException, NOTIFY_GROUP, PSEUDO_FIELD_CHAR, tempProps |
Constructor Summary | |
---|---|
StatusCode()
|
|
StatusCode(StatusCode.Key key)
|
Method Summary | |
---|---|
static StatusCode |
createNewStatusCode(Account account,
java.lang.String deviceID,
int code)
|
static boolean |
exists(java.lang.String accountID,
java.lang.String deviceID,
int code)
|
static StatusCode |
findStatusCode(java.lang.String accountID,
java.lang.String deviceID,
int statusCode)
|
java.lang.String |
getBackgroundColor()
Gets the String represntation of the background color |
static java.lang.String |
getBackgroundColor(Device device,
int statusCode,
BasicPrivateLabel bpl,
java.lang.String dftColor)
|
static java.lang.String |
getBackgroundColor(java.lang.String accountID,
int statusCode,
BasicPrivateLabel bpl,
java.lang.String dftColor)
|
CssStyle |
getCssStyle()
Returns a CssStyle instance if this status code has any foreground/background color, or null if no colors are defined. |
static java.lang.String |
getDescription(Device device,
int statusCode,
BasicPrivateLabel bpl,
java.lang.String dftDesc)
|
java.lang.String |
getDescription(java.util.Locale locale)
StatusCodeProvider interface Gets the Decription of this status code |
static java.lang.String |
getDescription(java.lang.String accountID,
int statusCode,
BasicPrivateLabel bpl,
java.lang.String dftDesc)
|
static DBFactory<StatusCode> |
getFactory()
|
java.lang.String |
getForegroundColor()
Gets the String represntation of the foreground color |
static java.lang.String |
getForegroundColor(Device device,
int statusCode,
BasicPrivateLabel bpl,
java.lang.String dftColor)
|
static java.lang.String |
getForegroundColor(java.lang.String accountID,
int statusCode,
BasicPrivateLabel bpl,
java.lang.String dftColor)
|
java.lang.String |
getHtmlDescription()
Gets the description text with the foreground/background colors wrapped in a <div style="...">DESCRPTION</div> |
java.lang.String |
getIconName()
Gets the Icon name |
static java.lang.String |
getIconName(Device device,
int statusCode,
BasicPrivateLabel bpl)
|
java.lang.String |
getIconSelector()
Gets the Icon RuleFactory selector. |
static java.lang.String |
getIconSelector(Device device,
int statusCode,
BasicPrivateLabel bpl)
|
int |
getStatusCode()
Gets the status code value |
static StatusCode |
getStatusCode(Account account,
java.lang.String deviceID,
int code)
|
static StatusCode |
getStatusCode(Account account,
java.lang.String deviceID,
int code,
boolean createOK)
|
static StatusCode |
getStatusCode(java.lang.String accountID,
java.lang.String deviceID,
int code)
|
static StatusCodeProvider |
getStatusCodeProvider(Device device,
int statusCode,
BasicPrivateLabel bpl,
StatusCodeProvider dftSCP)
|
static StatusCodeProvider |
getStatusCodeProvider(java.lang.String accountID,
int statusCode,
BasicPrivateLabel bpl,
StatusCodeProvider dftSCP)
|
static int[] |
getStatusCodes(java.lang.String accountID,
java.lang.String deviceID)
|
java.lang.String |
getStatusName()
Gets the status code name |
java.lang.String |
getStyleString()
Gets the CSS style string |
static java.lang.String |
getTableDescription(java.util.Locale loc)
Gets the table description |
boolean |
hasStyle()
Returns true if this status code has foreground/background color |
static void |
main(java.lang.String[] argv)
|
void |
setBackgroundColor(ColorTools.RGB rgb)
Sets the ColorTools.RGB represntation of the background color |
void |
setBackgroundColor(java.lang.String v)
Sets the String represntation of the background color |
void |
setCreationDefaultValues()
Callback to set the record creation default values |
void |
setForegroundColor(ColorTools.RGB rgb)
Sets the ColorTools.RGB represntation of the foreground color |
void |
setForegroundColor(java.lang.String v)
Sets the String represntation of the foreground color |
void |
setIconName(java.lang.String v)
Sets the Icon name |
void |
setIconSelector(java.lang.String v)
Sets the Icon RuleFactory selector. |
void |
setStatusCode(int v)
Sets the status code value |
void |
setStatusName(java.lang.String v)
Sets the status code name |
static java.lang.String |
TABLE_NAME()
|
java.lang.String |
toString()
Gets the String representation |
Methods inherited from class org.opengts.db.DeviceRecord |
---|
getDevice, getDeviceDescription, getDeviceID, getDeviceVIN, hasDevice, newField_deviceID, newField_deviceID, newField_deviceID, newField_deviceID, setDevice, setDeviceID |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ALL_DEVICES
public static final java.lang.String _TABLE_NAME
public static final java.lang.String FLD_statusCode
public static final java.lang.String FLD_statusName
public static final java.lang.String FLD_foregroundColor
public static final java.lang.String FLD_backgroundColor
public static final java.lang.String FLD_iconSelector
public static final java.lang.String FLD_iconName
Constructor Detail |
---|
public StatusCode()
public StatusCode(StatusCode.Key key)
Method Detail |
---|
public static java.lang.String TABLE_NAME()
public static DBFactory<StatusCode> getFactory()
public static java.lang.String getTableDescription(java.util.Locale loc)
public int getStatusCode()
getStatusCode
in interface StatusCodeProvider
public void setStatusCode(int v)
v
- The status code valuepublic java.lang.String getStatusName()
public void setStatusName(java.lang.String v)
v
- The status code namepublic java.lang.String getForegroundColor()
getForegroundColor
in interface StatusCodeProvider
public void setForegroundColor(java.lang.String v)
v
- The foreground colorpublic void setForegroundColor(ColorTools.RGB rgb)
rgb
- The foreground colorpublic java.lang.String getBackgroundColor()
getBackgroundColor
in interface StatusCodeProvider
public void setBackgroundColor(java.lang.String v)
v
- The background colorpublic void setBackgroundColor(ColorTools.RGB rgb)
rgb
- The background colorpublic java.lang.String getIconSelector()
getIconSelector
in interface StatusCodeProvider
public void setIconSelector(java.lang.String v)
v
- The Icon selectorpublic java.lang.String getIconName()
getIconName
in interface StatusCodeProvider
public void setIconName(java.lang.String v)
v
- The Icon namepublic java.lang.String getDescription(java.util.Locale locale)
getDescription
in interface StatusCodeProvider
locale
- The Locale (currently ignored)
public boolean hasStyle()
hasStyle
in interface StatusCodeProvider
public CssStyle getCssStyle()
public java.lang.String getStyleString()
getStyleString
in interface StatusCodeProvider
public java.lang.String getHtmlDescription()
<div style="...">DESCRPTION</div>
public java.lang.String toString()
toString
in class DBRecord<StatusCode>
public void setCreationDefaultValues()
setCreationDefaultValues
in class DBRecord<StatusCode>
public static StatusCode findStatusCode(java.lang.String accountID, java.lang.String deviceID, int statusCode)
public static StatusCodeProvider getStatusCodeProvider(Device device, int statusCode, BasicPrivateLabel bpl, StatusCodeProvider dftSCP)
public static StatusCodeProvider getStatusCodeProvider(java.lang.String accountID, int statusCode, BasicPrivateLabel bpl, StatusCodeProvider dftSCP)
public static java.lang.String getDescription(Device device, int statusCode, BasicPrivateLabel bpl, java.lang.String dftDesc)
public static java.lang.String getDescription(java.lang.String accountID, int statusCode, BasicPrivateLabel bpl, java.lang.String dftDesc)
public static java.lang.String getForegroundColor(Device device, int statusCode, BasicPrivateLabel bpl, java.lang.String dftColor)
public static java.lang.String getForegroundColor(java.lang.String accountID, int statusCode, BasicPrivateLabel bpl, java.lang.String dftColor)
public static java.lang.String getBackgroundColor(Device device, int statusCode, BasicPrivateLabel bpl, java.lang.String dftColor)
public static java.lang.String getBackgroundColor(java.lang.String accountID, int statusCode, BasicPrivateLabel bpl, java.lang.String dftColor)
public static java.lang.String getIconSelector(Device device, int statusCode, BasicPrivateLabel bpl)
public static java.lang.String getIconName(Device device, int statusCode, BasicPrivateLabel bpl)
public static boolean exists(java.lang.String accountID, java.lang.String deviceID, int code) throws DBException
DBException
public static StatusCode getStatusCode(java.lang.String accountID, java.lang.String deviceID, int code) throws DBException
DBException
public static StatusCode getStatusCode(Account account, java.lang.String deviceID, int code) throws DBException
DBException
public static StatusCode getStatusCode(Account account, java.lang.String deviceID, int code, boolean createOK) throws DBException
DBException
public static StatusCode createNewStatusCode(Account account, java.lang.String deviceID, int code) throws DBException
DBException
public static int[] getStatusCodes(java.lang.String accountID, java.lang.String deviceID) throws DBException
DBException
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |