|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.JDBCResourceKind
com.sage.orion.sdata.servlet.swtservice.UIContentResourceKind
public class UIContentResourceKind
This class handles the UIContent Resource kind
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.JDBCResourceKind |
---|
JDBCResourceKind.HTTPMethodsAuthorizator, JDBCResourceKind.ResourceAuthorizator, JDBCResourceKind.ResourceDataAuthorizator |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_APPWIDE_CATEGORY
|
static java.lang.String |
RESOURCE_KIND_TABLE_NAME
|
Fields inherited from class com.sage.orion.sdata.servlet.JDBCResourceKind |
---|
ADD, ALTER_TABLE, AND, CLOSE_BRACE, COMMA, CONSTRAINT, DEFAULT, DEFAULT_LANGUAGE_CODE, DELETE_FROM, DROP, FROM, NOT_NULL, OPEN_BRACE, PRIMARY_KEY, SELECT, UICONTENT_SQL_SELECT_STMT, VARCHAR_50, WHERE |
Constructor Summary | |
---|---|
UIContentResourceKind(ApplicationContext context,
ConnectionPool connectionPool,
java.lang.String authToken)
Constructor |
Method Summary | |
---|---|
protected static void |
doCreateTable(ApplicationContext context,
java.sql.Connection connection,
JDBCDatabaseType databaseType)
If table does not exist in the underlying database then create the table and populate it with data from UIContent xml files. |
void |
freeConnection(java.sql.Connection connection)
Free the connection in connection pool. |
protected java.util.List<FieldDefinition> |
getAllFields()
returns a list of FieldDefinitions in the ResourceKind |
protected java.lang.String |
getCalculateFieldValue(java.lang.String value,
SDataRequest request,
java.sql.ResultSet resultSet,
int fieldIndex)
Get the value of the calculated field, if it is a regular (non-calculated) field then the original value will be returned unchanged |
java.sql.Connection |
getConnection()
Gets a JDBC connection from the underlying connection pool associated with the resource kind. |
SDataResourceElement |
getFieldData(SDataRequest request,
java.sql.ResultSet resultSet,
int fieldIndex)
Get the specified field's data from the resultSet and packs the data in SDataResourceElement |
java.lang.String |
getKeyValueForKeyName(java.sql.ResultSet resultSet)
returns the key value based on the primary key |
protected int |
getMaxFeedCount()
Gets the maximum number of entries to be returned by the resource kind. |
java.lang.String |
getName()
|
java.lang.String[] |
getPrimaryKey()
Get the primary key of the underlying JDBC table for which one JDBCResourceKindImpl is created |
SDataSchema |
getSchema()
Get the SDataSchema which has the functionality to convert the underlying JDBC table's meta data into text(xml) form so that it can be transmitted over wire |
protected java.lang.String |
getTableName()
Get the JDBC table name for which ResourceKindImpl is created |
boolean |
isUserSpecificResource()
Indicates whether the resource is user specific or not. |
protected boolean |
requiresSignon()
Indicates whether the user needs to sign on in order to access the resource kind. |
protected boolean |
supportDelete()
Indicates whether the ResourceKind in general supports DELETE or not. |
protected boolean |
supportGet()
Indicates whether the ResourceKind in general supports GET or not. |
protected boolean |
supportPost()
Indicates whether the ResourceKind in general supports POST or not. |
protected boolean |
supportPut()
Indicates whether the ResourceKind in general supports PUT or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sage.orion.sdata.servlet.ResourceKind |
---|
getInstance, handleRequest, shutdown |
Field Detail |
---|
public static final java.lang.String RESOURCE_KIND_TABLE_NAME
public static final java.lang.String DEFAULT_APPWIDE_CATEGORY
Constructor Detail |
---|
public UIContentResourceKind(ApplicationContext context, ConnectionPool connectionPool, java.lang.String authToken)
context
- SData application contextconnectionPool
- connectionPool of the underline DBauthToken
- the authentication tokenMethod Detail |
---|
protected static void doCreateTable(ApplicationContext context, java.sql.Connection connection, JDBCDatabaseType databaseType)
context
- SData application contextconnection
- The database connection.databaseType
- JDBC database typepublic java.lang.String[] getPrimaryKey()
JDBCResourceKind
getPrimaryKey
in class JDBCResourceKind
protected java.lang.String getTableName()
JDBCResourceKind
getTableName
in class JDBCResourceKind
public java.lang.String getName()
getName
in interface ResourceKind
protected java.util.List<FieldDefinition> getAllFields()
getAllFields
in class JDBCResourceKind
protected java.lang.String getCalculateFieldValue(java.lang.String value, SDataRequest request, java.sql.ResultSet resultSet, int fieldIndex)
getCalculateFieldValue
in class JDBCResourceKind
value
- value of the fieldrequest
- the input SDataRequestresultSet
- resultSet returned by queryfieldIndex
- fieldIndex - 0-based
protected int getMaxFeedCount()
getMaxFeedCount
in class JDBCResourceKind
public boolean isUserSpecificResource()
isUserSpecificResource
in class JDBCResourceKind
protected boolean requiresSignon()
requiresSignon
in class JDBCResourceKind
protected boolean supportDelete()
supportDelete
in class JDBCResourceKind
protected boolean supportGet()
supportGet
in class JDBCResourceKind
protected boolean supportPost()
supportPost
in class JDBCResourceKind
protected boolean supportPut()
supportPut
in class JDBCResourceKind
public SDataResourceElement getFieldData(SDataRequest request, java.sql.ResultSet resultSet, int fieldIndex) throws java.sql.SQLException
JDBCResourceKind
getFieldData
in class JDBCResourceKind
request
- SDataRequest requestresultSet
- the result set from which the specified field data is retrievedfieldIndex
- the index of the field
java.sql.SQLException
- SQLExceptionpublic SDataSchema getSchema()
getSchema
in class JDBCResourceKind
public java.sql.Connection getConnection()
getConnection
in class JDBCResourceKind
public void freeConnection(java.sql.Connection connection)
freeConnection
in class JDBCResourceKind
connection
- Current JDBC connectionpublic java.lang.String getKeyValueForKeyName(java.sql.ResultSet resultSet) throws java.sql.SQLException
getKeyValueForKeyName
in class JDBCResourceKind
resultSet
- ResultSet
java.sql.SQLException
- SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |