blackboard.admin.persist.datasource
Interface DataSourcePersister

All Superinterfaces:
Persister

public interface DataSourcePersister
extends Persister

This interface describes the set of methods that all persisters for DataSource objects must implement.

A persister allows an object to be stored (either inserted or updated) within the CMS system or to be deleted from the CMS system. The data source persister also allows operations to be performed against the multiple entities that can be encompassed within the scope of a single DataSource.

Since:
Bb 6.0
See Also:
DataSourceLoader, DataSource

Nested Class Summary
static class DataSourcePersister.Default
          A utility class that provides quick access to the Persister instance associated with the default instance of the database BbPersistenceManager.
 
Field Summary
static java.lang.String TYPE
          Type used to obtain an instance of the class configured to provide the implementation for this interface.
 
Method Summary
 java.lang.String beginSnapshotSession()
          Notifies the persistence layer that a snapshot session is beginning for tracking purposes.
 void beginSnapshotSession(java.lang.String sessionId)
          Notifies the persistence layer that a snapshot session is beginning for tracking purposes.
 void create(DataSource dataSource)
          Creates DataSource
 void disableAdminObjectsByDataType(java.lang.String dataSrcBatchUid, DataType dataType, java.util.Calendar cal)
          Disables AdminObjects By DataType for which their last modification stamp appears before the date/time specified by the Calendar object provided.
 void disableAllAdminObjects(java.lang.String dataSrcBatchUid, java.util.Calendar cal)
          Disables All AdminObjects for which their last modification stamp appears before the date/time specified by the Calendar object provided.
 void endSnapshotSession(java.lang.String sessionId)
          Notifies the persistence layer that a snapshot session is ending for tracking purposes.
 void modify(DataSource dataSource)
          Modifies DataSource
 void purgeAdminObjectsByDataType(java.lang.String dataSrcBatchUid, DataType dataType, java.util.Calendar cal)
          Purges AdminObject By DataType for which their last modification stamp appears before the date/time specified by the Calendar object provided.
 void purgeAllAdminObjects(java.lang.String dataSrcBatchUid, java.util.Calendar cal)
          Purges All AdminObjects based on DataSource for which their last modification stamp appears before the date/time specified by the Calendar object provided.
 void purgeSnapshotSessions()
          Clears all temporary persistent storage used by snapshot processes ( includes cloning ).
 void removeByBatchUid(java.lang.String dataSrcBatchUid)
          Removes DataSource> based on BatchUid
 
Methods inherited from interface blackboard.persist.Persister
getAppVersion, init
 

Field Detail

TYPE

static final java.lang.String TYPE
Type used to obtain an instance of the class configured to provide the implementation for this interface.

See Also:
Constant Field Values
Method Detail

create

void create(DataSource dataSource)
            throws PersistenceException,
                   ValidationException
Creates DataSource

Parameters:
dataSource - DataSource object to be created.
Throws:
PersistenceException - Thrown if failure occurs during removal of Admin Objects.
ValidationException - Thrown if target does not contain required indentifying information.

modify

void modify(DataSource dataSource)
            throws PersistenceException,
                   ValidationException,
                   KeyNotFoundException
Modifies DataSource

Parameters:
dataSource - DataSource object to be created.
Throws:
PersistenceException - Thrown if failure occurs during modification of DataSource
ValidationException - Thrown if target does not contain required indentifying information.
KeyNotFoundException - Thrown if DataSource object could not be found with provided batch uid.

removeByBatchUid

void removeByBatchUid(java.lang.String dataSrcBatchUid)
                      throws PersistenceException,
                             KeyNotFoundException
Removes DataSource> based on BatchUid

Parameters:
dataSrcBatchUid - Batch Uid with which to identify DataSource object.
Throws:
PersistenceException - Thrown if failure occurs during removal of Admin Objects.
KeyNotFoundException - Thrown if DataSource object could not be found with provided batch uid.

disableAllAdminObjects

void disableAllAdminObjects(java.lang.String dataSrcBatchUid,
                            java.util.Calendar cal)
                            throws PersistenceException,
                                   KeyNotFoundException
