|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sybase.uep.bobclient.data.CommonMBOModel
public abstract class CommonMBOModel
Stores common information of MBO model
Field Summary | |
---|---|
protected DatabaseMetaData |
_databaseMetaData
DatabaseMetaData of the MYDatabaseMetaData class |
protected AppLoggerWrapper |
_log
application Log utility |
protected MBOMobileApplication |
_mboApp
MBOMobileApplication |
protected ClassMetaData |
_metaData
meta data of the Class that is generated for the MBO application. |
static long |
KEY
|
static int |
PENDING_OP_SCOPE_MBO
Pending operation submit scope constant: MBO level |
static int |
PENDING_OP_SCOPE_PACKAGE
Pending operation submit scope constant: package level |
static int |
PENDING_OP_SCOPE_SYNCGROUP
Pending operation submit scope constant: synchronization group level, which is the default value is not specified |
static int |
SYNCHRONIZATION_NORMAL
Normal synchronization type. |
static int |
SYNCHRONIZATION_NOTIFICATION
SIS synchronization type. |
Constructor Summary | |
---|---|
CommonMBOModel()
|
Method Summary | |
---|---|
void |
addModelChangeListener(IModelChangeListener listener)
Registers a listener |
static void |
deleteDatabase(java.lang.String packageName)
Deletes ULJ database file that is used in client |
void |
fireModelChanged(ModelChangeEvent event)
Notifies the listeners. |
static void |
fireSyncEvent(java.lang.String packageName,
java.lang.String synGroup)
Fire sync type model change event based on the package name and the sync group |
static void |
fireSyncEvent(java.lang.String packageName,
java.util.Vector synGroupList)
Fire sync type model change event based on the package name and the sync group list |
DataType |
getDataType(java.lang.String attributeName)
Get the data type for a specific attribute |
java.lang.String |
getID()
Get MBO ID |
java.util.Date |
getLastSynchronized()
Get the last time the MBO was synced |
static Logger |
getLogger()
Get the logger for application trace |
static LogRecord[] |
getLogs(Query q)
Get application trace logs |
ClassMetaData |
getMetaData()
Get MBO meta data |
java.lang.String |
getName()
Get MBO name |
java.lang.String |
getPackageName()
Gets the package name of the MBO |
java.lang.String |
getProfileRefID()
Get the mobile application reference ID |
abstract java.lang.String |
getSynchronizationGroup()
Obtains the synchronization group registered by this MBO; Returns null if no synchronization group found |
static SynchronizationGroup |
getSynchronizationGroup(java.lang.String packageName,
java.lang.String syncGroup)
Retrieve the SynchronizationGroup based on the package name and the sync group name |
static ConnectionProfile |
getSynchronizationProfile(java.lang.String packageName)
Retrieve the synchronization connection profile being used in the current package |
static ConnectionProfile |
getSynchronizationProfile(java.lang.String packageName,
java.lang.String clientName)
Retrieve the synchronization connection profile being used in the current package for Options Module |
int |
getType()
Return the type of the mbo model |
java.lang.Object |
invoke(java.lang.Object mbo,
java.lang.String operationName,
ObjectList paramValueList)
Wrapper the invoke method of reflection manager. |
java.lang.Object |
invoke(java.lang.Object mbo,
java.lang.String operationName,
java.lang.String[] paramTypeList,
ObjectList paramValueList)
Wrapper the invoke method of reflection manager |
abstract boolean |
isSynchronized()
Gets whether this MBO application has been synchronized. |
static void |
loginToSync(java.lang.String packageName,
java.lang.String username,
java.lang.String password)
login to sync |
static void |
registerCallbackHandler(java.lang.String packageName,
CallbackHandler handler)
Starts the background synchronization on the synchronization groups. |
void |
removeModelChangeListener(IModelChangeListener listener)
Removes a listener |
static void |
startBackgroundSynchronization(java.util.Hashtable packageSyncGroupMap,
int syncType)
Starts the background synchronization on the synchronization groups. |
static void |
startBackgroundSynchronization(java.lang.String packageName,
java.util.Vector syncGroupList,
int syncType)
Starts the background synchronization on the synchronization groups. |
static void |
submitPendingOperations(java.lang.String packageName)
|
static void |
submitPendingOperations(java.lang.String packageName,
java.lang.String syncGroup)
Submits all pending operations |
void |
synchronize()
Synchronizes the MBO application. |
void |
synchronize(SyncStatusListener syncStatusListener)
Synchronizes the MBO application with a sync status listener |
abstract void |
synchronize(SyncStatusListener syncStatusListener,
int pendingOpScope)
Synchronizes the MBO application with a sync status listener and pending operation scope |
static void |
syncSyncGroup(java.lang.String packageName,
java.lang.String syncGroup,
SyncStatusListener syncStatusListener)
Synchronizes the given synchronization group. |
static void |
syncSyncGroupNoSubmit(java.lang.String packageName,
java.lang.String syncGroup,
SyncStatusListener syncStatusListener)
Synchronizes the given synchronization group without submit any pending operations. |
static void |
uploadLogs()
Upload the logs for application trace |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PENDING_OP_SCOPE_PACKAGE
public static final int PENDING_OP_SCOPE_SYNCGROUP
public static final int PENDING_OP_SCOPE_MBO
protected MBOMobileApplication _mboApp
protected ClassMetaData _metaData
protected AppLoggerWrapper _log
protected DatabaseMetaData _databaseMetaData
public static final long KEY
public static final int SYNCHRONIZATION_NORMAL
public static final int SYNCHRONIZATION_NOTIFICATION
Constructor Detail |
---|
public CommonMBOModel()
Method Detail |
---|
public void addModelChangeListener(IModelChangeListener listener)
listener
- public java.lang.String getProfileRefID()
public abstract boolean isSynchronized()
public abstract java.lang.String getSynchronizationGroup()
public void synchronize() throws java.lang.Exception
NoSuchOperationException
- if synchronize() is not defined in
corresponding database class.
java.lang.Exception
public void synchronize(SyncStatusListener syncStatusListener) throws java.lang.Exception
syncStatusListener
- - Sync status listener
NoSuchOperationException
- if synchronize( SyncStatusListener ) is not defined in
corresponding database class.
java.lang.Exception
public abstract void synchronize(SyncStatusListener syncStatusListener, int pendingOpScope) throws java.lang.Exception
syncStatusListener
- - Sync status listenerpendingOpScope
- - @see PENDING_OP_SCOPE_SYNCGROUP
, PENDING_OP_SCOPE_MBO
, PENDING_OP_SCOPE_PACKAGE
NoSuchOperationException
- if synchronize( SyncStatusListener ) is not defined in
corresponding database class.
java.lang.Exception
public static void syncSyncGroup(java.lang.String packageName, java.lang.String syncGroup, SyncStatusListener syncStatusListener) throws java.lang.Exception
packageName
- - package name of the client applicationsyncGroup
- - synchronization group to syncsyncStatusListener
- - sync status listener
java.lang.Exception
public static void syncSyncGroupNoSubmit(java.lang.String packageName, java.lang.String syncGroup, SyncStatusListener syncStatusListener) throws java.lang.Exception
packageName
- - package name of the client applicationsyncGroup
- - syncGroup to syncsyncStatusListener
- - sync status listenerpendingOpScope
- - @see PENDING_OP_SCOPE_SYNCGROUP
, PENDING_OP_SCOPE_MBO
, PENDING_OP_SCOPE_PACKAGE
java.lang.Exception
public static void fireSyncEvent(java.lang.String packageName, java.lang.String synGroup)
packageName
- String
value for the package namesynGroup
- String
value for the sync group namepublic static void fireSyncEvent(java.lang.String packageName, java.util.Vector synGroupList)
packageName
- String
value for the package namesynGroupList
- Vector
value for the sync group listpublic static void submitPendingOperations(java.lang.String packageName)
public static void submitPendingOperations(java.lang.String packageName, java.lang.String syncGroup)
packageName
- - package name of the profile to syncpublic java.lang.String getID()
public java.lang.String getName()
public ClassMetaData getMetaData()
public java.util.Date getLastSynchronized()
public void fireModelChanged(ModelChangeEvent event)
event
- public void removeModelChangeListener(IModelChangeListener listener)
listener
- public DataType getDataType(java.lang.String attributeName)
attributeName
- - name of the attribute
public static void loginToSync(java.lang.String packageName, java.lang.String username, java.lang.String password) throws java.lang.Exception
packageName
- - package name of the profile to syncusername
- - user namepassword
- - password
NoSuchOperationException
- if loginToSync() is not defined in
corresponding database class.
java.lang.Exception
public static ConnectionProfile getSynchronizationProfile(java.lang.String packageName, java.lang.String clientName) throws java.lang.Exception
packageName
- String
value for the package nameclientName
- String
value for the database class name
ConnectionProfile
object of the synchronization connection profile
NoSuchOperationException
- if getSynchronizationProfile() is not defined in
corresponding database class.
java.lang.Exception
public static ConnectionProfile getSynchronizationProfile(java.lang.String packageName) throws java.lang.Exception
packageName
- String
value for the package name
ConnectionProfile
object of the synchronization connection profile
NoSuchOperationException
- if getSynchronizationProfile() is not defined in
corresponding database class.
java.lang.Exception
public static SynchronizationGroup getSynchronizationGroup(java.lang.String packageName, java.lang.String syncGroup) throws java.lang.Exception
packageName
- String
value for the package namesyncGroup
- String
value for the sync group
SynchronizationGroup
object of the SynchronizationGroup
NoSuchOperationException
- if getSynchronizationGroup() is not defined in
corresponding database class.
java.lang.Exception
public java.lang.Object invoke(java.lang.Object mbo, java.lang.String operationName, java.lang.String[] paramTypeList, ObjectList paramValueList)
mbo
- operationName
- paramTypeList
- paramValueList
- public java.lang.Object invoke(java.lang.Object mbo, java.lang.String operationName, ObjectList paramValueList)
mbo
- operationName
- paramValueList
-
public int getType()
public static void startBackgroundSynchronization(java.lang.String packageName, java.util.Vector syncGroupList, int syncType) throws java.lang.Exception
packageName
- String
value for the package namesyncGroupList
- Vector
value for the sync group listsyncType
- value for the sync type
NoSuchOperationException
- if startBackgroundSynchronization() is not defined in
corresponding database class.
java.lang.Exception
public static void startBackgroundSynchronization(java.util.Hashtable packageSyncGroupMap, int syncType) throws java.lang.Exception
packageName
- String
value for the package namesyncGroupList
- Vector
value for the sync group listsyncType
- value for the sync type
NoSuchOperationException
- if startBackgroundSynchronization() is not defined in
corresponding database class.
java.lang.Exception
public static void registerCallbackHandler(java.lang.String packageName, CallbackHandler handler) throws java.lang.Exception
packageName
- String
value for the package namesyncGroupList
- Vector
value for the sync group list
NoSuchOperationException
- if startBackgroundSynchronization() is not defined in
corresponding database class.
java.lang.Exception
public static Logger getLogger()
public static void uploadLogs()
public static LogRecord[] getLogs(Query q)
q
- - query object
public static void deleteDatabase(java.lang.String packageName) throws java.lang.Exception
packageName
-
java.lang.Exception
public java.lang.String getPackageName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |