com.plumtree.portalpages.admin.objmgr
Class ObjMgrModel

java.lang.Object
  extended by com.plumtree.portalpages.admin.objmgr.ObjMgrModel
All Implemented Interfaces:
IObjMgrDeleteRO, IObjMgrModelRO, IFolderModel, IFolderModelRO, IObjectModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IRepostModel, IPaginationModel, IPaginationModelRO, ISortModel, ISortModelRO

public class ObjMgrModel
extends java.lang.Object
implements IObjMgrModelRO, IFolderModel, IFolderModelRO, IObjectModelRO, IRepostModel, ISortModel, IPaginationModel, IObjMgrDeleteRO

Author:
Don Hayler This implements the admin page (obj mgr).

Field Summary
 IFolderViewHelper m_folderViewHelper
          Stores common class used to display one folder
static int MAX_DISPLAYED_USERS
           
static int MAX_NAME_LENGTH
           
static int MAX_PRE_EXPANDED_OBJECTS
           
static int NUM_SUB_SUB_FOLDERS
           
static java.lang.String STR_MVC_CLASS_NAME
          Name of this object
 
Constructor Summary
ObjMgrModel()
           
 
Method Summary
 void ABODeleteFolders(int[] nFolders)
          This method creates a job to delete folders using Asynchronous Browser Operations (ABO).
 void ABODeletePageTemplates(XPHashtable xpmSelectedObjects)
           
 boolean ABOJobsToDisplay()
          This method returns whether or not there are any job IDs to display.
 boolean CheckAuthSourceForDelete()
          This method checks if any users or groups came from an auth source other than plumtree.
 boolean CheckFoldersForDelete()
          This method checks whether or not the user is trying to delete any folders.
protected  boolean CheckIsCommunityFolder(int nFolderID)
           
 boolean CheckPageTemplatesForDelete()
          This method checks whether or not the user is trying to delete any page templates.
 void CleanupAllData()
          This method is called when an ActivitySpace is removed from the cache.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
 void ClearAllSelectedObjects()
          This method clears all of the selected items.
 void CopyFolders(int nTargetFolderID, int[] nFolders)
          This method copies folders to a new folder.
 void CopyObjectsBetweenFolders(int nFolderID, XPHashtable xpmObjects)
          This method copies objects between folders.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void CreateFolder(java.lang.String name, java.lang.String description)
           
 void DeleteFolders(int[] nFolders)
          This method deletes folders.
 void DeleteObjects(XPHashtable xpmObjects, boolean bABODeleteObjects)
          This method deletes objects.
 boolean DoNotShowObject(int nIndex)
          Get whether to show this object or not.
 void EnableObjects(XPHashtable xpmObjects, java.lang.String sComment, boolean bEnable)
          This method enables and disables users and web services.
protected  void ExpandAllClasses()
          This method is used to set the expanded object types index and string to include all currently visible classes.
 void ExpandAllObjects(boolean bExpand)
          This method is used to expand and collapse all objects in an admin folder.
 void ExpandObjectType(int nClassID, boolean bExpand)
          This method expands an object type.
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 java.lang.String GetABOJobFolderName()
          This method returns the folder where the ABO jobs were created.
 int[] GetABOJobIDs()
          This method returns the job IDs for the last ABO deletes, and then clears them.
 java.lang.String[] GetABOJobNames(int[] nABOJobIDs)
          This method returns the job names for the supplied ABO job IDs.
 boolean GetAreAllObjectsExpanded()
          This method is used to determine whether to display the 'expand all' button or the 'collapse all' button.
 IASQueryResult GetBreadCrumbPath()
          This method returns a 2d query result with folder level, id, and name.
 int GetCommunityID(int nFolderID)
          This method returns the community object ID associated with the folder.
 int GetCurrentFolderID()
          Get the id of the current folder.
 boolean GetCurrentFolderIsCommunity()
          This method returns whether or not the current folder is a community.
 boolean GetCurrentFolderIsSubportal()
          This method returns whether or not the current folder is a subportal.
 int GetCurrentFolderLevel()
          Get the level of the current folder
 java.lang.String GetCurrentFolderName()
          Get the name of the current folder.
 int GetCurrentLowerObjectCount()
          This method returns the current lower count for which objects to display.
 int GetCurrentlyOpeningObjectType()
          This method returns the object type that is in the process of being expanded, if any.
 int GetCurrentUpperObjectCount()
          This method returns the current upper count for which objects to display.
 boolean GetDisplayPaginationHiddenInputs()
          Get whether or not to display the hidden inputs needed by the PaginationControl.
 boolean GetDisplaySortHiddenInputs()
          Get whether or not to display the hidden inputs needed by the SortControl.
 int[] GetExpandedObjectTypesArray()
          This method returns an int array of the currently expanded object types.
 java.lang.String GetExpandedObjectTypesString()
          This method returns the string of currently expanded object types suitable for using in an URL.
 int GetFirstFolderIndex()
          Get the index of the first folder to display.
 int GetFirstFolderIndex(int[] nFolders)
          This method checks the array of folder IDs until it finds a non-community folder.
 int GetFolderColumnCount()
          Get the number of columns to display.
 int GetFolderIDFromTree()
          This method gets the selected folder from the tree sub space.
 IASQueryResult GetFolderObjectCount()
          Get a list of object names and the number of those objects in the current folder.
 IASQueryResult GetFolderQueryResult()
          Get an IPTQueryResult containing all of the subfolders of the current folder.
 java.lang.String GetFolderTreeID()
          This method returns the space ID of the folder select tree.
 IFolderViewHelper GetFolderViewHelper()
          Retrieves the folder view helper.
 boolean GetHasDisplayedObjects(int nClassID)
          This method checks whether or not the current page has any objects that will be displayed for the requested classID.
 int GetHeaderCount()
          Gets the count of the object headers.
 boolean GetHeaderHasCheckbox()
          Returns whether the header has a checkbox or not.
 HTMLTableRow GetHeaderRow()
          Returns the header row
 java.lang.String GetHeaderText(int nHeaderIndex)
          Gets the text of the header at the given index.
 boolean GetIsCollapsable()
          Gets whether or not the object banner should be collapsable.
 boolean GetIsFolderSelected(int nFolderID)
          This method returns whether or not the requested folder is currently selected.
 boolean GetIsObjectSelected(int nObjectID)
          This method returns whether or not the requested object ID is currently selected.
 int GetLastFolderIndex()
          Get the index of the first folder to display.