Disables All AdminObjects for which their last modification stamp appears before the date/time specified by the Calendar object provided.

Parameters:
dataSrcBatchUid - Batch Uid with which to identify DataSource object.
cal - Calendar reference which refers to modified date cut-off point.
Throws:
PersistenceException - Thrown if failure occurs during disabling of Admin Objects.
KeyNotFoundException - Thrown if DataSource object could not be found with provided batch uid.

disableAdminObjectsByDataType

void disableAdminObjectsByDataType(java.lang.String dataSrcBatchUid,
                                   DataType dataType,
                                   java.util.Calendar cal)
                                   throws PersistenceException,
                                          KeyNotFoundException
Disables AdminObjects By DataType for which their last modification stamp appears before the date/time specified by the Calendar object provided.

Parameters:
dataSrcBatchUid - Batch Uid with which to identify DataSource object.
dataType - DataType refers to identifying type for Admin Object to be referred to.
cal - Calendar reference which refers to modified date cut-off point.
Throws:
PersistenceException - Thrown if failure occurs during diabling of Admin Objects.
KeyNotFoundException - Thrown if DataSource object could not be found with provided batch uid.

purgeAllAdminObjects

void purgeAllAdminObjects(java.lang.String dataSrcBatchUid,
                          java.util.Calendar cal)
                          throws PersistenceException,
                                 KeyNotFoundException
Purges All AdminObjects based on DataSource for which their last modification stamp appears before the date/time specified by the Calendar object provided.

Parameters:
dataSrcBatchUid - Batch Uid with which to identify DataSource object.
cal - Calendar reference which refers to modified date cut-off point.
Throws:
PersistenceException - Thrown if failure occurs during puge of Admin Objects.
KeyNotFoundException - Thrown if DataSource object could not be found with provided batch uid.

purgeAdminObjectsByDataType

void purgeAdminObjectsByDataType(java.lang.String dataSrcBatchUid,
                                 DataType dataType,
                                 java.util.Calendar cal)
                                 throws PersistenceException,
                                        KeyNotFoundException
Purges AdminObject By DataType for which their last modification stamp appears before the date/time specified by the Calendar object provided.

Parameters:
dataSrcBatchUid - Batch Uid with which to identify DataSource object.
dataType - DataType refers to identifying type for Admin Object to be referred to.
cal - Calendar reference which refers to modified date cut-off point.
Throws:
PersistenceException - Thrown if failure occurs during purge of specified Admin Objects.
KeyNotFoundException - Thrown if DataSource object could not be found with provided batch uid.

purgeSnapshotSessions

void purgeSnapshotSessions()
                           throws PersistenceException
Clears all temporary persistent storage used by snapshot processes ( includes cloning ). Important... This removes all references used by snapshot process. If invoked while snapshot is running it will adversely affect results.

Throws:
PersistenceException - Thrown if failure occurs during purge of snapshot based sessions.

beginSnapshotSession

java.lang.String beginSnapshotSession()
                                      throws PersistenceException
Notifies the persistence layer that a snapshot session is beginning for tracking purposes.

Throws:
PersistenceException - Thrown if failure occurs during logging start of snapshot based session.

beginSnapshotSession

void beginSnapshotSession(java.lang.String sessionId)
                          throws PersistenceException
Notifies the persistence layer that a snapshot session is beginning for tracking purposes. This version created to support SOAP interactions.

Parameters:
sessionId - - the id of the session to create
Throws:
PersistenceException - Thrown if failure occurs during logging start of snapshot based session.

endSnapshotSession

void endSnapshotSession(java.lang.String sessionId)
                        throws PersistenceException
Notifies the persistence layer that a snapshot session is ending for tracking purposes. Expected behavior is that this will cleanup any data associated with that session.

Parameters:
sessionId - - the id of the session to delete
Throws:
PersistenceException - Thrown if failure occurs during logging end of snapshot based session.


Copyright © 2012 Blackboard, Inc. All Rights Reserved.