com.sap.ip.me.api.sync
Class SyncManager

java.lang.Object
  extended bycom.sap.ip.me.api.sync.SyncManager

public abstract class SyncManager
extends java.lang.Object

Handles synchronization tasks with backend including outbound and inbound processing

Author:
SAP

Field Summary
static java.lang.String CONNECTION_TYPE_DISC
          Value for Configuration property SYNCSETTINGS_CONNECTION_TYPE.
static java.lang.String CONNECTION_TYPE_HTTP
          Value for Configuration property SYNCSETTINGS_CONNECTION_TYPE.
protected static java.lang.String SYNC_PROTOCOL_VERSION
          The property tells the framework which internal transport protocol is used.
 
Constructor Summary
SyncManager()
           
 
Method Summary
static SyncManager getInstance()
          Gets the only one instance of the SyncManager class
static int getSyncProtocolVersion()
          Get version number of used synchronization protocol.
abstract  boolean isConnectionTerminatable()
          Checks whether the connection to the Mobile Infrastructure Middleware system can be terminated or not.
 boolean isFilterOnTimedSync()
          Gets the parameter for the Filter on Timed Sync.
abstract  boolean isSAPLogonTicketSupportEnabled()
          Checks whether the framework is configured for SAP logon ticket support.
 boolean isSuppressDownload()
          Gets the parameter for the suppress download feature.
abstract  boolean isSyncCredentialAvailable()
          Checks whether the required synchronization credentials (user ID/synchronization password or SAP logon ticket) are available.
abstract  boolean isSyncRunning()
          Checks whether a synchronization process (except background synchronizations) is running or not.
 void setFilterOnTimedSync(boolean filtered)
          Set the 'Filter on Timed Sync' flag.
 void setSuppressDownload(boolean activateSuppressDownload)
          Sets the parameter for suppress download.
abstract  void setSyncPasswordOfCurrentUser(java.lang.String password)
          Sets the synchronization password of the current user.
 void synchronizeWithBackend()
          Handles the complete synchronization for the current user.
abstract  void synchronizeWithBackend(VisibilityType visibility)
          Handles the complete synchronization for current user or for all other users.
abstract  boolean terminateConnection()
          Terminates the connection to the Mobile Infrastructure Middleware system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYNC_PROTOCOL_VERSION

protected static java.lang.String SYNC_PROTOCOL_VERSION
The property tells the framework which internal transport protocol is used.
Possible values: any integer value. If value is < 251300 the default old ASCII protocol is used. If value >= 251300 the binary new protocol is used.
Default value: 251300 that means binary transport protocol is used.

Since:
MI 2.5 SP 13

CONNECTION_TYPE_HTTP

public static final java.lang.String CONNECTION_TYPE_HTTP
Value for Configuration property SYNCSETTINGS_CONNECTION_TYPE.
If Connection type is set up to http SyncManager exchanges the outbound and inbound queue via http If Connection type is set up to http the SYNCSETTINGS_GATEWAY in the Configuration must be set up to a gateway url.

See Also:
Constant Field Values

CONNECTION_TYPE_DISC

public static final java.lang.String CONNECTION_TYPE_DISC
Value for Configuration property SYNCSETTINGS_CONNECTION_TYPE.
If Connection type is set to disc SyncManager exchanges the outbound and inbound queue via file system. If Connection type is set to disc the SYNCSETTINGS_GATEWAY in the Configuration must be set up to a file directory.

See Also:
Constant Field Values
Constructor Detail

SyncManager

public SyncManager()
Method Detail

getInstance

public static SyncManager getInstance()
Gets the only one instance of the SyncManager class

Returns:
SyncManager singleton

synchronizeWithBackend

public void synchronizeWithBackend()
Handles the complete synchronization for the current user.


synchronizeWithBackend

public abstract void synchronizeWithBackend(VisibilityType visibility)
Handles the complete synchronization for current user or for all other users.

Parameters:
visibility - Determines if the synchronization happens only for containers which are created for the current user and as shared containers or for all outbound containers on the device user independent
See Also:
VisibilityType

setFilterOnTimedSync

public final void setFilterOnTimedSync(boolean filtered)
Set the 'Filter on Timed Sync' flag. I this filter is set, background synchronization via Timed Sync starts only if new application data is available. Framework data is ignored


isFilterOnTimedSync

public final boolean isFilterOnTimedSync()
Gets the parameter for the Filter on Timed Sync. It indicates whether 'Filter on TZimed Sync is currently activated or deactivated.

Returns:
true if the 'Filter on Timed sync' feature is activated false if the 'Filter on Timed sync' feature is deactivated

setSuppressDownload

public final void setSuppressDownload(boolean activateSuppressDownload)
Sets the parameter for suppress download. It is valid for a single sync cycle. After the sync process gets back to the client framework(either after complete synchronization or after an sync exceptiob occured) the parameter will automatically be reset to false.


isSuppressDownload

public final boolean isSuppressDownload()
Gets the parameter for the suppress download feature. It indicates whether the feature is currently activated or deactivated.

Returns:
true if the suppress download feature is activated false if the suppress download feature is deactivated

setSyncPasswordOfCurrentUser

public abstract void setSyncPasswordOfCurrentUser(java.lang.String password)
                                           throws SyncPasswordException
Sets the synchronization password of the current user. If the setting of the synchronization password cannot be performed, an SyncPasswordException with an appropriate message ID (containing the resaon) will be thrown.

Parameters:
password - The synchronization password
Throws:
SyncPasswordException - Contains the reason why the setting of the synchronization password failed if it fails.
See Also:
SyncPasswordException

isSyncCredentialAvailable

public abstract boolean isSyncCredentialAvailable()
Checks whether the required synchronization credentials (user ID/synchronization password or SAP logon ticket) are available. If the synchronization credentails are not (completely) availabe, the next synchronization try will fail. This method should always be invoked to decide whether a synchronization can be performed with respect to (completely) available synchronization credentials.

Returns:
True if the synchronization credentials are available, false otherwise.

isSyncRunning

public abstract boolean isSyncRunning()
Checks whether a synchronization process (except background synchronizations) is running or not.

Returns:
true if an UI triggered synchronization is running, false if no synchronization is running or if background synchronization is running.

isSAPLogonTicketSupportEnabled

public abstract boolean isSAPLogonTicketSupportEnabled()
Checks whether the framework is configured for SAP logon ticket support.

Returns:
True if the framework is enabled for SAP logon ticket support, false otherwise.

getSyncProtocolVersion

public static int getSyncProtocolVersion()
Get version number of used synchronization protocol.

Returns:
version number of used synchronization protocol
Since:
MI 2.5 SP 13

terminateConnection

public abstract boolean terminateConnection()
Terminates the connection to the Mobile Infrastructure Middleware system. It overrides the WaitForResultsTimeout value set in the Mobile Engine configuration settings. This API can be invoked only if
isConnectionTerminatable() returns a true value

Returns:
true if connection was terminated successfully false otherwise.
Since:
MI 2.5 SP 17
See Also:
isConnectionTerminatable

isConnectionTerminatable

public abstract boolean isConnectionTerminatable()
Checks whether the connection to the Mobile Infrastructure Middleware system can be terminated or not.

Returns:
true if connection can be terminated false otherwise.
Since:
MI 2.5 SP 17
See Also:
terminateConnection


Copyright © 2005 SAP AG. All Rights Reserved.