jSyncManager

org.jSyncManager.Client
Class RegistrationData

java.lang.Object
  extended byorg.jSyncManager.Client.RegistrationData
All Implemented Interfaces:
java.io.Serializable

public final class RegistrationData
extends java.lang.Object
implements java.io.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.

Version:
$Revision: 3.4 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2004/08/12 21:43:48 $.
See Also:
Serialized Form

Field Summary
static java.lang.String JCONDUIT_FILE
          The name of the default jConduit storage file.
static java.lang.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(int i)
          Retreives the specified installed jConduit.
 AbstractConduit getConduit(java.lang.String s)
          Retreives an installed jConduit by name.
 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. This method only exists to satisfy the LegacyClient, and will be removed in the next release.
 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.
 java.awt.Rectangle getWindowPosition()
          Retreives the saved window position for the jSyncManager frame.
 boolean isConfigured()
          Tests to see if this instance is configured.
static RegistrationData loadRegistrationData()
          Loads an existing RegistrationData instance from disk.
 void registerConduit(AbstractConduit conduit)
          Registers (adds) a jConduit to the installed list.
 void removeConduit(AbstractConduit conduit)
          Removes the specified jConduit from the installed list.
 void removeConduit(int i)
          Removes the jConduit at the specified index.
 void saveSettings()
          Saves this user application properties object to its file.
 void setAllowedIDs(int[] 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(java.awt.Rectangle rectangle)
          Sets the window position to the specified rectangle.
 java.lang.String toString()
          Retreive this user application preferences object as a String.
 boolean useFrame()
          Tests to see if the synchronizing dialog should use a frame.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JCONDUIT_FILE

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


PREFERENCES_FILE

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

Constructor Detail

RegistrationData

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

Method Detail

finalize

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

Throws:
java.lang.Throwable - thrown in the event any un-handleable throwables are generated during finalization.

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(int i)
Retreives the specified installed jConduit.

Parameters:
i - the jConduit index to retreive.
Returns:
the jConduit from the specified index.

getConduit

public AbstractConduit getConduit(java.lang.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.

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.

getWindowPosition

public java.awt.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()
Loads an existing RegistrationData instance from disk.

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 java.lang.Exception
Saves this user application properties object to its file.

Throws:
java.lang.Exception - thrown if any exceptions occur during write.

setAllowedIDs

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

Parameters:
ai - an array of allowed IDs.

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.

setWindowPosition

public void setWindowPosition(java.awt.Rectangle rectangle)
Sets the window position to the specified rectangle.

Parameters:
rectangle - the window position for the main jSyncManager frame.

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.

getTransport

public SLPTransportInterface getTransport()
Retreives the active transport instance.

Returns:
the active transport instance.

setTransport

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

Parameters:
t - the active transport instance.

toString

public java.lang.String toString()
Retreive this user application preferences object as a String.

Returns:
this user application preferences object as a String.

jSyncManager

Copyright (c) 1999 - 2004 Brad BARCLAY and others. All Rights Reserved.