blackboard.admin.persist.course
Class CloneConfig

java.lang.Object
  extended by blackboard.admin.persist.course.CloneConfig
All Implemented Interfaces:
java.io.Serializable

public class CloneConfig
extends java.lang.Object
implements java.io.Serializable

This object describes portions of the CourseSite or Organization that are to be cloned. It is also used to store some state information during the cloning as it is the one object used throughout. Pending addition of CourseToc areas the following occurs: Inclusion of Content as an Area with the configuration overrides any selected CourseToc items guaranteeing all available content areas will be included.

Since:
Bb 6.0
Author:
Raymond Peterson
See Also:
Serialized Form

Nested Class Summary
static class CloneConfig.Area
           
static class CloneConfig.CopyType
           
 
Field Summary
private  boolean _archiveCSItems
           
private  java.util.ArrayList<java.lang.String> _areaList
           
private  java.lang.Boolean _bReconcile
           
(package private)  CloneCallback _callback
           
private  boolean _cloneForDecrossList
           
private  CloneConfig.CopyType _copyType
           
private  java.lang.String _csDir
           
private  boolean _csDirVerified
           
private  java.util.ArrayList<java.lang.String> _cxComponentList
           
private  java.util.Set<java.lang.String> _excludedCsFolderIds
           
private  boolean _fromAdminPanel
           
private  boolean _hadWarnings
           
private  java.lang.String _hostName
           
private  java.util.Map<CloneConfig.Area,java.util.Set<java.lang.String>> _includeObjectMap
           
private  boolean _isCommandLineRequest
           
private  java.lang.Boolean _isSrcIntegrated
           
private  java.lang.String _loggedOnUser
           
(package private)  java.util.ArrayList<CourseToc> _originalTargetCourseTocList
           
private  java.lang.String _rawCsDir
           
private  java.lang.String _sourceName
           
private  java.lang.String _srcHomeDir
           
private  java.lang.String _strDataSourceId
           
(package private)  java.util.Map<java.lang.String,CourseToc> _tocAreaMap
           
private  java.util.ArrayList<java.lang.String> _tocIdList
           
private  java.lang.Integer _tranCount
           
private  boolean _useCourseCopyLog
           
(package private) static long serialVersionUID
           
 
Constructor Summary
CloneConfig()
          Creates an instance of CloneConfig with default property values.
 
