com.plumtree.portalpages.admin.ptutilities.migrationutility.imp
Class MigrationDependencyListModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portalpages.admin.ptutilities.migrationutility.imp.MigrationDependencyListModel
All Implemented Interfaces:
IMigrationDependencyListModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class MigrationDependencyListModel
extends ExpListModel
implements IMigrationDependencyListModelRO

Author:
jennifersu

Field Summary
static int EXPLIST_COL_CLASSID
          Expandable list column for class ID
static int EXPLIST_COL_MAX
          Number total of columns
static int EXPLIST_COL_NAME
          Expandable list column for missing name
static int EXPLIST_COL_NEW_NAME
          Expandable list column for new object name
static int EXPLIST_COL_NEW_UUID
          Expandable list column for new object ID
static int EXPLIST_COL_UUID
          Expandable list column for UUID
protected  XPHashtable m_htAllMissingDependencies
          Table of unresolved dependencies.
protected  XPHashtable m_htObjectsWithMissingDependencies
          Table of all objects that depend on objects in this list.
protected  XPArrayList[] m_xparObjectsInPackage
          Array of XPArrayLists of objects loaded, indexed by classID.
static java.lang.String STR_MVC_CLASS_NAME
           
static java.lang.String SUBSPACE_KEY_SELECTDEPENDENCYTREE
          Key name used by the Activity Space to store the tree.
 
Fields inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
EXPLIST_COLUMN_COLSPAN, EXPLIST_COLUMN_ENABLESORT, EXPLIST_COLUMN_ID, EXPLIST_COLUMN_INVALID, EXPLIST_COLUMN_TITLE, EXPLIST_COLUMN_WIDTH, EXPLIST_SORTEDARRAY_PROPID_INDEX, m_arrExpListColInfo, m_bAddButtonDisabled, m_bCheckBoxesDisabled, m_bEnableMoveRowActions, m_bIsReadOnly, m_bWrapColumnHeaders, m_imgAddIcon, m_imgDeleteIcon, m_nListKey, m_nNextIndex, m_saData, m_sAddIconAlt, m_sAddLabel, m_sDeleteIconAlt, m_sDelRowConfirmMsg, m_sEmptyListAlert, m_sInstructions, m_sMainMessage, m_sSectionTitle, m_sTableInstructions, MAX_ROWS, MOVEACTION_DOWN, MOVEACTION_FIRST, MOVEACTION_LAST, MOVEACTION_UP, parent
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
MigrationDependencyListModel()
           
 
Method Summary
 void AddRowsOnRepost(XPHashtable _htFormData)
          Will be called each time the add action is performed.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoEditDependency(XPHashtable _htFormData)
          Reads the selected item from dependency tree and sets the replacement on the unresolved dependency.
 ASURL DoOpenDependencyTree(XPHashtable _htFormData)
           
 XPHashtable GetAllUnresolvedDependencies()
          Gets XPHashtable of all missing dependencies.
 java.lang.String GetName()
          Returns the Class name.
 CPTMigrationDependency GetUnresolvedDependency(int _intRowIndex)
          Gets the CPTMigrationDependency object for the given row.
 void Init(AActivitySpace parent)
          Init
 void InitializeDependencies()
          Initializes columns and list
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Will be called when this class is initalized.
 void LoadObjectsAndDependencies()
          Loads Dependencies into expandable list.
 void MarkReadyToImportIfResolved(IPTMigrationElement ptME)
          Checks if the resolved object has any further missing dependencies, and removes it from the hashtable of objects with missing dependencies, if the object is ready to be imported.
 void RemoveAllUnresolvedDependenciesForObject(java.lang.String _strUUID)
          Removes all unresolved dependencies in the list for the given object with UUID.
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Will be called each ime there is a repost to save the data on the list.
 boolean UnresolvedDependenciesExist()
          True if unresolved dependencies exist
 void UpdateMissingDependencyList(CPTMigrationDependency cptmd, java.lang.String strMappedUUID)
          DOCUMENT ME!
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
DeleteRowsOnRepost, DisableAddButton, DisableCheckBoxes, EnablePagination, GetAddIcon, GetAddIconAlt, GetAddLabel, GetAlertMessageForEmptyList, GetArrayOfObjToDelete, GetArrExpListColInfo, GetCurrentLowerObjectCount, GetCurrentUpperObjectCount, GetDeleteIcon, GetDeleteIconAlt, GetDelRowConfirmMsg, GetEmptyListInstructions, GetEmptyListMainMessage, GetEnableMoveRowActions, GetIsListReadOnly, GetItems, GetListKey, GetMainColumnSort, GetMainColumnSortDirection, GetModelStorageName, GetMoveAction, GetNumObjects, GetPaginationSize, GetReadOnlyItems, GetRowIndex, GetSectionTitle, GetTableInstructions, GetUniqueInt, GetUniqueString, GetUnusedProperties, GetWrapColumnHeaders, InitializeExpandableList, InitializeReadOnlyExpandableList, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled, ModifyRow, MoveDown, MoveFirst, MoveLast, MoveRow, MoveUp, ReverseCurrentSort, SaveSection, SetAddIcon, SetAddIconAlt, SetDeleteIcon, SetDeleteIconAlt, SetDelRowConfirmMsg, SetEmptyListMessages, SetEnableEmptyListClientValidation, SetEnableMoveRowActions, SetIsListReadOnly, SetListKey, SetPagination, SetSectionTitle, SetTableInstructions, SetWrapColumnHeaders, SortByColumn
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.expandablelist.IExpListModelRO
GetAddIcon, GetAddIconAlt, GetAddLabel, GetAlertMessageForEmptyList, GetArrExpListColInfo, GetDeleteIcon, GetDeleteIconAlt, GetDelRowConfirmMsg, GetEmptyListInstructions, GetEmptyListMainMessage, GetEnableMoveRowActions, GetIsListReadOnly, GetListKey, GetMainColumnSort, GetMainColumnSortDirection, GetModelStorageName, GetReadOnlyItems, GetSectionTitle, GetTableInstructions, GetUniqueInt, GetUniqueString, GetUnusedProperties, GetWrapColumnHeaders, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled
 
