org.jSyncManager.Client

Class RegistrationData

Implemented Interfaces:
Serializable

public final class RegistrationData
extends java.lang.Object
implements Serializable

The RegistrationData class. This persistent, serializable class stores and manages the user-specified program settings for the JSyncManager class. This class can be used by developers for auto-installing jConduits when the jSyncManager is not active.

Field Summary

static String
JCONDUIT_FILE
The name of the default jConduit storage file.
static String
PREFERENCES_FILE
The name off the ddefault preferences file.

Constructor Summary

RegistrationData()
Creates a new instance of the Registration Data user application preferences object.

Method Summary

protected void
finalize()
Finalizes this object by ensuring its values are properly saved.
int[]
getAllowedIDs()
Retreives a list of the IDs allowed to synchronize with this jSyncManager instance.
AbstractConduit
getConduit(String s)
Retreives an installed jConduit by name.
AbstractConduit
getConduit(int i)
Retreives the specified installed jConduit.
int
getConduitCount()
Gets the count of installed jConduits.
java.util.Vector
getConduits()
Gets all installed jConduits as a Vector object.
DefaultConduit
getDefaultConduit()
Deprecated. the Synchronization engine now takes care of this.
boolean
getDisablePopups()
Checks to see if popups are enabled or disabled.
boolean
getManualHide()
Checks to see if the manual hide option is enabled.
boolean
getModemFlag()
Checks to see if the active transport is a modem transport.
int
getNumAllowedIDs()
Retreives the number of IDs allowed to synchronize with this system.
boolean
getSecurityEnabled()
Tests to see if security is enabled or not.
boolean
getSyncTimeOption()
Tests to see if date/time synchronization is enabled or not.
SLPTransportInterface
getTransport()
Retreives the active transport instance.
Rectangle
getWindowPosition()
Retreives the saved window position for the jSyncManager frame.
boolean
isConfigured()
Tests to see if this instance is configured.
static RegistrationData
loadRegistrationData(boolean server)
Loads an existing RegistrationData instance from disk.
void
registerConduit(AbstractConduit conduit)
Registers (adds) a jConduit to the installed list.
void
removeConduit(int i)
Removes the jConduit at the specified index.
void
removeConduit(AbstractConduit conduit)
Removes the specified jConduit from the installed list.
void
saveSettings()
Saves this user application properties object to its file.
void
setAllowedIDs(ai[] )
Sets the IDs allowed to synchronize.
void
setDisablePopups(boolean flag)
Sets the disable popup flag.
void
setFrameFlag(boolean b)
Sets the frame flag for the synchronization dialog.
void
setManualHide(boolean flag)
Sets the manual hide flag for the synchronization dialog.
void
setSecurityEnabled(boolean flag)
Sets the security enablement state flag.
void
setSyncTimeOption(boolean flag)
Sets the date/time sync option.
void
setTransport(SLPTransportInterface t)
Sets the active transport instance.
void
setWindowPosition(Rectangle rectangle)
Sets the window position to the specified rectangle.
String
toString()
Retreive this user application preferences object as a String.
boolean
useFrame()
Tests to see if the synchronizing dialog should use a frame.

Field Details

JCONDUIT_FILE

public static String JCONDUIT_FILE
The name of the default jConduit storage file.

PREFERENCES_FILE

public static String PREFERENCES_FILE
The name off the ddefault preferences file.

Constructor Details

RegistrationData

public RegistrationData()
Creates a new instance of the Registration Data user application preferences object.

Method Details

finalize

protected void finalize()
            throws Throwable
Finalizes this object by ensuring its values are properly saved.

getAllowedIDs

public int[] getAllowedIDs()
Retreives a list of the IDs allowed to synchronize with this jSyncManager instance.
Returns:
an array of Palm user ID numbers representing the values allowed to synchronize.

getConduit

public AbstractConduit getConduit(String s)
            throws ConduitNotFoundException
Retreives an installed jConduit by name.
Parameters:
s - the name of the jConduit to retreive.
Returns:
the jConduit with the specified name.
Throws:
ConduitNotFoundException - thrown if the named jConduit isn't installed.

getConduit

public AbstractConduit getConduit(int i)
Retreives the specified installed jConduit.
Parameters:
i - the jConduit index to retreive.
Returns:
the jConduit from the specified index.