static java.lang.String GetLocalizedErrorString(int nErrorCode, AActivitySpace m_asOwner)
          TODO: Move this to a central location This method is used to get a localized version of a server error code.
static java.lang.String GetLocalizedErrorString(java.lang.Throwable e, AActivitySpace m_asOwner)
          TODO: Move this to a central location This method is used to get a localized version of a server exception.
 java.lang.String GetName()
          Return the name of the MVC object.
 int GetNumObjects()
          This method returns the total number of objects available for display.
 int GetNumSubSubFoldersToDisplay()
          Set the number of sub-subfolders to display after the next page..
 java.lang.String GetObjectBannerTitle()
          Gets the name of the current folder.
 int GetObjectColumnCount()
          Gets the number of columns of objects
 int GetObjectCount()
          Gets the count of the objects in the query result.
 java.lang.Object GetObjectFields(int nIndex, int ptPropID)
          Gets the fields from the query result.
 int GetObjectSubType(int nIndex)
          Get the subtype of the object at the given index.
 int GetObjectType()
          Get the Object Class ID of the type of objects we are currently viewing.
 boolean GetObjectViewIsCollapsed()
          Get whether the object view is collapsed.
 int GetPaginationSize()
          This is the number of objects displayed per page.
 int GetParentFolderID()
          Get the ID of the parent folder of the current folder.
 java.lang.Object[] GetParentFolderIDs()
          Get an Object array containing the Integer IDs of all the parent folders (the path) of the current folder.
 java.lang.String GetPath()
          Get the path to the current folder concatenated with '\'.
 int GetPreviousFolderID()
          This method returns the folder ID that we were previously at.
 Redirect GetRedirectAfterFinish()
          Returns the Redirect object (this is were we need to go at the end of the Editor).
 int GetRoughDisplayedObjectCount(int nClassID)
          This method checks approximately how many objects of the requested classID are displayed on the page.
 boolean GetShowCheckbox()
          Returns whether the folders should have checkboxes next to them.
 boolean GetShowFolderBanner()
          Returns whether the subfolder banner should be shown.
 boolean GetShowPagination()
          Get whether these objects should use pagination or not.
 boolean GetSortable()
          Get whether these objects are sortable or not.
 int GetSortDirection()
          Get the sort direction for the currently sorted header column.
 int GetSortedHeader()
          Get the column id of the header that is currently sorted (starting with 0).
 java.lang.String GetSpaceID()
          Get the SpaceID of the parent Activity Space
 int GetSubFolderCount()
          Get the number of folders at all levels in the hierachy
 int GetSubFolderCount(int nLevel)
          Get the number of sub folders in the current folder at the specified level.
 boolean HasAccessToCreateMenu()
          JF- Helper method to determine if the current user should see the create object menu.
 void Init(AActivitySpace parent)
          This method initializes the model.
 boolean InRootFolder()
          Returns true if the current folder is the root folder.
protected  boolean IsSuppressedClass(int nObjectClassID)
          This method allows us to suppress certain object types.
 void MigrateFolders(int[] nFolderIDs, java.lang.String sComment)
          This method adds folders into the migration queue.
 void MigrateObjects(XPHashtable xpmObjects, java.lang.String sComment)
          This method adds objects into the migration queue.
 void MoveFolders(int nTargetFolderID, int[] nFolders)
          This method moves folders to a new folder.
 boolean MoveNext()
          This method moves to the next object type to display.
 void MoveObjectsBetweenFolders(int nFolderID, java.lang.Object[][] nObjects)
          This method moves objects between folders.
 void OpenSubFolder(int nID)
          Open the folder with the id ID.
 void RaiseError(java.lang.String strError)
           
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetFirstItemIndex(int nFirstItemIndex)
          Set the index of the first folder to display on a page.
 void SetFoldersForDeleteCheck(boolean bFolders)
          This method is used to set whether or not folders will be deleted.
 void SetLastItemIndex(int nLastItemIndex)
          Set the index of the first folder to display on a page.
 void SetObjectsForDeleteCheck(int[] nObjectIDPairs)
          This method is used to set the list of folder IDs (temporary) to be checked for delete.
 void SetObjMgrSettings(int nFolderID, int[] nExpandedObjectTypes)
          This method sets the basic settings on the object manager model.
 void SetPagination(int nPaginationID, int nPaginationLowerBound, int nPaginationUpperBound)
          This is used by the PaginationControl to set which objects should be displayed.
 void SetSelectedObjects(int nClassID, int[] nSelectedObjectIDs)
          This method sets the selected items in a Class ID
 void SetSort(int nSortID, int nSortHeader, int nSortDirection)
          Set the sort to use.
 boolean ShowObjectBanner()
          Get whether to show the banner or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Name of this object

See Also:
Constant Field Values

MAX_NAME_LENGTH

public static final int MAX_NAME_LENGTH
See Also:
Constant Field Values

NUM_SUB_SUB_FOLDERS

public static final int NUM_SUB_SUB_FOLDERS
See Also:
Constant Field Values

MAX_DISPLAYED_USERS

public static final int MAX_DISPLAYED_USERS
See Also:
Constant Field Values

MAX_PRE_EXPANDED_OBJECTS

public static final int MAX_PRE_EXPANDED_OBJECTS
See Also:
Constant Field Values

m_folderViewHelper

public IFolderViewHelper m_folderViewHelper
Stores common class used to display one folder

Constructor Detail

ObjMgrModel

public ObjMgrModel()
Method Detail

GetFirstFolderIndex

public int GetFirstFolderIndex(int[] nFolders)
This method checks the array of folder IDs until it finds a non-community folder.

Parameters:
int[] - nFolders the folder IDs to check
Returns:
int the index of the first non-community folder.

ABODeleteFolders

public void ABODeleteFolders(int[] nFolders)
This method creates a job to delete folders using Asynchronous Browser Operations (ABO).

Parameters:
int[] - the folder IDs to delete

ABODeletePageTemplates

public void ABODeletePageTemplates(XPHashtable xpmSelectedObjects)
Parameters:
XPHashtable - a map of Integer Class IDs to int[] arrays of object IDs.

ABOJobsToDisplay

public boolean ABOJobsToDisplay()
Description copied from interface: IObjMgrModelRO
This method returns whether or not there are any job IDs to display.

Specified by:
ABOJobsToDisplay in interface IObjMgrModelRO
Returns:
boolean true implies there are job ids to display.
See Also:
com.plumtree.portalpages.admin.objmgr.IObjMgrModelRO#ABOJobIDsToDisplay()

CheckAuthSourceForDelete

public boolean CheckAuthSourceForDelete()
Description copied from interface: IObjMgrModelRO
This method checks if any users or groups came from an auth source other than plumtree. This assumes that any objects to check were set on the model earlier in the request (as they will be deleted between requests).

Specified by:
CheckAuthSourceForDelete in interface IObjMgrDeleteRO
Specified by:
CheckAuthSourceForDelete in interface IObjMgrModelRO
Returns:
true implies objects did come from an outside auth source
See Also:
IObjMgrModelRO.CheckAuthSourceForDelete()

CheckPageTemplatesForDelete

public boolean CheckPageTemplatesForDelete()
Description copied from interface: IObjMgrModelRO
This method checks whether or not the user is trying to delete any page templates.

Specified by:
CheckPageTemplatesForDelete in interface IObjMgrDeleteRO
Specified by:
CheckPageTemplatesForDelete in interface IObjMgrModelRO
Returns:
true implies page templates are being deleted
See Also:
IObjMgrModelRO.CheckPageTemplatesForDelete()

CheckFoldersForDelete

public boolean CheckFoldersForDelete()
Description copied from interface: IObjMgrModelRO
This method checks whether or not the user is trying to delete any folders.

Specified by:
CheckFoldersForDelete in interface IObjMgrDeleteRO
Specified by:
CheckFoldersForDelete in interface IObjMgrModelRO
Returns:
true implies folders are being deleted
See Also:
IObjMgrModelRO.CheckFoldersForDelete()

CleanupTempData

public void CleanupTempData()
Description copied from interface: IModel
This method is called at the end of every HTTP request by the Interpreter. The Interpreter calls AActivitySpace.CleanupTempData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for cleaning up temporary data that is only used for the lifetime of a single request, like DB query results.

Specified by:
CleanupTempData in interface IModel
See Also:
IModel.CleanupTempData()

CleanupAllData

public void CleanupAllData()
Description copied from interface: IModel
This method is called when an ActivitySpace is removed from the cache. The Interpreter calls AActivitySpace.CleanupAllData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for releasing data stored in the server when the activity space is no longer needed, such as search objects that need to be maintained as long as the user is clicking through the search, but should be freed when the space can no longer be used. This can be used to prevent Java references to COM memory from hanging around in the long lived Java heap without cleaning up the underlying COM memory. The Java reference will still stay in the long lived heap until it gets garbage collected (which could be a while), but the COM memory should get released here. This method will not be called if an HTTPSession times out. CleanupTempData will be called before CleanupAllData.

Specified by:
CleanupAllData in interface IModel
See Also:
IModel.CleanupAllData()

CopyFolders

public void CopyFolders(int nTargetFolderID,
                        int[] nFolders)
This method copies folders to a new folder.

Parameters:
int - nTargetFolderID the ID of the folder to copy the folders to.
int[] - nFolders an array of folder IDs.

CopyObjectsBetweenFolders

public void CopyObjectsBetweenFolders(int nFolderID,
                                      XPHashtable xpmObjects)
This method copies objects between folders.

Parameters:
int - nFolderID the ID of the folder to copy the objects to.
XPHashtable - a map of Integer Class IDs to int[] arrays of object IDs.

Create

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

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

CreateFolder

public void CreateFolder(java.lang.String name,
                         java.lang.String description)

DeleteFolders

public void DeleteFolders(int[] nFolders)
This method deletes folders.

Parameters:
int[] - the folder IDs to delete

DeleteObjects

public void DeleteObjects(XPHashtable xpmObjects,
                          boolean bABODeleteObjects)
This method deletes objects.

Parameters:
XPHashtable - a map of Integer Class IDs to int[] arrays of object IDs.
boolean - true implies ABO delete has been selected (so page templates will not be deleted through this method).

DoNotShowObject

public boolean DoNotShowObject(int nIndex)
Description copied from interface: IObjectModelRO
Get whether to show this object or not.

Specified by:
DoNotShowObject in interface IObjectModelRO
Returns:
boolean true implies object is hidden, false implies show object
See Also:
IObjectModelRO.DoNotShowObject(int)

EnableObjects

public void EnableObjects(XPHashtable xpmObjects,
                          java.lang.String sComment,
                          boolean bEnable)
