RSE
Release 2.0

org.eclipse.rse.persistence
Interface IRSEPersistenceProvider


public interface IRSEPersistenceProvider

This is the interface that needs to be implemented when providing an extension using the RSE persistence provider extension point. Implement this class to provide a specialized means of saving and restoring the RSE DOM. This interface is used by the persistence manager to schedule loads and saves of the DOM and should only be used by the persistence manager.


Method Summary
 IStatus deleteProfile(String profileName, IProgressMonitor monitor)
          Removes a profile.
 String[] getSavedProfileNames()
           
 Job getSaveJob(RSEDOM dom)
          Returns a job suitable for saving a DOM.
 RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor)
          Restores an RSE DOM given a profileName.
 boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor)
          Persists an RSE DOM.
 void setProperties(Properties properties)
          Sets the properties for this provider.
 

Method Detail

setProperties

void setProperties(Properties properties)
Sets the properties for this provider. This must be done immediately after the provider is instantiated. The persistence manager will provide these properties for providers defined as extensions.

Parameters:
properties - the properties object containing the properties supplied in the extension.

loadRSEDOM

RSEDOM loadRSEDOM(String profileName,
                  IProgressMonitor monitor)
Restores an RSE DOM given a profileName.

Parameters:
profileName - name of the Profile to load
monitor - The monitor to use for progress monitoring and cancellation. Must not be null.
Returns:
the RSE DOM for the specified profile

saveRSEDOM

boolean saveRSEDOM(RSEDOM dom,
                   IProgressMonitor monitor)
Persists an RSE DOM. Writes the DOM to some form of external storage and then marks the DOM as clean using RSEDOMNode.markUpdated().

Parameters:
dom - the RSE DOM to persist.
monitor - The monitor to use for progress monitoring and cancellation. Must not be null.
Returns:
true if succcessful

getSaveJob

Job getSaveJob(RSEDOM dom)
Returns a job suitable for saving a DOM. The result can be null if the persistence provider determines that a job would not be the best way of saving a particular DOM.

Parameters:
dom - the DOM for which to construct the job.
Returns:
The job that can be scheduled to perform the save operation.

getSavedProfileNames

String[] getSavedProfileNames()
Returns:
The names of the profiles that have been saved by this persistence provider.

deleteProfile

IStatus deleteProfile(String profileName,
                      IProgressMonitor monitor)
Removes a profile. Does nothing if the profile is not found.

Parameters:
profileName - the name of the profile to remove
monitor - The monitor to use for progress monitoring and cancellation. Must not be null.
Returns:
the IStatus indicating the operations success.

RSE
Release 2.0

Copyright (c) IBM Corporation and others 2000, 2007. All Rights Reserved.