getConduitCount

public int getConduitCount()
Gets the count of installed jConduits.
Returns:
the count of installed jConduits.

getConduits

public java.util.Vector getConduits()
Gets all installed jConduits as a Vector object.
Returns:
all installed jConduits as a Vector object.

getDefaultConduit

public DefaultConduit getDefaultConduit()

Deprecated. the Synchronization engine now takes care of this. This method only exists to satisfy the LegacyClient, and will be removed in the next release.

Retreives the default jConduit.
Returns:
the default jConduit.

getDisablePopups

public boolean getDisablePopups()
Checks to see if popups are enabled or disabled.
Returns:
true if popups are allowed, false otherwise.

getManualHide

public boolean getManualHide()
Checks to see if the manual hide option is enabled.
Returns:
true if manual hide is enabled, false otherwise.

getModemFlag

public boolean getModemFlag()
Checks to see if the active transport is a modem transport.
Returns:
true if this transport is an instance of ModemTransport, false otherwise.

getNumAllowedIDs

public int getNumAllowedIDs()
Retreives the number of IDs allowed to synchronize with this system.
Returns:
the number of IDs allowed to synchronize with this system.

getSecurityEnabled

public boolean getSecurityEnabled()
Tests to see if security is enabled or not.
Returns:
true if security is enabled, false otherwise.

getSyncTimeOption

public boolean getSyncTimeOption()
Tests to see if date/time synchronization is enabled or not.
Returns:
true if date/time synchronization is enabled, false otherwise.

getTransport

public SLPTransportInterface getTransport()
Retreives the active transport instance.
Returns:
the active transport instance.

getWindowPosition

public Rectangle getWindowPosition()
Retreives the saved window position for the jSyncManager frame.
Returns:
the Rectangle object representing the co-ordinates for the frames corners.

isConfigured

public boolean isConfigured()
Tests to see if this instance is configured.
Returns:
true if this instance is configured, false otherwise.

loadRegistrationData

public static RegistrationData loadRegistrationData(boolean server)
Loads an existing RegistrationData instance from disk.
Parameters:
server - true if we should work with the server jConduit file, false otherwise.
Returns:
the loaded RegistrationData instance.

registerConduit

public void registerConduit(AbstractConduit conduit)
Registers (adds) a jConduit to the installed list.
Parameters:
conduit - the jConduit instance to add.

removeConduit

public void removeConduit(int i)
Removes the jConduit at the specified index.
Parameters:
i - the index of the jConduit to remove.

removeConduit

public void removeConduit(AbstractConduit conduit)
Removes the specified jConduit from the installed list.
Parameters:
conduit - the jConduit to remove.

saveSettings

public void saveSettings()
            throws Exception
Saves this user application properties object to its file.

setAllowedIDs

public void setAllowedIDs(ai[] )
Sets the IDs allowed to synchronize.
Parameters:

setDisablePopups

public void setDisablePopups(boolean flag)
Sets the disable popup flag.
Parameters:
flag - set to true to disable popups, false otherwise.

setFrameFlag

public void setFrameFlag(boolean b)
Sets the frame flag for the synchronization dialog.
Parameters:
b - set to true to use a frame, false otherwise.

setManualHide

public void setManualHide(boolean flag)
Sets the manual hide flag for the synchronization dialog.
Parameters:
flag - set to true to use manual hide, false otherwise.

setSecurityEnabled

public void setSecurityEnabled(boolean flag)
Sets the security enablement state flag.
Parameters:
flag - set to true to enable security, false otherwise.

setSyncTimeOption

public void setSyncTimeOption(boolean flag)
Sets the date/time sync option.
Parameters:
flag - set to true to enable date/time synchronization, false otherwise.

setTransport

public void setTransport(SLPTransportInterface t)
Sets the active transport instance.
Parameters:
t - the active transport instance.

setWindowPosition

public void setWindowPosition(Rectangle rectangle)
Sets the window position to the specified rectangle.
Parameters:
rectangle - the window position for the main jSyncManager frame.

toString

public String toString()
Retreive this user application preferences object as a String.
Returns:
this user application preferences object as a String.

useFrame

public boolean useFrame()
Tests to see if the synchronizing dialog should use a frame.
Returns:
true if we should use a frame, false otherwise.