This method enables and disables users and web services.


ExpandObjectType

public void ExpandObjectType(int nClassID,
                             boolean bExpand)
This method expands an object type.

Parameters:
int - the class ID to expand
boolean - true implies expand, false implies collapse

GetCurrentlyOpeningObjectType

public int GetCurrentlyOpeningObjectType()
This method returns the object type that is in the process of being expanded, if any.

Returns:
int the class ID that is being expanded, -1 if none are being expanded

Finish

public void Finish()
Description copied from interface: IRepostModel
Implement some code to execute when the user clicks on "Finish".

Specified by:
Finish in interface IRepostModel
See Also:
IRepostModel.Finish()

GetABOJobNames

public java.lang.String[] GetABOJobNames(int[] nABOJobIDs)
Description copied from interface: IObjMgrModelRO
This method returns the job names for the supplied ABO job IDs.

Specified by:
GetABOJobNames in interface IObjMgrModelRO
Returns:
String[] an array of job names for folder deletions.
See Also:
com.plumtree.portalpages.admin.objmgr.IObjMgrModelRO#GetABOJobNames()

GetABOJobIDs

public int[] GetABOJobIDs()
Description copied from interface: IObjMgrModelRO
This method returns the job IDs for the last ABO deletes, and then clears them.

Specified by:
GetABOJobIDs in interface IObjMgrModelRO
Returns:
int[] an array of job IDs for folder deletions.
See Also:
IObjMgrModelRO.GetABOJobIDs()

GetABOJobFolderName

public java.lang.String GetABOJobFolderName()
Description copied from interface: IObjMgrModelRO
This method returns the folder where the ABO jobs were created.

Specified by:
GetABOJobFolderName in interface IObjMgrModelRO
Returns:
String the folder name where the ABO jobs were created.
See Also:
IObjMgrModelRO.GetABOJobFolderName()

GetCommunityID

public int GetCommunityID(int nFolderID)
Description copied from interface: IObjMgrModelRO
This method returns the community object ID associated with the folder.

Specified by:
GetCommunityID in interface IObjMgrModelRO
Returns:
int the ID of the community object, -1 if error
See Also:
com.plumtree.portalpages.admin.objmgr.IObjMgrModelRO#GetCommunityID()

GetCurrentFolderID

public int GetCurrentFolderID()
Description copied from interface: IFolderModelRO
Get the id of the current folder.

Specified by:
GetCurrentFolderID in interface IFolderModelRO
See Also:
IFolderModelRO.GetCurrentFolderID()

GetPreviousFolderID

public int GetPreviousFolderID()
This method returns the folder ID that we were previously at. This is used to return from places like the subportal manager.

Specified by:
GetPreviousFolderID in interface IObjMgrModelRO
Returns:
int the previous folder ID.

GetBreadCrumbPath

public IASQueryResult GetBreadCrumbPath()
Description copied from interface: IObjMgrModelRO
This method returns a 2d query result with folder level, id, and name.

Specified by:
GetBreadCrumbPath in interface IObjMgrModelRO
Returns:
IASQueryResult
See Also:
IObjMgrModelRO.GetBreadCrumbPath()

GetCurrentFolderIsCommunity

public boolean GetCurrentFolderIsCommunity()
Description copied from interface: IObjMgrModelRO
This method returns whether or not the current folder is a community.

Specified by:
GetCurrentFolderIsCommunity in interface IObjMgrModelRO
Returns:
boolean true implies is a community
See Also:
IObjMgrModelRO.GetCurrentFolderIsCommunity()

GetCurrentFolderIsSubportal

public boolean GetCurrentFolderIsSubportal()
Description copied from interface: IObjMgrModelRO
This method returns whether or not the current folder is a subportal.

Specified by:
GetCurrentFolderIsSubportal in interface IObjMgrModelRO
Returns:
boolean true implies is a subportal
See Also:
IObjMgrModelRO.GetCurrentFolderIsSubportal()

GetCurrentFolderLevel

public int GetCurrentFolderLevel()
Description copied from interface: IFolderModelRO
Get the level of the current folder

Specified by:
GetCurrentFolderLevel in interface IFolderModelRO
See Also:
IFolderModelRO.GetCurrentFolderLevel()

GetCurrentFolderName

public java.lang.String GetCurrentFolderName()
Description copied from interface: IFolderModelRO
Get the name of the current folder.

Specified by:
GetCurrentFolderName in interface IFolderModelRO
See Also:
IFolderModelRO.GetCurrentFolderName()

GetCurrentLowerObjectCount

public int GetCurrentLowerObjectCount()
Description copied from interface: IPaginationModelRO
This method returns the current lower count for which objects to display. This number is the 'n' in (Displaying n - m of o)

Specified by:
GetCurrentLowerObjectCount in interface IPaginationModelRO
Returns:
int the current lower count for which objects to display.
See Also:
com.plumtree.portalpages.common.objects.IPaginationModelRO#GetCurrentLowerObjectIndex()

GetCurrentUpperObjectCount

public int GetCurrentUpperObjectCount()
Description copied from interface: IPaginationModelRO
This method returns the current upper count for which objects to display. This number is the 'm' in (Displaying n - m of o)

Specified by:
GetCurrentUpperObjectCount in interface IPaginationModelRO
Returns:
int the current upper count for which objects to display.
See Also:
com.plumtree.portalpages.common.objects.IPaginationModelRO#GetCurrentUpperObjectIndex()

GetDisplayPaginationHiddenInputs

public boolean GetDisplayPaginationHiddenInputs()
Description copied from interface: IObjectModelRO
Get whether or not to display the hidden inputs needed by the PaginationControl. This is only useful if GetShowPagination() returns true.