Methods inherited from interface com.plumtree.uiinfrastructure.form.pagination.IPaginationModelRO
GetCurrentLowerObjectCount, GetCurrentUpperObjectCount, GetNumObjects, GetPaginationSize
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IModel
CleanupAllData, CleanupTempData
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values

EXPLIST_COL_CLASSID

public static final int EXPLIST_COL_CLASSID
Expandable list column for class ID

See Also:
Constant Field Values

EXPLIST_COL_UUID

public static final int EXPLIST_COL_UUID
Expandable list column for UUID

See Also:
Constant Field Values

EXPLIST_COL_NAME

public static final int EXPLIST_COL_NAME
Expandable list column for missing name

See Also:
Constant Field Values

EXPLIST_COL_NEW_UUID

public static final int EXPLIST_COL_NEW_UUID
Expandable list column for new object ID

See Also:
Constant Field Values

EXPLIST_COL_NEW_NAME

public static final int EXPLIST_COL_NEW_NAME
Expandable list column for new object name

See Also:
Constant Field Values

EXPLIST_COL_MAX

public static final int EXPLIST_COL_MAX
Number total of columns

See Also:
Constant Field Values

SUBSPACE_KEY_SELECTDEPENDENCYTREE

public static final java.lang.String SUBSPACE_KEY_SELECTDEPENDENCYTREE
Key name used by the Activity Space to store the tree.

See Also:
Constant Field Values

m_htAllMissingDependencies

protected XPHashtable m_htAllMissingDependencies
Table of unresolved dependencies. Key=UUID; Value=CPTMigrationDependency


m_htObjectsWithMissingDependencies

protected XPHashtable m_htObjectsWithMissingDependencies
Table of all objects that depend on objects in this list. Key=UUID; Value=IPTMigrationElement


m_xparObjectsInPackage

protected XPArrayList[] m_xparObjectsInPackage
Array of XPArrayLists of objects loaded, indexed by classID.

Constructor Detail

MigrationDependencyListModel

public MigrationDependencyListModel()
Method Detail

Init

public void Init(AActivitySpace parent)
Init

Specified by:
Init in interface IModel
Overrides:
Init in class EditorHelperModel
Parameters:
parent - the parent Activity Space

GetName

public java.lang.String GetName()
Description copied from class: EditorHelperModel
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorHelperModel
Returns:
String
See Also:
IMVCObject.GetName()

InitializeDependencies

public void InitializeDependencies()
Initializes columns and list


AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
Description copied from class: ExpListModel
Will be called each time the add action is performed. Should take care of adding the row(s) to the list. Use the GetItems() method to get the list.

Specified by:
AddRowsOnRepost in class ExpListModel
Parameters:
_htFormData - Form data

InitializeSortedArray

public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
Description copied from class: ExpListModel
Will be called when this class is initalized. Should take care of initializing _saData (calling Initialize).

Specified by:
InitializeSortedArray in class ExpListModel

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Description copied from class: ExpListModel
Will be called each ime there is a repost to save the data on the list. Should contain the code to update the data on the row _nRowIndex.Use the SetItem method to update _saData and use _htFormData to retrieve the posted data.

Specified by:
SaveRow in class ExpListModel
Returns:
int

Create

public java.lang.Object Create()
Description copied from class: EditorHelperModel
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Specified by:
Create in class EditorHelperModel
Returns:
A new instance of the managed class (i.e. return new Foo();)

LoadObjectsAndDependencies

public void LoadObjectsAndDependencies()
Loads Dependencies into expandable list.


UnresolvedDependenciesExist

public boolean UnresolvedDependenciesExist()
True if unresolved dependencies exist

Returns:
boolean

DoEditDependency

public void DoEditDependency(XPHashtable _htFormData)
Reads the selected item from dependency tree and sets the replacement on the unresolved dependency.

Parameters:
_htFormData -

DoOpenDependencyTree

public ASURL DoOpenDependencyTree(XPHashtable _htFormData)

RemoveAllUnresolvedDependenciesForObject

public void RemoveAllUnresolvedDependenciesForObject(java.lang.String _strUUID)
Removes all unresolved dependencies in the list for the given object with UUID. This should only be called when the object is removed from the Select Resources for Import list.

Parameters:
_strUUID -

GetUnresolvedDependency

public CPTMigrationDependency GetUnresolvedDependency(int _intRowIndex)
Gets the CPTMigrationDependency object for the given row.

Parameters:
_intRowIndex -
Returns:
CPTMigrationDependency

UpdateMissingDependencyList

public void UpdateMissingDependencyList(CPTMigrationDependency cptmd,
                                        java.lang.String strMappedUUID)
DOCUMENT ME!


MarkReadyToImportIfResolved

public void MarkReadyToImportIfResolved(IPTMigrationElement ptME)
Checks if the resolved object has any further missing dependencies, and removes it from the hashtable of objects with missing dependencies, if the object is ready to be imported.


GetAllUnresolvedDependencies

public XPHashtable GetAllUnresolvedDependencies()
Gets XPHashtable of all missing dependencies. Key=UUID; Value=CPTMigrationDependency

Returns:
XPHashtable



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.