com.funambol.syncml.spds
Class SourceConfig

java.lang.Object
  extended by com.funambol.syncml.spds.SourceConfig

public class SourceConfig
extends java.lang.Object

Configuration data for the SyncSource. Can be extended by subclasses of SyncSource to add specific data.


Field Summary
static java.lang.String BRIEFCASE
           
static java.lang.String BRIEFCASE_TYPE
          briefcase object mime type definition
static java.lang.String CALENDAR
           
static java.lang.String CONTACT
           
static java.lang.String EMAIL_OBJECT_NAME
          eMail Object source name definition
static java.lang.String EMAIL_OBJECT_TYPE
          eMail Object mime type definition
static java.lang.String FILE_OBJECT_TYPE
          file object mime type definition
static java.lang.String MAIL
           
static java.lang.String NOTE
           
static java.lang.String TASK
           
static java.lang.String VCARD_NAME
          vCard source name definition
static java.lang.String VCARD_TYPE
          vCard mime type definition
protected static int VERSION
           
protected static int VERSION_600
           
 
Constructor Summary
SourceConfig()
          Initializes a new instance of SourceConfig: Sets default configuration values, valid for a generic briefcase source.
SourceConfig(java.lang.String name, java.lang.String type, java.lang.String remoteUri)
          Initializes a new instance of SourceConfig: Sets default configuration values, valid for a generic briefcase source.
 
Method Summary
 void deserialize(java.io.DataInputStream in)
          Read object field from the input stream.
 boolean getBreakMsgOnLastChunk()
           
 java.lang.String getEncoding()
          Return the encoding of this source
 long getLastAnchor()
          Return the last anchor of this source
 int getMaxItemsPerMessageInSlowSync()
          Get the maximum number of items to be placed in a single SyncML message during a slow sync
 java.lang.String getName()
          Return the name of this source
 long getNextAnchor()
          Return the next anchor of this source
 java.lang.String getRemoteUri()
          Return the remote URI of this source
 int getSyncMode()
          Return the sync mode of this source
 java.lang.String getType()
          Return the mime-type of this source
 void serialize(java.io.DataOutputStream out)
          Write object fields to the output stream.
 void setBreakMsgOnLastChunk(boolean value)
           
 void setEncoding(java.lang.String enc)
          Set the encoding of this source
 void setLastAnchor(long anchor)
          Set the last anchor of this source
 void setMaxItemsPerMessageInSlowSync(int value)
          Set the maximum number of items to be placed in a single SyncML message during a slow sync.
 void setName(java.lang.String name)
          Set the name of this source
 void setNextAnchor(long anchor)
          Set the next anchor of this source
 void setRemoteUri(java.lang.String remoteUri)
          Set the remote URI of this source
 void setSyncMode(int syncMode)
          Set the sync mode of this source
 void setType(java.lang.String type)
          Set the mime-type of this source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIL

public static final java.lang.String MAIL
See Also:
Constant Field Values

CONTACT

public static final java.lang.String CONTACT
See Also:
Constant Field Values

TASK

public static final java.lang.String TASK
See Also:
Constant Field Values

CALENDAR

public static final java.lang.String CALENDAR
See Also:
Constant Field Values

NOTE

public static final java.lang.String NOTE
See Also:
Constant Field Values

BRIEFCASE

public static final java.lang.String BRIEFCASE
See Also:
Constant Field Values

VCARD_NAME

public static final java.lang.String VCARD_NAME
vCard source name definition

See Also:
Constant Field Values

VCARD_TYPE

public static final java.lang.String VCARD_TYPE
vCard mime type definition

See Also:
Constant Field Values

EMAIL_OBJECT_NAME

public static final java.lang.String EMAIL_OBJECT_NAME
eMail Object source name definition

See Also:
Constant Field Values

EMAIL_OBJECT_TYPE

public static final java.lang.String EMAIL_OBJECT_TYPE
eMail Object mime type definition

See Also:
Constant Field Values

FILE_OBJECT_TYPE

public static final java.lang.String FILE_OBJECT_TYPE
file object mime type definition

See Also:
Constant Field Values

BRIEFCASE_TYPE

public static final java.lang.String BRIEFCASE_TYPE
briefcase object mime type definition

See Also:
Constant Field Values

VERSION_600

protected static final int VERSION_600
See Also:
Constant Field Values

VERSION

protected static final int VERSION
See Also:
Constant Field Values
Constructor Detail

SourceConfig

public SourceConfig()
Initializes a new instance of SourceConfig: Sets default configuration values, valid for a generic briefcase source.


SourceConfig

public SourceConfig(java.lang.String name,
                    java.lang.String type,
                    java.lang.String remoteUri)
Initializes a new instance of SourceConfig: Sets default configuration values, valid for a generic briefcase source.

Method Detail

getName

public java.lang.String getName()
Return the name of this source


setName

public void setName(java.lang.String name)
Set the name of this source


getType

public java.lang.String getType()
Return the mime-type of this source


setType

public void setType(java.lang.String type)
Set the mime-type of this source


getEncoding

public java.lang.String getEncoding()
Return the encoding of this source


setEncoding

public void setEncoding(java.lang.String enc)
Set the encoding of this source


getSyncMode

public int getSyncMode()
Return the sync mode of this source


setSyncMode

public void setSyncMode(int syncMode)
Set the sync mode of this source


getRemoteUri

public java.lang.String getRemoteUri()
Return the remote URI of this source


setRemoteUri

public void setRemoteUri(java.lang.String remoteUri)
Set the remote URI of this source


getLastAnchor

public long getLastAnchor()
Return the last anchor of this source


setLastAnchor

public void setLastAnchor(long anchor)
Set the last anchor of this source


getNextAnchor

public long getNextAnchor()
Return the next anchor of this source


setNextAnchor

public void setNextAnchor(long anchor)
Set the next anchor of this source


setMaxItemsPerMessageInSlowSync

public void setMaxItemsPerMessageInSlowSync(int value)
Set the maximum number of items to be placed in a single SyncML message during a slow sync. This value is part of the source config because we want to allow clients to heuristically determine the best value for this parameter and save it in the configuration.


getMaxItemsPerMessageInSlowSync

public int getMaxItemsPerMessageInSlowSync()
Get the maximum number of items to be placed in a single SyncML message during a slow sync


getBreakMsgOnLastChunk

public boolean getBreakMsgOnLastChunk()

setBreakMsgOnLastChunk

public void setBreakMsgOnLastChunk(boolean value)

serialize

public void serialize(java.io.DataOutputStream out)
               throws java.io.IOException
Write object fields to the output stream.

Parameters:
out - Output stream
Throws:
java.io.IOException

deserialize

public void deserialize(java.io.DataInputStream in)
                 throws java.io.IOException
Read object field from the input stream.

Parameters:
in - Input stream
Throws:
java.io.IOException


Copyright © 2001-2009 Funambol.