Specified by:
GetDisplayPaginationHiddenInputs in interface IObjectModelRO
Returns:
boolean true implies display hidden inputs
See Also:
IObjectModelRO.GetDisplayPaginationHiddenInputs()

GetDisplaySortHiddenInputs

public boolean GetDisplaySortHiddenInputs()
Description copied from interface: IObjectModelRO
Get whether or not to display the hidden inputs needed by the SortControl. This is only useful if GetSortable() returns true.

Specified by:
GetDisplaySortHiddenInputs in interface IObjectModelRO
Returns:
boolean true implies display hidden inputs
See Also:
IObjectModelRO.GetDisplaySortHiddenInputs()

GetExpandedObjectTypesArray

public int[] GetExpandedObjectTypesArray()
Description copied from interface: IObjMgrModelRO
This method returns an int array of the currently expanded object types.

Specified by:
GetExpandedObjectTypesArray in interface IObjMgrModelRO
Returns:
int[] the expanded object types.
See Also:
IObjMgrModelRO.GetExpandedObjectTypesArray()

GetExpandedObjectTypesString

public java.lang.String GetExpandedObjectTypesString()
Description copied from interface: IObjMgrModelRO
This method returns the string of currently expanded object types suitable for using in an URL.

Specified by:
GetExpandedObjectTypesString in interface IObjMgrModelRO
Returns:
String the expanded object types.
See Also:
IObjMgrModelRO.GetExpandedObjectTypesString()

GetAreAllObjectsExpanded

public boolean GetAreAllObjectsExpanded()
This method is used to determine whether to display the 'expand all' button or the 'collapse all' button.

Specified by:
GetAreAllObjectsExpanded in interface IObjMgrModelRO
Returns:
boolean true implies all object expanded button has been clicked.

GetFirstFolderIndex

public int GetFirstFolderIndex()
Description copied from interface: IFolderModelRO
Get the index of the first folder to display.

Specified by:
GetFirstFolderIndex in interface IFolderModelRO
See Also:
IFolderModelRO.GetFirstFolderIndex()

GetFolderColumnCount

public int GetFolderColumnCount()
Description copied from interface: IFolderModelRO
Get the number of columns to display.

Specified by:
GetFolderColumnCount in interface IFolderModelRO
See Also:
IFolderModelRO.GetFolderColumnCount()

GetFolderIDFromTree

public int GetFolderIDFromTree()
This method gets the selected folder from the tree sub space.

Returns:
int the folder ID (-1 implies error)

GetFolderObjectCount

public IASQueryResult GetFolderObjectCount()
Description copied from interface: IFolderModelRO
Get a list of object names and the number of those objects in the current folder. The list will have PT_PROPID_CLASSID ("filter 32") and PT_PROPID_OBJECTCOUNT (12).

Specified by:
GetFolderObjectCount in interface IFolderModelRO
See Also:
IFolderModelRO.GetFolderObjectCount()

GetFolderQueryResult

public IASQueryResult GetFolderQueryResult()
Description copied from interface: IFolderModelRO
Get an IPTQueryResult containing all of the subfolders of the current folder.

Specified by:
GetFolderQueryResult in interface IFolderModelRO
See Also:
com.plumtree.portalpages.common.folder.IFolderModelRO#GetFolderData()

GetFolderTreeID

public java.lang.String GetFolderTreeID()
Description copied from interface: IObjMgrModelRO
This method returns the space ID of the folder select tree.

Specified by:
GetFolderTreeID in interface IObjMgrModelRO
Returns:
String the space ID of the folder select tree
See Also:
IObjMgrModelRO.GetFolderTreeID()

GetFolderViewHelper

public IFolderViewHelper GetFolderViewHelper()
Description copied from interface: IFolderModelRO
Retrieves the folder view helper. This contains a method to implement display for one folder. FolderViewHelper is the implementation for general use, but you may need to implement your own helper.

Specified by:
GetFolderViewHelper in interface IFolderModelRO
See Also:
IFolderModelRO.GetFolderViewHelper()

GetHasDisplayedObjects

public boolean GetHasDisplayedObjects(int nClassID)
This method checks whether or not the current page has any objects that will be displayed for the requested classID.

Specified by:
GetHasDisplayedObjects in interface IObjMgrModelRO
Parameters:
int - nClassID the class ID to check for

GetRoughDisplayedObjectCount

public int GetRoughDisplayedObjectCount(int nClassID)
This method checks approximately how many objects of the requested classID are displayed on the page. This number doesn't take security into account, so it can return a higher than actual value.

Parameters:
int - nClassID the class ID to check for

GetHeaderCount

public int GetHeaderCount()
Description copied from interface: IObjectModelRO
Gets the count of the object headers. Returns 0 if the array is null.

Specified by:
GetHeaderCount in interface IObjectModelRO
Returns:
int nHeaderCount
See Also:
IObjectModelRO.GetHeaderCount()

GetHeaderHasCheckbox

public boolean GetHeaderHasCheckbox()
Description copied from interface: IObjectModelRO
Returns whether the header has a checkbox or not.

Specified by:
GetHeaderHasCheckbox in interface IObjectModelRO
Returns:
boolean
See Also:
IObjectModelRO.GetHeaderHasCheckbox()

GetHeaderRow

public HTMLTableRow GetHeaderRow()
Description copied from interface: IObjectModelRO
Returns the header row

Specified by:
GetHeaderRow in interface IObjectModelRO
Returns:
int nHeaderCount
See Also:
IObjectModelRO.GetHeaderRow()

GetHeaderText

public java.lang.String GetHeaderText(int nHeaderIndex)
Description copied from interface: IObjectModelRO
Gets the text of the header at the given index.

Specified by:
GetHeaderText in interface IObjectModelRO
Parameters:
nHeaderIndex - nHeaderIndex
Returns:
String strHeaderText
See Also:
IObjectModelRO.GetHeaderText(int)

