|
|||||||||
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<Resource> org.opengts.db.tables.Resource
public class Resource
Nested Class Summary | |
---|---|
static class |
Resource.Dimension
|
static class |
Resource.Key
|
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 |
FLD_properties
|
static java.lang.String |
FLD_resourceID
|
static java.lang.String |
FLD_title
|
static java.lang.String |
FLD_type
|
static java.lang.String |
FLD_value
|
static java.lang.String |
PROP_HEIGHT
|
static java.lang.String |
PROP_ICON_HEIGHT
|
static java.lang.String |
PROP_ICON_URL
|
static java.lang.String |
PROP_ICON_WIDTH
|
static java.lang.String |
PROP_WIDTH
|
static java.lang.String |
RESID_PrivateLabel_Properties_
|
static java.lang.String |
RESID_TemporaryProperties
|
static java.lang.String |
TYPE_BINARY
|
static java.lang.String |
TYPE_COLOR
|
static java.lang.String |
TYPE_HTML
|
static java.lang.String |
TYPE_IMAGE_
|
static java.lang.String |
TYPE_IMAGE_GENERIC
|
static java.lang.String |
TYPE_IMAGE_GIF
|
static java.lang.String |
TYPE_IMAGE_JPEG
|
static java.lang.String |
TYPE_IMAGE_PNG
|
static java.lang.String |
TYPE_RTPROPS
|
static java.lang.String |
TYPE_TEXT
|
static java.lang.String |
TYPE_URL
|
static java.lang.String |
TYPE_URL_
|
static java.lang.String |
TYPE_URL_IMAGE
|
static java.lang.String |
TYPE_URL_PDF
|
static java.lang.String |
TYPE_XML
|
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 | |
---|---|
Resource()
|
|
Resource(Resource.Key key)
|
Method Summary | |
---|---|
protected static Resource |
_getResource(java.lang.String acctID,
java.lang.String resID)
|
protected static Resource |
_getResource(java.lang.String acctID,
java.lang.String resID,
boolean create)
|
RTProperties |
_getRTProperties()
|
protected void |
_setProperties(java.lang.String v)
|
protected static boolean |
_setResource(java.lang.String acctID,
java.lang.String resID,
java.lang.String type,
java.lang.String desc,
java.lang.Object value)
Creates/Sets the specified Resourse |
static Resource |
createNewResource(Account account,
java.lang.String resID)
Create new Resource with key will throw DBException if resource key already exists |
static boolean |
exists(java.lang.String acctID,
java.lang.String resID)
|
Resource.Dimension |
getDimension(int dftWidth,
int dftHeight)
|
static DBFactory<Resource> |
getFactory()
|
static java.lang.Object |
getGlobalResourceValue(java.lang.String resID)
Gets a global resource value (owned by the "sysadmin" account) |
Resource.Dimension |
getIconDimension(int dftWidth,
int dftHeight)
|
java.lang.String |
getIconURL(java.lang.String dft)
|
static RTProperties |
getPrivateLabelPropertiesForHost(java.lang.String hostName,
java.lang.String urlPath)
Gets the custom property resources for the specified hostname |
java.lang.String |
getProperties()
|
double |
getProperty(java.lang.String key,
double dft)
|
int |
getProperty(java.lang.String key,
int dft)
|
long |
getProperty(java.lang.String key,
long dft)
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String dft)
|
static Resource |
getResource(Account account,
java.lang.String resID)
|
static Resource |
getResource(Account account,
java.lang.String resID,
boolean create)
|
java.lang.String |
getResourceID()
|
static OrderedSet<java.lang.String> |
getResources(DBSelect<Resource> dsel)
|
static OrderedSet<java.lang.String> |
getResourcesForAccount(java.lang.String acctId,
java.lang.String startsWith)
|
RTProperties |
getRTProperties()
|
java.lang.String |
getStringValue()
|
static java.lang.String |
getTableDescription(java.util.Locale loc)
|
java.lang.String |
getTitle()
|
java.lang.String |
getType()
|
byte[] |
getValue()
|
boolean |
isBinaryType()
|
static boolean |
isBinaryType(java.lang.String type)
Returns true if the specified type represents a Binary value |
boolean |
isImage()
|
boolean |
isImageURL()
|
boolean |
isRTProperties()
|
boolean |
isStringType()
|
static boolean |
isStringType(java.lang.String type)
Returns true if the specified type represents a String |
boolean |
isURL()
|
static void |
main(java.lang.String[] args)
|
void |
setCreationDefaultValues()
Override to set default values |
static boolean |
setGlobalResourceValue(java.lang.String resID,
java.lang.String type,
java.lang.String desc,
java.lang.Object value)
Creates/Sets a global resource (owned by the "sysadmin" account) |
void |
setProperties(java.lang.String v)
|
static boolean |
setResource(Account account,
java.lang.String resID,
java.lang.String type,
java.lang.String desc,
java.lang.Object value)
Creates/Set the specified Resourse |
void |
setRTProperties(RTProperties v)
|
void |
setStringValue(java.lang.String v)
|
void |
setTitle(java.lang.String v)
|
void |
setType(java.lang.String v)
|
void |
setValue(byte[] v)
|
void |
setValue(java.lang.Object v)
|
static java.lang.String |
TABLE_NAME()
|
java.lang.String |
toString()
Returns a String representation of the DBRecordKey for this DBRecord |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RESID_TemporaryProperties
public static final java.lang.String RESID_PrivateLabel_Properties_
public static final java.lang.String TYPE_TEXT
public static final java.lang.String TYPE_XML
public static final java.lang.String TYPE_HTML
public static final java.lang.String TYPE_URL
public static final java.lang.String TYPE_URL_
public static final java.lang.String TYPE_URL_IMAGE
public static final java.lang.String TYPE_URL_PDF
public static final java.lang.String TYPE_IMAGE_
public static final java.lang.String TYPE_IMAGE_JPEG
public static final java.lang.String TYPE_IMAGE_GIF
public static final java.lang.String TYPE_IMAGE_PNG
public static final java.lang.String TYPE_IMAGE_GENERIC
public static final java.lang.String TYPE_BINARY
public static final java.lang.String TYPE_RTPROPS
public static final java.lang.String TYPE_COLOR
public static final java.lang.String PROP_WIDTH
public static final java.lang.String PROP_HEIGHT
public static final java.lang.String PROP_ICON_URL
public static final java.lang.String PROP_ICON_WIDTH
public static final java.lang.String PROP_ICON_HEIGHT
public static final java.lang.String FLD_resourceID
public static final java.lang.String FLD_type
public static final java.lang.String FLD_title
public static final java.lang.String FLD_properties
public static final java.lang.String FLD_value
Constructor Detail |
---|
public Resource()
public Resource(Resource.Key key)
Method Detail |
---|
public static boolean isStringType(java.lang.String type)
type
- The specified type
public static boolean isBinaryType(java.lang.String type)
type
- The specified type
public static java.lang.String TABLE_NAME()
public static DBFactory<Resource> getFactory()
public static java.lang.String getTableDescription(java.util.Locale loc)
public java.lang.String getResourceID()
public java.lang.String getTitle()
public void setTitle(java.lang.String v)
public java.lang.String getType()
public void setType(java.lang.String v)
public boolean isStringType()
public boolean isBinaryType()
public boolean isURL()
public boolean isImageURL()
public boolean isImage()
public boolean isRTProperties()
public java.lang.String getProperties()
public void setProperties(java.lang.String v)
protected void _setProperties(java.lang.String v)
public void setRTProperties(RTProperties v)
public RTProperties getRTProperties()
public RTProperties _getRTProperties()
public java.lang.String getProperty(java.lang.String key, java.lang.String dft)
public int getProperty(java.lang.String key, int dft)
public long getProperty(java.lang.String key, long dft)
public double getProperty(java.lang.String key, double dft)
public Resource.Dimension getDimension(int dftWidth, int dftHeight)
public java.lang.String getIconURL(java.lang.String dft)
public Resource.Dimension getIconDimension(int dftWidth, int dftHeight)
public byte[] getValue()
public void setValue(byte[] v)
public void setValue(java.lang.Object v)
public void setStringValue(java.lang.String v)
public java.lang.String getStringValue()
public void setCreationDefaultValues()
DBRecord
setCreationDefaultValues
in class DBRecord<Resource>
public java.lang.String toString()
DBRecord
toString
in class DBRecord<Resource>
public static boolean exists(java.lang.String acctID, java.lang.String resID) throws DBException
DBException
protected static Resource _getResource(java.lang.String acctID, java.lang.String resID) throws DBException
DBException
public static Resource getResource(Account account, java.lang.String resID) throws DBException
DBException
public static java.lang.Object getGlobalResourceValue(java.lang.String resID) throws DBException
DBException
public static Resource getResource(Account account, java.lang.String resID, boolean create) throws DBException
DBException
protected static Resource _getResource(java.lang.String acctID, java.lang.String resID, boolean create) throws DBException
DBException
public static Resource createNewResource(Account account, java.lang.String resID) throws DBException
account
- The AccountresID
- The Resource-ID
DBException
- if Account/Resource-ID already existspublic static boolean setResource(Account account, java.lang.String resID, java.lang.String type, java.lang.String desc, java.lang.Object value) throws DBException
account
- The AccountresID
- The Resource-IDtype
- The Resource typedesc
- The Resource descriptionvalue
- The Resource value
DBException
protected static boolean _setResource(java.lang.String acctID, java.lang.String resID, java.lang.String type, java.lang.String desc, java.lang.Object value) throws DBException
acctID
- The Account-IDresID
- The Resource-IDtype
- The Resource typedesc
- The Resource descriptionvalue
- The Resource value
DBException
public static boolean setGlobalResourceValue(java.lang.String resID, java.lang.String type, java.lang.String desc, java.lang.Object value) throws DBException
DBException
public static OrderedSet<java.lang.String> getResourcesForAccount(java.lang.String acctId, java.lang.String startsWith) throws DBException
DBException
public static OrderedSet<java.lang.String> getResources(DBSelect<Resource> dsel) throws DBException
DBException
public static RTProperties getPrivateLabelPropertiesForHost(java.lang.String hostName, java.lang.String urlPath)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |