com.plumtree.portalpages.common.objectapproval
Class ObjectApprovalModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.uiinfrastructure.approval.AApprovalModel
          extended by com.plumtree.portalpages.common.objectapproval.ObjectApprovalModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject, IApprovalModelRO, IEditorModelRO, IRepostModel

public class ObjectApprovalModel
extends AApprovalModel

Author:
Ben Geislinger

Field Summary
static java.lang.String STR_MVC_CLASS_NAME
          Logging
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
isReadAccessAvailable, m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bEnableCancelButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
ObjectApprovalModel()
           
 
Method Summary
 void ActionOnRepost()
          Modifies the object name on repost.
 boolean AddColumnsHeaderForEachItem()
           
 boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
          Implements some actions to perform on start.
 void ClearCache()
           
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 boolean DisplayDescriptionImmediatelyUnderTitle()
           
 boolean DisplayItemTypeHeaderAboveActionbar()
           
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 boolean GetAllowClearingOfApprovalRequests()
           
 boolean GetAllowClearingOfItem(AItemDescriptor item)
           
 ApprovalItemType GetDefaultItemType()
          Call this method to determine the default ApprovalItemType displayed by the view.
static ApprovalItemType GetDefaultItemTypeStatic()
           
 boolean GetDisableRadioSelection()
           
 boolean GetDisplayHeadersForItemTypesWithNoItems()
           
 boolean GetDisplayInstances(ApprovalItemType type)
          Concrete subclasses must implement this method to return a boolean value indicating whether instance information is displayed for the specified type.
 boolean GetDisplaySelectAllButton()
           
 boolean GetDisplayStatusColumn()
           
 boolean GetDisplayTypeHeader(ApprovalItemType type)
          Concrete subclasses must implement this method to return a boolean indicating whether or not a header banner should be displayed for the specified type.
 java.lang.String GetEmptyTypeSectionSubTitle(ApprovalItemType type)
          Concrete subclasses must implement this method to return a string that is displayed in sections containg no items awaiting approval.
 java.lang.String GetMenuOptionText(ApprovalItemType type)
           
 java.lang.String GetName()
          Concrete subclasses must implement this method to return the name of the model.
 java.lang.String GetStatusPageMenuOptionText(ApprovalItemType type)
           
 java.lang.String GetSubTitle()
          Concrete subclasses must implement this method to return the subtitle.
 XPArrayList GetSupportedItemTypes()
          Concrete subclasses must implement this method to return an XPArrayList of those ItemTypes that are supporeted by the model.
 java.lang.String GetTitle()
          Concrete subclasses must implement this method to return the title.
 XPArrayList InternalGetItemDescriptors(ApprovalItemType type, int iLow, int iHigh)
          Concrete subclasses must implement this method to return an XPArrayList of AItemDescriptor objects.
 int InternalGetTypeCount(ApprovalItemType type)
          Concrete subclasses must implement this method to return the count of specified ApprovalItemType.
 boolean IsDateSortable()
           
 boolean IsDescriptionEditable()
           
 boolean IsNameSortable()
           
 boolean IsSubmittedBySortable()
           
 boolean IsTitleEditable()
           
protected  void SaveMainPage(XPHashtable _htFormData)
          Saves the data on the Main page.
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetDisplaySelectAllButton(boolean b)
           
 void SetDisplayStatusForRequestor(boolean b)
           
 
Methods inherited from class com.plumtree.uiinfrastructure.approval.AApprovalModel
CleanupTempData, ClearCache, DisplayItemComment, DisplayViewItems, DoSortDate, DoSortName, DoSortSubmittedBy, GetAddComment, GetAllCachedItems, GetCurrentPageIndex, GetCurrentType, GetHighItemIndexForCurrentPage, GetHighItemIndexForGivenPage, GetItemDescriptor, GetItemDescriptors, GetItemID, GetLowItemIndexForCurrentPage, GetLowItemIndexForGivenPage, GetNoItemsDescription, GetNumPagesAvailable, GetPageSize, GetTypeCount, GotoPage, IsNextPageAvailable, IsPageAvailable, IsPreviousPageAvailable, NextPage, PreviousPage, SetAddComment, SetCurrentPageIndex, SetCurrentType, SetDoSortDate, SetDoSortName, SetDoSortSubmittedBy, SetItemID, SetNoItemsDescription, SetPageHighIndex, SetPageLowIndex
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, CleanupAllData, DoTaskAfterStore, DoTaskBeforeStore, DoTaskOnChangePage, DoTaskOnComeBackFromSubEditor, DoTaskOnStartEditor, GetAccessToEditorPriviledges, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly, GetRedirectAfterFinish, GetUserHasAccessToEditor, Init, SetCloseOnDone, SetDeleteOnCancel, SetEditorType, SetEnableApplyButton, SetHideLeftNav, SetPageStatus, SetUserHasAccessToEditor
 
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.activityspace.IModel
CleanupAllData, Init
 