GetIsCollapsable

public boolean GetIsCollapsable()
Description copied from interface: IObjectModelRO
Gets whether or not the object banner should be collapsable.

Specified by:
GetIsCollapsable in interface IObjectModelRO
Returns:
boolean true implies collapsible.
See Also:
IObjectModelRO.GetIsCollapsable()

GetIsFolderSelected

public boolean GetIsFolderSelected(int nFolderID)
Description copied from interface: IFolderModelRO
This method returns whether or not the requested folder is currently selected.

Specified by:
GetIsFolderSelected in interface IFolderModelRO
Returns:
boolean true implies selected, false implies not selected
See Also:
IFolderModelRO.GetShowCheckbox()

GetIsObjectSelected

public boolean GetIsObjectSelected(int nObjectID)
Description copied from interface: IObjectModelRO
This method returns whether or not the requested object ID is currently selected.

Specified by:
GetIsObjectSelected in interface IObjectModelRO
Returns:
boolean true implies selected, false implies not selected
See Also:
IObjectModelRO.GetIsObjectSelected(int)

GetLastFolderIndex

public int GetLastFolderIndex()
Description copied from interface: IFolderModelRO
Get the index of the first folder to display.

Specified by:
GetLastFolderIndex in interface IFolderModelRO
See Also:
IFolderModelRO.GetLastFolderIndex()

GetName

public java.lang.String GetName()
Description copied from interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.
See Also:
com.plumtree.xpshared.activityspace.IModel#GetName()

GetNumObjects

public int GetNumObjects()
Description copied from interface: IPaginationModelRO
This method returns the total number of objects available for display. This number is the 'o' in (Displaying n - m of o)

Specified by:
GetNumObjects in interface IPaginationModelRO
Returns:
int the total number of objects available for display.
See Also:
com.plumtree.portalpages.common.objects.IPaginationModelRO#GetNumObjects()

GetPaginationSize

public int GetPaginationSize()
Description copied from interface: IPaginationModelRO
This is the number of objects displayed per page. This name is the value of (m - n)

Specified by:
GetPaginationSize in interface IPaginationModelRO
Returns:
int the total number of objects available for display per page

GetNumSubSubFoldersToDisplay

public int GetNumSubSubFoldersToDisplay()
Description copied from interface: IFolderModelRO
Set the number of sub-subfolders to display after the next page..

Specified by:
GetNumSubSubFoldersToDisplay in interface IFolderModelRO
See Also:
com.plumtree.portalpages.common.folder.IFolderModelRO#GetNumSubSubFolders()

GetObjectBannerTitle

public java.lang.String GetObjectBannerTitle()
Description copied from interface: IObjectModelRO
Gets the name of the current folder.

Specified by:
GetObjectBannerTitle in interface IObjectModelRO
Returns:
String strCurrentFolderName
See Also:
com.plumtree.portalpages.browsing.objects.IObjectModelRO#GetObjectBannerTitle()

GetObjectColumnCount

public int GetObjectColumnCount()
Description copied from interface: IObjectModelRO
Gets the number of columns of objects

Specified by:
GetObjectColumnCount in interface IObjectModelRO
Returns:
int nColumnCount
See Also:
com.plumtree.portalpages.browsing.objects.IObjectModelRO#GetObjectColumnCount()

GetObjectCount

public int GetObjectCount()
Description copied from interface: IObjectModelRO
Gets the count of the objects in the query result.

Specified by:
GetObjectCount in interface IObjectModelRO
Returns:
int nObjectCount
See Also:
IObjectModelRO.GetObjectCount()

GetObjectFields

public java.lang.Object GetObjectFields(int nIndex,
                                        int ptPropID)
Description copied from interface: IObjectModelRO
Gets the fields from the query result.

Specified by:
GetObjectFields in interface IObjectModelRO
Parameters:
nIndex - nIndex
ptPropID - nPropID
Returns:
Object oFields
See Also:
IObjectModelRO.GetObjectFields(int, int)

GetObjectType

public int GetObjectType()
Description copied from interface: IObjectModelRO
Get the Object Class ID of the type of objects we are currently viewing.

Specified by:
GetObjectType in interface IObjectModelRO
Returns:
int the class ID of the object
See Also:
IObjectModelRO.GetObjectType()

GetObjectSubType

public int GetObjectSubType(int nIndex)
Description copied from interface: IObjectModelRO
Get the subtype of the object at the given index.

Specified by:
GetObjectSubType in interface IObjectModelRO
Parameters:
nIndex - index of the object in the list.
Returns:
the subtype of the object, or -1 if the object has no subtype.
See Also:
com.plumtree.portalpages.common.objects.IObjectModelRO#GetObjectSubType()

GetObjectViewIsCollapsed

public boolean GetObjectViewIsCollapsed()
Description copied from interface: IObjectModelRO
Get whether the object view is collapsed. This is only relevant if GetIsCollapsable() returns true.

Specified by:
GetObjectViewIsCollapsed in interface IObjectModelRO
Returns:
bObjectViewIsCollapsed
See Also:
IObjectModelRO.GetObjectViewIsCollapsed()

GetParentFolderID

public int GetParentFolderID()
Description copied from interface: IFolderModelRO
Get the ID of the parent folder of the current folder.

Specified by:
GetParentFolderID in interface IFolderModelRO
See Also:
IFolderModelRO.GetParentFolderID()

GetParentFolderIDs

public java.lang.Object[] GetParentFolderIDs()
Description copied from interface: IFolderModelRO
Get an Object array containing the Integer IDs of all the parent folders (the path) of the current folder. Each element in the array must be cast to an Integer. This will return one ID per folder in the path, except for the root folder, where two IDs will be returned even though there is only one folder in the path.

