com.plumtree.portalpages.admin.ptutilities.migrationutility.exp
Class MigrationSelectForExportModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel
              extended by com.plumtree.portalpages.admin.ptutilities.migrationutility.exp.MigrationSelectForExportModel
All Implemented Interfaces:
ISelectPTObjectModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class MigrationSelectForExportModel
extends SelectPTObjectModel

Author:
jennifersu

Field Summary
static java.lang.String CONTENTS_COLUMN_WIDTH
           
static java.lang.String DEPENDENCIES_COLUMN_WIDTH
           
static int EXPLIST_COL_DEPENDENCIES
          This column contains the Object Class IDs.
static int EXPLIST_COL_DESCRIPTION
          This column contains the description
static int EXPLIST_COL_FOLDER_CONTENTS
          This column contains the Object Class IDs.
static int EXPLIST_COL_MAX
          Number total of columns
static int EXPLIST_COL_SUBMITTED_BY
          This column contains the migration submitter.
static int EXPLIST_COL_TYPE
          This column contains the Object Class IDs.
static java.lang.String ICON_COLUMN_WIDTH
          Column widths for the various columns.
protected  XPHashtable m_htObjsToMigrate
          Hashtable to keep track of which objects have already been added to the list of objects to migrate.
protected  java.lang.String m_sAdminTreeSpaceID
          Tree Space ID.
protected  java.lang.String m_sCurrentUser
          Current username.
protected  java.lang.String m_sDirTreeSpaceID
          Tree Space ID.
protected  java.lang.String m_sGlobalTreeSpaceID
          Tree Space ID.
static java.lang.String NAME_COLUMN_WIDTH
           
static java.lang.String STR_MVC_CLASS_NAME
           
static java.lang.String SUBMITTED_BY_COLUMN_WIDTH
           
static java.lang.String SUBSPACE_KEY_ADMINTREE
          Key name used by the Activity Space to store the tree.
static java.lang.String SUBSPACE_KEY_DIRTREE
          Key name used by the Activity Space to store the tree.
static java.lang.String SUBSPACE_KEY_GLOBALTREE
          Key name used by the Activity Space to store the tree.
static int TYPE_ADMIN_OBJ
          HTML dropdown value for filtering on all.
static int TYPE_DIRECTORY
          HTML dropdown value for filtering on admin disabled.
static int TYPE_GLOBAL
          HTML dropdown value for filtering on agent disabled.
 
Fields inherited from class com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel
CREATE_NEW_COL_ASNAME, CREATE_NEW_COL_CLASSID, CREATE_NEW_COL_ICON, CREATE_NEW_COL_LABEL, CREATE_NEW_COL_MAX, CREATE_NEW_COL_MAXWITHPARAMS, CREATE_NEW_COL_PARAMS, EXPLIST_COL_CLASSID, EXPLIST_COL_OBJECTID, EXPLIST_COL_STRING, EXPLIST_DEFAULT_INITIAL_SIZE, HIDE_COL_CLASSID, HIDE_COL_MAX, HIDE_COL_OBJECTID, m_arrCreateNewInfo, m_arrObjectClassIDs, m_arrReadOnlyObjects, m_bNoRowIcons, m_bTreeMultiSelect, m_imgDefaultRowIcon, m_nAccessLevel, m_nCommunityFolderID, m_nCommunityMode, m_sDisplayObjects, m_sTreeSpaceID, m_sTreeSubTitle, m_sTreeTitle, m_strObjectsToHide, m_strTreeQueryFilter, m_treeLeafType, m_xphtRowIcons, PARAM_COL_PARAMNAME, PARAM_COL_PARAMVALUE, READ_ONLY_ROW_CLASSID, READ_ONLY_ROW_OBJECTID, SUBSPACE_KEY_SELECTTREE
 
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
MigrationSelectForExportModel()
          Inits member variables
 
Method Summary
 void AddAllApproved()
          Adds all approved objects to list of resources to export.
 void AddRowsOnRepost(XPHashtable _htFormData)
          Clear the list and add all the values from the tree.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeleteRowsOnRepost(XPHashtable _htFormData)
          Gets the array of checked rows and delete them from the list.
 java.lang.String GetAdminObjectClassIDs()
          Returns String of Class ID of the Objects displayed in the tree.
 java.lang.String GetAdminTreeSpaceID()
          Returns tree AS ID.
 java.lang.String GetDirectoryClassIDs()
          Returns String of Class ID of the Objects displayed in the tree.
 java.lang.String GetDirectoryTreeSpaceID()
          Returns tree AS ID.
 java.lang.String GetGlobalTreeSpaceID()
          Returns tree AS ID.
 java.lang.String GetName()
          Returns the Class name.
 java.lang.String GetTreeMultiSelect()
          Returns the selection type of the tree.
 java.lang.String GetTreeTitle()
          "Resources to Export"
 void InitializeSelectForExport(java.lang.String _sSectionTitle, java.lang.String _sSectionSubTitle, PTImageType _imgAddIcon, java.lang.String _sAddLabel, int[] _arrObjectClassIDs, int _nListKey)
          Initializes the expandable list.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort.
 void InitSFE(IPTSession ptSession)
          Initializes and starts the list of objects to export.
 boolean IsAdminObject(int _intClassID)
           
 boolean IsDirObject(int _intClassID)
           
 boolean IsGlobalObject(int _intClassID)
           
 void LoadResources()
          Loads the list with objects that get uploaded from the Add Existing Package feature.
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Saves the data for columns other than the plumtree object select column on the row _nRowIndex.
 int SaveSection(XPHashtable _htFormData)
          Saves the data when a repost occurs.