Method Summary
 boolean canUseCourseCopyLog()
          Whether to use the Course Copy Log for logging.
 void excludeArea(CloneConfig.Area area)
          Used to disable portions from being copied.
 void excludeArea(CourseToc area)
          Used to include actual Course Toc areas.
 void excludeArea(Id areaId)
          Used to include actual Course Toc Id areas.
 CloneCallback getCallback()
          Returns callback object to be used for cloning process.
 CloneConfig.CopyType getCopyType()
          Gets the type of the clone operation as CloneConfig.CopyType.
 java.util.List<java.lang.String> getCourseTocIdList()
          Get CourseToc Id list
 java.lang.String getCsDir()
          Gets the validated or final value of target parent Content System directory used in cloning Course Files.
 boolean getCsDirVerified()
          Returns the flag that indicates whether the target Content System directory has been verified as valid.
 java.util.Set<java.lang.String> getExcludedCsFolderIds()
          Gets the Set of Content System entries to exclude during copy.
 java.lang.String getHostName()
          Returns the host name in the case of the copy operation is invoked from the command line.
 java.util.Set<java.lang.String> getIncludedObjects(CloneConfig.Area eArea)
          Returns a list of Strings per the objects included within given area.
 boolean getIsCommandLineRequest()
          Returns whether this is a command line operation.
 java.lang.String getLoggedOnUser()
           
 int getMaximumTransactionCount()
          Returns maximum number of transactions allowed before a commit.
 Id getMembershipDataSourceId()
          Get id associated with data source to be used for membership clone operation.
 java.util.ArrayList<CourseToc> getOriginalTargetCourseTocList()
          Returns the list of original list of course menu items from the target course
 java.lang.String getRawCsDir()
          Gets the raw user input for target parent Content System directory used in cloning Course Files.
 java.lang.Boolean getReconcileFlag()
          Get flag denoting whether target should be reconciled against source course.
 CourseToc getRegisteredCourseToc(Id id)
          Get CourseToc associated with provided Id
 java.lang.String getSourceName()
          Gets the localized name of the copy operation, e.g.
 java.lang.String getSrcHomeDir()
          Gets the default/home directory of the source course's Course Files.
 boolean getSuppressEvents()
          Deprecated. Since 9.1SP8. Copy events are always fired and cannot be turned off.
 void includeArea(CloneConfig.Area area)
          Used to enable portions to be copied.
 void includeArea(CourseToc area)
          Used to include actual Course Toc areas.
 void includeArea(Id areaId)
          Used to include actual Course Toc Id areas.
 void includeCxComponent(java.lang.String componentHandle)
           
 void includeObject(CloneConfig.Area eArea, java.lang.String strId)
          Includes the provided object (identified by a value from CloneConfig.Area and string-based identifier) as part of the current operation.
 boolean isAreaIncluded(CloneConfig.Area area)
          Return confirmation if provided area is included in the clone process.
 boolean isAreaIncluded(CourseToc area)
          Return confirmation if provided CourseToc is included in the clone process.
 boolean isAreaIncluded(Id area)
          Return confirmation if provided CourseToc Id area is included in the clone process.
 boolean isCloneForDecrossList()
          Returns whether this copy operation is for de-cross listing a child course
 boolean isCxComponentIncluded(java.lang.String componentHandle)
           
 boolean isFromAdminPanel()
          Returns whether this copy operation was initiated from the Administrator Panel
 boolean isHadWarnings()
          Returns whether there are any warnings during the clone operation.
 boolean isSrcIntegrated()
           
 void resetCsDir()
          Resets the verified target parent Content System directory and the associated boolean indicator used in cloning Course Files .
 void setArchiveCSItems(boolean archiveCSItems)
          Sets whether to include Course Files in the clone operation.
 void setCallback(CloneCallback callback)
          Establishes callback object to be used for cloning process.
 void setCloneForDecrossList(boolean cloneForDecrossList)
          Sets whether this copy operation is for de-cross listing a child course
 void setCopyType(CloneConfig.CopyType copyType)
          Sets the type of the clone operation using CloneConfig.CopyType.
 void setCopyType(java.lang.String copyType)
          Sets the type of the clone operation using the mapping name of CloneConfig.CopyType.
 void setCsDir(java.lang.String csDir)
          Sets the validated or final value of target parent Content System directory used in cloning Course Files.
 void setCsDirVerified(boolean csDirVerified)
          Sets whether the target Content System directory has been verified as valid.
 void setExcludedCsFolderIds(java.lang.String[] excludedXythosIds)
          Sets the Set of Content System entries to exclude during copy.
 void setHadWarnings(boolean hadWarnings)
          Sets whether there are any warnings during the clone operation.
 void setHostName(java.lang.String hostName)
          Sets the host name in the case of the copy operation is invoked from the command line.
 void setIsCommandLineRequest(boolean commandLineRequest)
          Sets whether this is a command line operation.
 void setIsFromAdminPanel(boolean fromAdminPanel)
          Sets whether this copy operation was initiated from the Administrator Panel
 void setIsSrcIntegrated(boolean val)
           
 void setLoggedOnUser(java.lang.String loggedOnUser)
           
 void setMaximumTransactionCount(int tranCount)
          Sets maximum number of transactions allowed before a commit.
 void setMembershipDataSourceId(Id dataSourceId)
          Set Id of data source to be used for membership clone operation.
 void setOriginalTargetCourseTocList(java.util.ArrayList<CourseToc> originalTargetCourseTocList)
          Sets a list of the original list of course menu items from the target course
 void setRawCsDir(java.lang.String rawCsDir)
          Sets the raw user input for target parent Content System directory used in cloning Course Files.
 void setReconcileFlag(java.lang.Boolean reconcile)
          Set flag denoting whether target should be reconciled against source course.
 void setSourceName(java.lang.String name)
          Gets the localized name of the copy operation, e.g.
 void setSrcHomeDir(java.lang.String srcHomeDir)
          Sets the default/home directory of the source course's Course Files.
 void setSuppressEvents(boolean val)
          Deprecated. Since 9.1SP8. Copy events are always fired and cannot be turned off.
 void setUseCourseCopyLog(boolean useCopyLog)
          Sets whether the Clone process should use the Course Copy Log for logging.
 boolean shouldCopyAllCSItems()
          Returns whether all course files are included.
 boolean shouldCopyAnyCSItems()
          Returns whether (any) course files should be copied.
 boolean shouldCopyCSItemByArea()
          Returns whether course files are included and whether only referenced files are copied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tranCount

private java.lang.Integer _tranCount

_areaList

private final java.util.ArrayList<java.lang.String> _areaList

_cxComponentList

private final java.util.ArrayList<java.lang.String> _cxComponentList

_tocIdList

private final java.util.ArrayList<java.lang.String> _tocIdList

_bReconcile

private java.lang.Boolean _bReconcile

_strDataSourceId

private java.lang.String _strDataSourceId

_isSrcIntegrated

private java.lang.Boolean _isSrcIntegrated

_tocAreaMap

transient java.util.Map<java.lang.String,CourseToc> _tocAreaMap

_callback

transient CloneCallback _callback

_originalTargetCourseTocList

transient java.util.ArrayList<CourseToc> _originalTargetCourseTocList

_hostName

private java.lang.String _hostName

_sourceName

private java.lang.String _sourceName

_isCommandLineRequest

private boolean _isCommandLineRequest

_hadWarnings

private boolean _hadWarnings

_archiveCSItems

private boolean _archiveCSItems

_rawCsDir

private java.lang.String _rawCsDir

_csDir

private java.lang.String _csDir

_csDirVerified

private boolean _csDirVerified

_srcHomeDir

private java.lang.String _srcHomeDir

_copyType

private CloneConfig.CopyType _copyType

_excludedCsFolderIds

private java.util.Set<java.lang.String> _excludedCsFolderIds

_fromAdminPanel

private boolean _fromAdminPanel

_useCourseCopyLog

private boolean _useCourseCopyLog

_loggedOnUser

private java.lang.String _loggedOnUser

_cloneForDecrossList

private boolean _cloneForDecrossList

_includeObjectMap

private final java.util.Map<CloneConfig.Area,java.util.Set<java.lang.String>> _includeObjectMap

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

CloneConfig

public CloneConfig()
Creates an instance of CloneConfig with default property values.

Method Detail

getReconcileFlag

public java.lang.Boolean getReconcileFlag()
Get flag denoting whether target should be reconciled against source course.

Returns:
Boolean flag

setReconcileFlag

public void setReconcileFlag(java.lang.Boolean reconcile)
Set flag denoting whether target should be reconciled against source course.

Parameters:
reconcile - Boolean flag

getMembershipDataSourceId

public Id getMembershipDataSourceId()
Get id associated with data source to be used for membership clone operation.

Returns:
Id Data source id

setMembershipDataSourceId

public void setMembershipDataSourceId(Id dataSourceId)
Set Id of data source to be used for membership clone operation.

Parameters:
dataSourceId - Boolean flag

getCourseTocIdList

public java.util.List<java.lang.String> getCourseTocIdList()
Get CourseToc Id list

Returns:
Id list

getRegisteredCourseToc

public CourseToc getRegisteredCourseToc(Id id)
Get CourseToc associated with provided Id

Parameters:
id - Internal identifer for CourseToc
Returns:
CourseToc include area

includeArea

public void includeArea(CourseToc area)
Used to include actual Course Toc areas.

Parameters:
area - CourseToc to be included.

includeArea

public void includeArea(Id areaId)
Used to include actual Course Toc Id areas.

Parameters:
areaId - CourseToc area Id to be included.

excludeArea

public void excludeArea(CourseToc area)
Used to include actual Course Toc areas.

Parameters:
area - CourseToc area to be included.

excludeArea

public void excludeArea(Id areaId)
Used to include actual Course Toc Id areas.

Parameters:
areaId - CourseToc area Id to be excluded.

isAreaIncluded

public boolean isAreaIncluded(CourseToc area)
Return confirmation if provided CourseToc is included in the clone process.

Parameters:
area - Representation of area under study.
Returns:
boolean Is area included

isAreaIncluded

public boolean isAreaIncluded(Id area)
Return confirmation if provided CourseToc Id area is included in the clone process.

Parameters:
area - Representation of area under study.
Returns:
boolean Is area included

isCxComponentIncluded

public boolean isCxComponentIncluded(java.lang.String componentHandle)

includeCxComponent

public void includeCxComponent(java.lang.String componentHandle)

includeArea

public void includeArea(CloneConfig.Area area)
Used to enable portions to be copied.

Parameters:
area - Designates area to be included.

includeObject

public void includeObject(CloneConfig.Area eArea,
                          java.lang.String strId)
Includes the provided object (identified by a value from CloneConfig.Area and string-based identifier) as part of the current operation. Object inclusion is only valid if the CloneConfig.CopyType is COPY_EXISTING_COURSE

Parameters:
eArea - a CloneConfig.Area value denoting the area of the object to to include. This is necessary because the id of an item is only guaranteed to be unique within a given area
strId - the id of the object as a String. The form of this id string is container specific and may not be a true 'id' as is the case for settings restrictions

getIncludedObjects

public java.util.Set<java.lang.String> getIncludedObjects(CloneConfig.Area eArea)
Returns a list of Strings per the objects included within given area. (May be IDs or constants... depending on Area)

Parameters:
eArea - a CloneConfig.Area value denoting the area of the object to to include.

excludeArea

public void excludeArea(CloneConfig.Area area)
Used to disable portions from being copied.

Parameters:
area - Designates area to be excluded.

isAreaIncluded

public boolean isAreaIncluded(CloneConfig.Area area)
Return confirmation if provided area is included in the clone process.

Parameters:
area - Representation of area under study.
Returns:
boolean Is area included

setCallback

public void setCallback(CloneCallback callback)
Establishes callback object to be used for cloning process.

Parameters:
callback - CloneCallback object to be used in cloning.

getCallback

public CloneCallback getCallback()
Returns callback object to be used for cloning process.

Returns:
callback CloneCallback object to be used in cloning.

setOriginalTargetCourseTocList

public void setOriginalTargetCourseTocList(java.util.ArrayList<CourseToc> originalTargetCourseTocList)
Sets a list of the original list of course menu items from the target course

Parameters:
originalTargetCourseTocList - List of CourseToc objects

getOriginalTargetCourseTocList

public java.util.ArrayList<CourseToc> getOriginalTargetCourseTocList()
Returns the list of original list of course menu items from the target course

Returns:
List of CourseToc objects

getMaximumTransactionCount

public int getMaximumTransactionCount()
Returns maximum number of transactions allowed before a commit.

Returns:
integer designated transactions allowed

setMaximumTransactionCount

public void setMaximumTransactionCount(int tranCount)
Sets maximum number of transactions allowed before a commit.

Parameters:
tranCount - integer designated transactions allowed

getSuppressEvents

@Deprecated
public boolean getSuppressEvents()
Deprecated. Since 9.1SP8. Copy events are always fired and cannot be turned off.


setSuppressEvents

@Deprecated
public void setSuppressEvents(boolean val)
Deprecated. Since 9.1SP8. Copy events are always fired and cannot be turned off.


isSrcIntegrated

public boolean isSrcIntegrated()

setIsSrcIntegrated

public void setIsSrcIntegrated(boolean val)

getLoggedOnUser

public java.lang.String getLoggedOnUser()

setLoggedOnUser

public void setLoggedOnUser(java.lang.String loggedOnUser)

getHostName

public java.lang.String getHostName()
Returns the host name in the case of the copy operation is invoked from the command line.

Returns:
host name of the command line operation.

setHostName

public void setHostName(java.lang.String hostName)
Sets the host name in the case of the copy operation is invoked from the command line.

Parameters:
hostName - host name of the command line operation.

getSourceName

public java.lang.String getSourceName()
Gets the localized name of the copy operation, e.g. Snapshot Copy Into. This is used by event notification.

Returns:
localized name of the copy operation

setSourceName

public void setSourceName(java.lang.String name)
Gets the localized name of the copy operation, e.g. Snapshot Copy Into. This is used by event notification.

Parameters:
name - localized name of the copy operation

getIsCommandLineRequest

public boolean getIsCommandLineRequest()
Returns whether this is a command line operation.

Returns:
True, if the operation is invoked from the command line.

setIsCommandLineRequest

public void setIsCommandLineRequest(boolean commandLineRequest)
Sets whether this is a command line operation.

Parameters:
commandLineRequest - boolean flag to indicate whether it's a command line operation.

isHadWarnings

public boolean isHadWarnings()
Returns whether there are any warnings during the clone operation.

Returns:
boolean flag to indicate whether there are any warnings during the clone operation.

setHadWarnings

public void setHadWarnings(boolean hadWarnings)
Sets whether there are any warnings during the clone operation.

Parameters:
hadWarnings - boolean flag to indicate whether there are any warnings during the clone operation.

setArchiveCSItems

public void setArchiveCSItems(boolean archiveCSItems)
Sets whether to include Course Files in the clone operation.