Specified by:
GetParentFolderIDs in interface IFolderModelRO
See Also:
IFolderModelRO.GetParentFolderIDs()

GetPath

public java.lang.String GetPath()
Description copied from interface: IFolderModelRO
Get the path to the current folder concatenated with '\'.

Specified by:
GetPath in interface IFolderModelRO
See Also:
IFolderModelRO.GetPath()

GetRedirectAfterFinish

public Redirect GetRedirectAfterFinish()
Description copied from interface: IRepostModel
Returns the Redirect object (this is were we need to go at the end of the Editor).

Specified by:
GetRedirectAfterFinish in interface IRepostModel
Returns:
Redirect
See Also:
IRepostModel.GetRedirectAfterFinish()

GetShowCheckbox

public boolean GetShowCheckbox()
Description copied from interface: IFolderModelRO
Returns whether the folders should have checkboxes next to them.

Specified by:
GetShowCheckbox in interface IFolderModelRO
See Also:
IFolderModelRO.GetShowCheckbox()

GetShowFolderBanner

public boolean GetShowFolderBanner()
Description copied from interface: IFolderModelRO
Returns whether the subfolder banner should be shown.

Specified by:
GetShowFolderBanner in interface IFolderModelRO
See Also:
com.plumtree.portalpages.common.folder.IFolderModelRO#GetShowBanner()

GetShowPagination

public boolean GetShowPagination()
Description copied from interface: IObjectModelRO
Get whether these objects should use pagination or not. If this is true, the header will have a pagination bar. If this is true, the AActivitySpace will need to include the pagination framework (pass-thru repost control & implement pagination model interface).

Specified by:
GetShowPagination in interface IObjectModelRO
Returns:
boolean true implies show pagination bar
See Also:
IObjectModelRO.GetShowPagination()

GetSortDirection

public int GetSortDirection()
Description copied from interface: ISortModelRO
Get the sort direction for the currently sorted header column. This should return either PTSortedArrayWrapper.PTSAW_SORT_ASCENDING or PTSortedArrayWrapper.PTSAW_SORT_DESCENDING. This method only needs to return useful information if GetSortable() returns true.

Specified by:
GetSortDirection in interface ISortModelRO
Returns:
int the sort direction from PTSortedArrayWrapper.
See Also:
com.plumtree.portalpages.common.objects.ISortModelRO#GetSortDirection()

GetSortable

public boolean GetSortable()
Description copied from interface: IObjectModelRO
Get whether these objects are sortable or not. If this is true, the headers will be sortable. If this is true, the AActivitySpace will need to include the sortable framework (pass-thru repost control & implement sortable model interface).

Specified by:
GetSortable in interface IObjectModelRO
Returns:
boolean true implies sortable
See Also:
IObjectModelRO.GetSortable()

GetSortedHeader

public int GetSortedHeader()
Description copied from interface: ISortModelRO
Get the column id of the header that is currently sorted (starting with 0). This method only needs to return useful information if GetSortable() returns true.

Specified by:
GetSortedHeader in interface ISortModelRO
Returns:
int the column id of the currently sorted header column.
See Also:
com.plumtree.portalpages.common.objects.ISortModelRO#GetSortedHeader()

GetSpaceID

public java.lang.String GetSpaceID()
Get the SpaceID of the parent Activity Space

Specified by:
GetSpaceID in interface IObjectModelRO
Returns:
int m_asOwner.GetSpaceID();

GetSubFolderCount

public int GetSubFolderCount(int nLevel)
Description copied from interface: IFolderModelRO
Get the number of sub folders in the current folder at the specified level.

Specified by:
GetSubFolderCount in interface IFolderModelRO
See Also:
Get all subfolders in query at the appropriate level and above.

GetSubFolderCount

public int GetSubFolderCount()
Description copied from interface: IFolderModelRO
Get the number of folders at all levels in the hierachy

Specified by:
GetSubFolderCount in interface IFolderModelRO
See Also:
Get the number of folders at all levels in the current query

HasAccessToCreateMenu

public boolean HasAccessToCreateMenu()
JF- Helper method to determine if the current user should see the create object menu. (He should see it only if he has at least edit rights to the current admin folder.)

Specified by:
HasAccessToCreateMenu in interface IObjMgrModelRO
Returns:
boolean
See Also:
HasAccessToCreateMenu()

InRootFolder

public boolean InRootFolder()
Description copied from interface: IFolderModelRO
Returns true if the current folder is the root folder.

Specified by:
InRootFolder in interface IFolderModelRO
See Also:
IFolderModelRO.InRootFolder()

Init

public void Init(AActivitySpace parent)
Description copied from interface: IModel
This method initializes the model. This is called automatically when AActivitySpace.RegisterModel() is called.

Specified by:
Init in interface IModel
Parameters:
parent - the parent Activity Space
See Also:
com.plumtree.xpshared.activityspace.IModel#Init()

MigrateFolders

public void MigrateFolders(int[] nFolderIDs,
                           java.lang.String sComment)
This method adds folders into the migration queue.


MigrateObjects

public void MigrateObjects(XPHashtable xpmObjects,
                           java.lang.String sComment)
This method adds objects into the migration queue.


MoveFolders

public void MoveFolders(int nTargetFolderID,
                        int[] nFolders)
This method moves folders to a new folder.

Parameters:
int - nTargetFolderID the ID of the folder to move the folders to.
int[] - nFolders an array of folder IDs.

MoveNext

public boolean MoveNext()
This method moves to the next object type to display. This can only be called until it returns false, and then can't be called until the next request.

Returns:
boolean true implies success, false implies failure, no more object types to display

MoveObjectsBetweenFolders

public void MoveObjectsBetweenFolders(int nFolderID,
                                      java.lang.Object[][] nObjects)