protected  void SaveTreeID(XPHashtable _htFormData)
          Helper method to save the Tree ID on repost.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel
AddControlParamsToURL, ClearHiddenObjects, ContainsObject, CreateIndexMapping, DoTaskOnComeBackFromSubEditor, GetAccessLevel, GetCommunityFolderID, GetCommunityMode, GetCreateNewInfo, GetCreateNewURL, GetDefaultRowIcon, GetDisplayObjects, GetEditObjectURL, GetHiddenObjects, GetIndex, GetNoRowIcons, GetObjectClassIDs, GetRowIconByClassID, GetSelectedItems, GetSelectedNamesAsHTML, GetTreeLeafType, GetTreeQueryFilter, GetTreeSpaceID, GetTreeSubTitle, GetUniquePopUpName, InitializeListClassIDs, InitializeReadOnlySelectPTObject, InitializeSelectPTObject, IsEditLinkEnabled, IsObjectReadOnly, ResetTreeID, SetAccessLevel, SetCommunityFolderID, SetCommunityMode, SetDefaultObjects, SetDefaultRowIcon, SetDisplayObjects, SetEnableCreateNew, SetEnableMoveRowActions, SetHiddenObjects, SetNoRowIcons, SetReadOnlyObjects, SetRowIconByClassID, SetTreeLeafType, SetTreeMultiSelect, SetTreeQueryFilter, SetTreeSubTitle, SetTreeTitle
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
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, SetAddIcon, SetAddIconAlt, SetDeleteIcon, SetDeleteIconAlt, SetDelRowConfirmMsg, SetEmptyListMessages, SetEnableEmptyListClientValidation, SetIsListReadOnly, SetListKey, SetPagination, SetSectionTitle, SetTableInstructions, SetWrapColumnHeaders, SortByColumn
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData, Init
 
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, Init
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_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

EXPLIST_COL_FOLDER_CONTENTS

public static final int EXPLIST_COL_FOLDER_CONTENTS
This column contains the Object Class IDs.

See Also:
Constant Field Values

EXPLIST_COL_DEPENDENCIES

public static final int EXPLIST_COL_DEPENDENCIES
This column contains the Object Class IDs.

See Also:
Constant Field Values

EXPLIST_COL_TYPE

public static final int EXPLIST_COL_TYPE
This column contains the Object Class IDs.

See Also:
Constant Field Values

EXPLIST_COL_SUBMITTED_BY

public static final int EXPLIST_COL_SUBMITTED_BY
This column contains the migration submitter.

See Also:
Constant Field Values

EXPLIST_COL_DESCRIPTION

public static final int EXPLIST_COL_DESCRIPTION
This column contains the description

See Also:
Constant Field Values

ICON_COLUMN_WIDTH

public static final java.lang.String ICON_COLUMN_WIDTH
Column widths for the various columns.

See Also:
Constant Field Values

NAME_COLUMN_WIDTH

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

SUBMITTED_BY_COLUMN_WIDTH

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

CONTENTS_COLUMN_WIDTH

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

DEPENDENCIES_COLUMN_WIDTH

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

m_htObjsToMigrate

protected XPHashtable m_htObjsToMigrate
Hashtable to keep track of which objects have already been added to the list of objects to migrate. key=classid,objectid; value=name string.


m_sAdminTreeSpaceID

protected java.lang.String m_sAdminTreeSpaceID
Tree Space ID. The first time the ID is empty and a new AS is opened, but after that, we save the ID and the same tree AS is reopened each time.


m_sDirTreeSpaceID

protected java.lang.String m_sDirTreeSpaceID
Tree Space ID. The first time the ID is empty and a new AS is opened, but after that, we save the ID and the same tree AS is reopened each time.


m_sGlobalTreeSpaceID

protected java.lang.String m_sGlobalTreeSpaceID
Tree Space ID. The first time the ID is empty and a new AS is opened, but after that, we save the ID and the same tree AS is reopened each time.


m_sCurrentUser

protected java.lang.String m_sCurrentUser
Current username. Used for the SubmittedBy column.


TYPE_ADMIN_OBJ

public static final int TYPE_ADMIN_OBJ
HTML dropdown value for filtering on all.

See Also:
Constant Field Values

TYPE_DIRECTORY

public static final int TYPE_DIRECTORY
HTML dropdown value for filtering on admin disabled.

See Also:
Constant Field Values

TYPE_GLOBAL