Methods inherited from interface com.plumtree.uiinfrastructure.editor.IEditorModelRO
GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Logging

See Also:
Constant Field Values
Constructor Detail

ObjectApprovalModel

public ObjectApprovalModel()
Method Detail

ActionOnRepost

public void ActionOnRepost()
Modifies the object name on repost.


AddColumnsHeaderForEachItem

public boolean AddColumnsHeaderForEachItem()
Specified by:
AddColumnsHeaderForEachItem in interface IApprovalModelRO
Specified by:
AddColumnsHeaderForEachItem in class AApprovalModel
Returns:

CheckEditorAccessAndStart

public boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
Implements some actions to perform on start.

Specified by:
CheckEditorAccessAndStart in class EditorModel
Parameters:
_htFormData -
Returns:
boolean Is true if the current user has the rights to access this Editor.

ClearCache

public void ClearCache()
Overrides:
ClearCache in class AApprovalModel

Create

public java.lang.Object Create()
Description copied from class: EditorModel
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 EditorModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

DisplayDescriptionImmediatelyUnderTitle

public boolean DisplayDescriptionImmediatelyUnderTitle()
Specified by:
DisplayDescriptionImmediatelyUnderTitle in interface IApprovalModelRO
Specified by:
DisplayDescriptionImmediatelyUnderTitle in class AApprovalModel
Returns:

Finish

public void Finish()
Implement some code to execute when the user clicks on "Finish".

Specified by:
Finish in interface IRepostModel
Specified by:
Finish in class EditorModel

GetAllowClearingOfApprovalRequests

public boolean GetAllowClearingOfApprovalRequests()
Specified by:
GetAllowClearingOfApprovalRequests in interface IApprovalModelRO
Specified by:
GetAllowClearingOfApprovalRequests in class AApprovalModel
Returns:

GetAllowClearingOfItem

public boolean GetAllowClearingOfItem(AItemDescriptor item)
Specified by:
GetAllowClearingOfItem in interface IApprovalModelRO
Specified by:
GetAllowClearingOfItem in class AApprovalModel
Parameters:
item -
Returns:

GetDefaultItemType

public ApprovalItemType GetDefaultItemType()
Description copied from class: AApprovalModel
Call this method to determine the default ApprovalItemType displayed by the view.

Specified by:
GetDefaultItemType in interface IApprovalModelRO
Specified by:
GetDefaultItemType in class AApprovalModel
Returns:

GetDefaultItemTypeStatic

public static ApprovalItemType GetDefaultItemTypeStatic()
Returns:

GetDisableRadioSelection

public boolean GetDisableRadioSelection()
Specified by:
GetDisableRadioSelection in interface IApprovalModelRO
Specified by:
GetDisableRadioSelection in class AApprovalModel
Returns:

GetDisplayHeadersForItemTypesWithNoItems

public boolean GetDisplayHeadersForItemTypesWithNoItems()
Specified by:
GetDisplayHeadersForItemTypesWithNoItems in interface IApprovalModelRO
Specified by:
GetDisplayHeadersForItemTypesWithNoItems in class AApprovalModel
Returns:

GetDisplayInstances

public boolean GetDisplayInstances(ApprovalItemType type)
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return a boolean value indicating whether instance information is displayed for the specified type.

The DocumentApprovalModel class for example, returns true. This is because each document, being an item, consists of one or more copies existing in various portal folders, or INSTANCES. The ObjectApprovalModel, however, return false for this method.

Specified by:
GetDisplayInstances in interface IApprovalModelRO
Specified by:
GetDisplayInstances in class AApprovalModel
Parameters:
type -
Returns:

GetDisplayStatusColumn

public boolean GetDisplayStatusColumn()
Specified by:
GetDisplayStatusColumn in interface IApprovalModelRO
Specified by:
GetDisplayStatusColumn in class AApprovalModel
Returns:

GetDisplaySelectAllButton

public boolean GetDisplaySelectAllButton()
Specified by:
GetDisplaySelectAllButton in interface IApprovalModelRO
Specified by:
GetDisplaySelectAllButton in class AApprovalModel
Returns:

SetDisplaySelectAllButton