This method moves objects between folders.

Parameters:
int - nFolderID the ID of the folder to move the objects to.
Object[][] - nObjects an (2 x n) array of class IDs / Object IDs

OpenSubFolder

public void OpenSubFolder(int nID)
Description copied from interface: IFolderModel
Open the folder with the id ID. This method should change the model to contain data for the new folder.

Specified by:
OpenSubFolder in interface IFolderModel
See Also:
This is just here to satisfy the interface. It should not get used because the obj mgr space does not use the opensubfoldercontrol.

RaiseError

public void RaiseError(java.lang.String strError)
Parameters:
strError -

SavePage

public int SavePage(java.lang.String _sPageName,
                    XPHashtable _htFormData)
Description copied from interface: IRepostModel
Calls the right save function according to the page name passed in argument.

Specified by:
SavePage in interface IRepostModel
Returns:
int Page status for server side validation
See Also:
IRepostModel.SavePage(String, XPHashtable)

SetFirstItemIndex

public void SetFirstItemIndex(int nFirstItemIndex)
Description copied from interface: IFolderModel
Set the index of the first folder to display on a page.

Specified by:
SetFirstItemIndex in interface IFolderModel
See Also:
IFolderModel.SetFirstItemIndex(int)

SetFoldersForDeleteCheck

public void SetFoldersForDeleteCheck(boolean bFolders)
This method is used to set whether or not folders will be deleted.

Specified by:
SetFoldersForDeleteCheck in interface IObjMgrDeleteRO
Parameters:
boolean - true implies folders will be deleted.

SetLastItemIndex

public void SetLastItemIndex(int nLastItemIndex)
Description copied from interface: IFolderModel
Set the index of the first folder to display on a page.

Specified by:
SetLastItemIndex in interface IFolderModel
See Also:
IFolderModel.SetLastItemIndex(int)

SetObjMgrSettings

public void SetObjMgrSettings(int nFolderID,
                              int[] nExpandedObjectTypes)
This method sets the basic settings on the object manager model.

Parameters:
int - the current folder ID
int[] - the list of expanded object types

ExpandAllObjects

public void ExpandAllObjects(boolean bExpand)
This method is used to expand and collapse all objects in an admin folder.

Parameters:
boolean - true implies expand all objects

SetObjectsForDeleteCheck

public void SetObjectsForDeleteCheck(int[] nObjectIDPairs)
This method is used to set the list of folder IDs (temporary) to be checked for delete.

Specified by:
SetObjectsForDeleteCheck in interface IObjMgrDeleteRO
Parameters:
int[] - of object class id / object id pairs.

SetPagination

public void SetPagination(int nPaginationID,
                          int nPaginationLowerBound,
                          int nPaginationUpperBound)
Description copied from interface: IPaginationModel
This is used by the PaginationControl to set which objects should be displayed.

Specified by:
SetPagination in interface IPaginationModel
Parameters:
nPaginationID - Unique ID of objects to paginate (usually class id) when there are multiple pagination sections per page.
nPaginationLowerBound - The starting count for objects to display
nPaginationUpperBound - The ending count for objects to display.
See Also:
com.plumtree.uiinfrastructure.form.pagination

SetSelectedObjects

public void SetSelectedObjects(int nClassID,
                               int[] nSelectedObjectIDs)
This method sets the selected items in a Class ID

Parameters:
int - nClassID the class ID of the selected items
int[] - nSelectedObjectIDs the selected object IDs

ClearAllSelectedObjects

public void ClearAllSelectedObjects()
This method clears all of the selected items. This should be called after a command has been completed (move, copy, etc...).


SetSort

public void SetSort(int nSortID,
                    int nSortHeader,
                    int nSortDirection)
Description copied from interface: ISortModel
Set the sort to use.

Specified by:
SetSort in interface ISortModel
Parameters:
nSortID - the ID of the objects to sort on.
nSortHeader - the index of the header to sort (starting with 0).
nSortDirection - PTSortedArrayWrapper.PTSAW_SORT_ASCENDING or PTSortedArrayWrapper.PTSAW_SORT_DESCENDING.
See Also:
com.plumtree.portalpages.common.objects.ISortModel#SetSort(int, int, int)

ShowObjectBanner

public boolean ShowObjectBanner()
Description copied from interface: IObjectModelRO
Get whether to show the banner or not.

Specified by:
ShowObjectBanner in interface IObjectModelRO
Returns:
boolean true implies show banner
See Also:
IObjectModelRO.ShowObjectBanner()

GetLocalizedErrorString

public static java.lang.String GetLocalizedErrorString(java.lang.Throwable e,
                                                       AActivitySpace m_asOwner)
TODO: Move this to a central location This method is used to get a localized version of a server exception. It only works for PTExceptions, but it will return null for all other Exceptions.

Parameters:
Throwable - e
Returns:
String the localized String, null if couldn't get the message

GetLocalizedErrorString

public static java.lang.String GetLocalizedErrorString(int nErrorCode,
                                                       AActivitySpace m_asOwner)
TODO: Move this to a central location This method is used to get a localized version of a server error code. This works for error codes from PTExceptions as well as error codes from result values.

Parameters:
int - nErrorCode the error code to translate
Returns:
String the localized String, null if couldn't get the message

CheckIsCommunityFolder

protected boolean CheckIsCommunityFolder(int nFolderID)
Parameters:
nFolderID -
Returns:

ExpandAllClasses

protected void ExpandAllClasses()
This method is used to set the expanded object types index and string to include all currently visible classes.


IsSuppressedClass

protected boolean IsSuppressedClass(int nObjectClassID)
This method allows us to suppress certain object types.

Parameters:
int - nObjectClassID
Returns:
true implies the class is suppressed.



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