public static final int TYPE_GLOBAL
HTML dropdown value for filtering on agent disabled.

See Also:
Constant Field Values

SUBSPACE_KEY_ADMINTREE

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

See Also:
Constant Field Values

SUBSPACE_KEY_DIRTREE

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

See Also:
Constant Field Values

SUBSPACE_KEY_GLOBALTREE

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

See Also:
Constant Field Values
Constructor Detail

MigrationSelectForExportModel

public MigrationSelectForExportModel()
Inits member variables

Method Detail

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
Overrides:
Create in class SelectPTObjectModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

GetName

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

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

GetTreeMultiSelect

public java.lang.String GetTreeMultiSelect()
Description copied from class: SelectPTObjectModel
Returns the selection type of the tree. Converts the boolean value to a string so that it can be put in the query string for the tree.

Specified by:
GetTreeMultiSelect in interface ISelectPTObjectModelRO
Overrides:
GetTreeMultiSelect in class SelectPTObjectModel
Returns:
String
See Also:
ISelectPTObjectModelRO.GetTreeMultiSelect()

GetTreeTitle

public java.lang.String GetTreeTitle()
"Resources to Export"

Specified by:
GetTreeTitle in interface ISelectPTObjectModelRO
Overrides:
GetTreeTitle in class SelectPTObjectModel
Returns:
String
See Also:
SelectPTObjectModel.GetTreeTitle()

InitSFE

public void InitSFE(IPTSession ptSession)
Initializes and starts the list of objects to export.


InitializeSelectForExport

public void InitializeSelectForExport(java.lang.String _sSectionTitle,
                                      java.lang.String _sSectionSubTitle,
                                      PTImageType _imgAddIcon,
                                      java.lang.String _sAddLabel,
                                      int[] _arrObjectClassIDs,
                                      int _nListKey)
Initializes the expandable list.

Parameters:
_sSectionTitle - Main title.
_sSectionSubTitle - Sub title
_imgAddIcon - Icon for the add action.
_sAddLabel - Text to display next to the add icon.
_arrObjectClassIDs - Class ID of the Objects displayed on the list.
_nListKey - In case you have multiple Expandable Lists on the same DP, they should have a different key (otherwise, just set it to 1).

InitializeSortedArray

public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort. The growable array will always be sorted by the 1st column ascending.

Overrides:
InitializeSortedArray in class SelectPTObjectModel
Parameters:
_saData -

LoadResources

public void LoadResources()
Loads the list with objects that get uploaded from the Add Existing Package feature.


SaveSection

public int SaveSection(XPHashtable _htFormData)
Description copied from class: ExpListModel
Saves the data when a repost occurs. Editors using this framework need to call that method from the savePage method of the main Model.

Overrides:
SaveSection in class ExpListModel
Parameters:
_htFormData - Form posted data.
Returns:
int Status for server side validation
See Also:
EditorHelperModel.SaveSection(XPHashtable)

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Saves the data for columns other than the plumtree object select column on the row _nRowIndex.

Overrides:
SaveRow in class SelectPTObjectModel
Parameters:
_saData - List to update the data on row _nRowIndex
_nRowIndex - Index of the row to save.
_htFormData - Data posted by the form.
Returns:
int Status for server side validation.

AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
Clear the list and add all the values from the tree.

Overrides:
AddRowsOnRepost in class SelectPTObjectModel
Parameters:
_htFormData - Form data

DeleteRowsOnRepost

public void DeleteRowsOnRepost(XPHashtable _htFormData)
Gets the array of checked rows and delete them from the list.

Overrides:
DeleteRowsOnRepost in class ExpListModel
Parameters:
_htFormData -

AddAllApproved

public void AddAllApproved()
Adds all approved objects to list of resources to export.


GetAdminObjectClassIDs

public java.lang.String GetAdminObjectClassIDs()
Returns String of Class ID of the Objects displayed in the tree. E.g.: "2,45,3" This is the format used by the tree.

Returns:
String

GetDirectoryClassIDs

public java.lang.String GetDirectoryClassIDs()
Returns String of Class ID of the Objects displayed in the tree. E.g.: "2,45,3" This is the format used by the tree.

Returns:
String

SaveTreeID

protected void SaveTreeID(XPHashtable _htFormData)
Helper method to save the Tree ID on repost.

Overrides:
SaveTreeID in class SelectPTObjectModel
Parameters:
_htFormData - Form data

GetAdminTreeSpaceID

public java.lang.String GetAdminTreeSpaceID()
Returns tree AS ID.

Returns:
String

GetDirectoryTreeSpaceID

public java.lang.String GetDirectoryTreeSpaceID()
Returns tree AS ID.

Returns:
String

GetGlobalTreeSpaceID

public java.lang.String GetGlobalTreeSpaceID()
Returns tree AS ID.

Returns:
String

IsAdminObject

public boolean IsAdminObject(int _intClassID)

IsDirObject

public boolean IsDirObject(int _intClassID)

IsGlobalObject

public boolean IsGlobalObject(int _intClassID)



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