public void SetDisplaySelectAllButton(boolean b)

GetDisplayTypeHeader

public boolean GetDisplayTypeHeader(ApprovalItemType type)
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return a boolean indicating whether or not a header banner should be displayed for the specified type.

Specified by:
GetDisplayTypeHeader in interface IApprovalModelRO
Specified by:
GetDisplayTypeHeader in class AApprovalModel
Parameters:
type -
Returns:

DisplayItemTypeHeaderAboveActionbar

public boolean DisplayItemTypeHeaderAboveActionbar()
Specified by:
DisplayItemTypeHeaderAboveActionbar in interface IApprovalModelRO
Specified by:
DisplayItemTypeHeaderAboveActionbar in class AApprovalModel

GetEmptyTypeSectionSubTitle

public java.lang.String GetEmptyTypeSectionSubTitle(ApprovalItemType type)
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return a string that is displayed in sections containg no items awaiting approval.

Specified by:
GetEmptyTypeSectionSubTitle in interface IApprovalModelRO
Specified by:
GetEmptyTypeSectionSubTitle in class AApprovalModel
Parameters:
type -
Returns:

GetMenuOptionText

public java.lang.String GetMenuOptionText(ApprovalItemType type)
Parameters:
type -
Returns:

GetStatusPageMenuOptionText

public java.lang.String GetStatusPageMenuOptionText(ApprovalItemType type)
Parameters:
type -
Returns:

GetName

public java.lang.String GetName()
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return the name of the model.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class AApprovalModel
Returns:

GetSubTitle

public java.lang.String GetSubTitle()
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return the subtitle. This string is displayed in a banner at the top of the view.

Specified by:
GetSubTitle in interface IApprovalModelRO
Specified by:
GetSubTitle in class AApprovalModel
Returns:

GetSupportedItemTypes

public XPArrayList GetSupportedItemTypes()
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return an XPArrayList of those ItemTypes that are supporeted by the model.

Specified by:
GetSupportedItemTypes in interface IApprovalModelRO
Specified by:
GetSupportedItemTypes in class AApprovalModel
Returns:

GetTitle

public java.lang.String GetTitle()
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return the title. This string is displayed in a banner at the top of the view.

Specified by:
GetTitle in interface IApprovalModelRO
Specified by:
GetTitle in class AApprovalModel
Returns:

InternalGetItemDescriptors

public XPArrayList InternalGetItemDescriptors(ApprovalItemType type,
                                              int iLow,
                                              int iHigh)
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return an XPArrayList of AItemDescriptor objects.

Specified by:
InternalGetItemDescriptors in class AApprovalModel
Parameters:
type -
iLow -
iHigh -
Returns:

InternalGetTypeCount

public int InternalGetTypeCount(ApprovalItemType type)
Description copied from class: AApprovalModel
Concrete subclasses must implement this method to return the count of specified ApprovalItemType. This is the total number of object of the specified type, visible to the current user, awaiting approval.

Specified by:
InternalGetTypeCount in class AApprovalModel
Parameters:
type -
Returns:

IsDateSortable

public boolean IsDateSortable()
Specified by:
IsDateSortable in interface IApprovalModelRO
Specified by:
IsDateSortable in class AApprovalModel
Returns:

IsDescriptionEditable

public boolean IsDescriptionEditable()
Specified by:
IsDescriptionEditable in interface IApprovalModelRO
Specified by:
IsDescriptionEditable in class AApprovalModel
Returns:

IsNameSortable

public boolean IsNameSortable()
Specified by:
IsNameSortable in interface IApprovalModelRO
Specified by:
IsNameSortable in class AApprovalModel
Returns:

IsSubmittedBySortable

public boolean IsSubmittedBySortable()
Specified by:
IsSubmittedBySortable in interface IApprovalModelRO
Specified by:
IsSubmittedBySortable in class AApprovalModel
Returns:

IsTitleEditable

public boolean IsTitleEditable()
Specified by:
IsTitleEditable in interface IApprovalModelRO
Specified by:
IsTitleEditable in class AApprovalModel
Returns:

SavePage

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

Specified by:
SavePage in interface IRepostModel
Specified by:
SavePage in class EditorModel
Parameters:
_sPageName -
_htFormData -
Returns:
int Page status for server side validation

SetDisplayStatusForRequestor

public void SetDisplayStatusForRequestor(boolean b)
Parameters:
b -

SaveMainPage

protected void SaveMainPage(XPHashtable _htFormData)
Saves the data on the Main page.

Parameters:
_htFormData -



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