The datastore features are all contained within the com.autonomy.connector
namespace. The samples in this section assume there is
import com.autonomy.connector.*;
You can access a datastore for the synchronize action like this:
public void synchronize(SynchronizeTask task) { Datastore datastore = new Datastore( task.getDatastoreFilename(), task.getLog()); //Use datastore datastore.close(); }
This opens or creates the datastore in the file named in task.getDatastoreFilename()
. If the datastore already exists the existing datastore is opened (the datastore is not created again). The Datastore
object provides access to the datastore.
Micro Focus recommends that you use the file named in SynchronizeTask.getDatastoreFilename()
to store all state information for the task. You can use the
object to store a datastore in that file, or use a format of your choosing.Datastore
The advantages of storing all state information in the file specified by SynchronizeTask.getDatastoreFilename()
include:
backup
and restore
actions are used.
|