Parameters:
archiveCSItems - boolean flag to indicate whether Course Files should be included in the clone operation.

getCopyType

public CloneConfig.CopyType getCopyType()
Gets the type of the clone operation as CloneConfig.CopyType.

Returns:
the type of the copy operation.

setCopyType

public void setCopyType(CloneConfig.CopyType copyType)
Sets the type of the clone operation using CloneConfig.CopyType.

Parameters:
copyType - type of the operation.

setCopyType

public void setCopyType(java.lang.String copyType)
Sets the type of the clone operation using the mapping name of CloneConfig.CopyType.

Parameters:
copyType - mapping name of CloneConfig.CopyType

getCsDirVerified

public boolean getCsDirVerified()
Returns the flag that indicates whether the target Content System directory has been verified as valid.

Returns:
True, if the Content System directory has been verified.

setCsDirVerified

public void setCsDirVerified(boolean csDirVerified)
Sets whether the target Content System directory has been verified as valid.

Parameters:
csDirVerified - the boolean flag to indicate whether the Content System directory has been verified.

getSrcHomeDir

public java.lang.String getSrcHomeDir()
Gets the default/home directory of the source course's Course Files.

Returns:
home directory of the source course's Course Files.

setSrcHomeDir

public void setSrcHomeDir(java.lang.String srcHomeDir)
Sets the default/home directory of the source course's Course Files.

Parameters:
srcHomeDir - home directory of the source course's Course Files.

getExcludedCsFolderIds

public java.util.Set<java.lang.String> getExcludedCsFolderIds()
Gets the Set of Content System entries to exclude during copy.

Returns:
the Set of Content System entries to exclude during copy.

setExcludedCsFolderIds

public void setExcludedCsFolderIds(java.lang.String[] excludedXythosIds)
Sets the Set of Content System entries to exclude during copy.

Parameters:
excludedXythosIds - Set of Content System entries to exclude during copy.

getCsDir

public java.lang.String getCsDir()
Gets the validated or final value of target parent Content System directory used in cloning Course Files.

Returns:
validated or final value of target parent Content System directory used in cloning Course Files.

setCsDir

public void setCsDir(java.lang.String csDir)
Sets the validated or final value of target parent Content System directory used in cloning Course Files.

Parameters:
csDir - validated or final value of target parent Content System directory used in cloning Course Files.

resetCsDir

public void resetCsDir()
Resets the verified target parent Content System directory and the associated boolean indicator used in cloning Course Files . This is called at the beginning of copying a course when the request is for a list of courses and a single target parent folder is specified, which is stored as _rawCsDir.


getRawCsDir

public java.lang.String getRawCsDir()
Gets the raw user input for target parent Content System directory used in cloning Course Files.

Returns:
raw data for target parent Content System directory used in cloning Course Files.

setRawCsDir

public void setRawCsDir(java.lang.String rawCsDir)
Sets the raw user input for target parent Content System directory used in cloning Course Files. This should only be called to store the raw folder path.

Parameters:
rawCsDir - raw data for target parent Content System directory used in cloning Course Files.

shouldCopyCSItemByArea

public boolean shouldCopyCSItemByArea()
Returns whether course files are included and whether only referenced files are copied.

Returns:
True, if course files should be copied for each course area individually.

shouldCopyAllCSItems

public boolean shouldCopyAllCSItems()
Returns whether all course files are included.

Returns:
True, if all course files should be copied.

shouldCopyAnyCSItems

public boolean shouldCopyAnyCSItems()
Returns whether (any) course files should be copied.

Returns:
True, if (any) course files should be copied.

setIsFromAdminPanel

public void setIsFromAdminPanel(boolean fromAdminPanel)
Sets whether this copy operation was initiated from the Administrator Panel


isFromAdminPanel

public boolean isFromAdminPanel()
Returns whether this copy operation was initiated from the Administrator Panel


isCloneForDecrossList

public boolean isCloneForDecrossList()
Returns whether this copy operation is for de-cross listing a child course


setCloneForDecrossList

public void setCloneForDecrossList(boolean cloneForDecrossList)
Sets whether this copy operation is for de-cross listing a child course


setUseCourseCopyLog

public void setUseCourseCopyLog(boolean useCopyLog)
Sets whether the Clone process should use the Course Copy Log for logging.


canUseCourseCopyLog

public boolean canUseCourseCopyLog()
Whether to use the Course Copy Log for logging.