com.plumtree.portalpages.browsing.editors.community
Class CommunityEditorModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
          extended by com.plumtree.portalpages.browsing.editors.community.CommunityEditorModel
All Implemented Interfaces:
ICommunityEditorModelRO, IHeaderAndFooterModel, IPortletPreferencesModelRO, IDescriptionModelRO, IMigrationModelRO, IObjEditorModelRO, IFolderSecurityABOModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class CommunityEditorModel
extends ObjEditorModel
implements ICommunityEditorModelRO, IPortletPreferencesModelRO, IHeaderAndFooterModel, IFolderSecurityABOModelRO

Author:
michaeld

Field Summary
static int COMMUNITYEDITOR_GADGETTITLEBARS_PREFFALSE
           
static int COMMUNITYEDITOR_GADGETTITLEBARS_PREFTRUE
           
static int COMMUNITYEDITOR_GADGETTITLEBARS_SERVERFALSE
           
static int LIST_KEY_FOOTER
          List Key: Footer
static int LIST_KEY_HEADER
          List Key: Header
static java.lang.String STR_MVC_CLASS_NAME
          Object Name
 
Fields inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
EDITOR_CLASSID_UNKNOWN, EDITOR_FOLDERID_UNKNOWN, EDITOR_OBJECTID_UNKNOWN, EDITOR_QS_BOL_QS_FORCESAVEINFOLDER, EDITOR_QS_INT_CLASS_ID, EDITOR_QS_INT_QS_FOLDER_ID, EDITOR_QS_INT_QS_OBJECT_ID, m_bDisableDescription, m_bDisableSecurity, m_bForceSavedInSuppliedFolder, m_bIsSysAdmin, m_nClassID, m_nFolderID, m_nFolderType, m_nObjectID, m_ptObject, m_Session, m_sFolderName, OBJECT_NAME_TRUNCATE
 
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
CommunityEditorModel()
           
 
Method Summary
 boolean ABOJobIDToDisplay()
          This method returns whether or not there is a job ID to display.
 void ApplySecurityChangesUsingABO(boolean bPropagateAllACLs)
          Apply the subportal profile to the users in the folder later, using ABO.
 void Cancel()
          If editor was canceled, remove the temp stored community object & folder.
 void CommunityTempStore()
          Temporarily store the community object and folder into the unclassified folder.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeleteCommGroupsObjects(int[] arnObjToDelete)
           
 void DeleteCommPortletObjects(int[] arnObjToDelete)
           
 void DeleteCommSubcomms(int[] arnObjToDelete)
           
 boolean DisplayTitleBarColumn()
           
 void DoTaskAfterStore()
          Code executed after the object is stored.
 void DoTaskBeforeStore()
          Initializes IPTProperty with the property type member variable just before we store the object in the DB.
 void DoTaskOnChangePage(java.lang.String _sNewSpaceName, java.lang.String _sNewPageName)
          This method can be implemented by classes extending this one.
 void DoTaskOnComeBackFromSubEditor()
          This method will be called when you come back to the main Editor from a sub Editor.
 void DoTaskOnStartEditor(XPHashtable _htFormData)
          Initializes the property type member variable with the one from IPTProperty in Edit mode and the default value in create mode.
 void Finish()
          That method is called by the EditorFinishControl.
 void FlipTitleBar(XPHashtable _htFormData)
          Flip the title bar check box.
 int GetABOJobID()
          This method returns the job ID for a security change job.
 int GetCommunityFolderID()
          Returns the community folder id.
 int GetCommunityID()
           
 java.lang.String GetCreatedJobName()
          Retrieves the name of the job created by ABO.
 IPTAccessList GetCurrentFolderACL()
           
 java.lang.String GetData(java.lang.String name)
           
 java.lang.String GetFolderNameForCreatedJobs()
          Retrieves the name of the folder that ABO created the job in.
 boolean GetFooterHasCommunityPrefs()
           
 int GetFooterID()
           
 java.lang.String GetFooterName()
           
 boolean GetHeaderHasCommunityPrefs()
           
 int GetHeaderID()
           
 java.lang.String GetHeaderName()
           
 java.lang.String GetName()
          Returns the Class name.
 java.lang.String GetNoTitleBarPref()
          Turn m_mapPortletsWithNoTitleBars into a pref that we can store.
 int GetPageCount()
           
 int GetPageID(int nPageIndex)
           
 PageData GetPageModelAt(int nPageIndex)
          Get the page model at the given index.
 java.lang.String GetPageName(int nPageIndex)
           
 PTSortedArrayWrapper GetPortletPreferencesList(int iPageID)
           
 Redirect GetRedirectAfterFinish()
          If this is a subcommunity editor and hence a popup, close it when editor is done.
 boolean IsAdminModifiedOnFolder(IPTAccessList _ptOldACL)
           
 boolean IsCommunityEditor()
          If this is the community editor, then we link to the community prefs page; if it's a community page but we're not in the community editor, then we link to the user-gadget-community prefs page.
 boolean IsSiteMapDisabled()
          Is Site Map Disabled
 boolean IsTemplateSelector()
          Check to see if the force subportal header/banner checkbox should be enabled.
 void RefreshItemFromFooterTree(XPHashtable _htFormData)
          This method gets the selected items from the tree.
 void RefreshItemFromHeaderTree(XPHashtable _htFormData)
          Get the header and footer selected from the tree.
 void ReversePortletPrefsSort(XPHashtable _htFormData)
          Reverses the sort order of one of the pages of gadget prefs.
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
protected  void SavePortletPrefsPage(XPHashtable _htFormData)
          Saves the data on the gadget prefs page.
 void SetDefaultHeaderOrFooter(boolean bHeader)
          Is this one used??
 void SetupHeaderAndFooter(int nCommTempHeaderID, int nCommTempFooterID)
          Helper method to start the Selected Header or Footer List.
 void SetUseForceSubPortal(boolean bForce)
          Does nothing in the community editor.
 void StartCommGroupSelectPTObject()
          Helper method to start the Select PTObject List.
 void StartCommPortletSelectPTObject()
          Helper method to start the Select PTObject List.
 void StartSubCommunitySelectPTObject()
          Helper method to start the Select PTObject List.
 boolean UsingFooterFromCommunityTemplate()
          Returns true if the footer was set in the community template.
 boolean UsingHeaderFromCommunityTemplate()
          Returns true if the header was set in the community template.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccess, CheckEditorAccessAndStart, CheckFolderType, DisableSecurity, ForceSaveInFolder, GetClassID, GetFolderID, GetFolderName, GetIsSysAdmin, GetMigrationStatus, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession, Init, InitIsSysAdminFlag, InitPTObject, IsDescriptionDisabled, IsMigrationApproved, SaveMigrationStatus, SetDisableDescription, SetEditorToReadOnly, SetMemberVariablesFromQS, SetMigrationStatus, StartKeywords, StartLocNamesList, StartMigrationHistory, StartObjectProp, StartSecurityList, StoreObject
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
CleanupAllData, CleanupTempData, GetAccessToEditorPriviledges, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly, GetUserHasAccessToEditor, 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.portaluiinfrastructure.editor.IObjEditorModelRO
GetClassID, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Object Name

See Also:
Constant Field Values

LIST_KEY_HEADER

public static final int LIST_KEY_HEADER
List Key: Header

See Also:
Constant Field Values

LIST_KEY_FOOTER

public static final int LIST_KEY_FOOTER
List Key: Footer

See Also:
Constant Field Values

COMMUNITYEDITOR_GADGETTITLEBARS_SERVERFALSE

public static final int COMMUNITYEDITOR_GADGETTITLEBARS_SERVERFALSE
See Also:
Constant Field Values

COMMUNITYEDITOR_GADGETTITLEBARS_PREFFALSE

public static final int COMMUNITYEDITOR_GADGETTITLEBARS_PREFFALSE
See Also:
Constant Field Values

COMMUNITYEDITOR_GADGETTITLEBARS_PREFTRUE

public static final int COMMUNITYEDITOR_GADGETTITLEBARS_PREFTRUE
See Also:
Constant Field Values
Constructor Detail

CommunityEditorModel

public CommunityEditorModel()
Method Detail

Cancel

public void Cancel()
If editor was canceled, remove the temp stored community object & folder.

Overrides:
Cancel in class EditorModel
See Also:
EditorModel.Cancel()

CommunityTempStore

public void CommunityTempStore()
Temporarily store the community object and folder into the unclassified folder. Should only be called after a community template and page has been added to the community.


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()

DeleteCommGroupsObjects

public void DeleteCommGroupsObjects(int[] arnObjToDelete)
Parameters:
arnObjToDelete -

DeleteCommPortletObjects

public void DeleteCommPortletObjects(int[] arnObjToDelete)
Parameters:
arnObjToDelete -

DeleteCommSubcomms

public void DeleteCommSubcomms(int[] arnObjToDelete)
Parameters:
arnObjToDelete -

DisplayTitleBarColumn

public boolean DisplayTitleBarColumn()
Specified by:
DisplayTitleBarColumn in interface IPortletPreferencesModelRO
Returns:
See Also:
IPortletPreferencesModelRO.DisplayTitleBarColumn()

DoTaskAfterStore

public void DoTaskAfterStore()
Code executed after the object is stored.

Overrides:
DoTaskAfterStore in class EditorModel

DoTaskBeforeStore

public void DoTaskBeforeStore()
Initializes IPTProperty with the property type member variable just before we store the object in the DB. Also sets 2 other values to default.

Overrides:
DoTaskBeforeStore in class EditorModel
Throws:
XPException

Finish

public void Finish()
Description copied from class: ObjEditorModel
That method is called by the EditorFinishControl. It takes care of storing the IPTObject in the DB when the user finishes the Editor.

Specified by:
Finish in interface IRepostModel
Overrides:
Finish in class ObjEditorModel

DoTaskOnChangePage

public void DoTaskOnChangePage(java.lang.String _sNewSpaceName,
                               java.lang.String _sNewPageName)
Description copied from class: EditorModel
This method can be implemented by classes extending this one. It will be executed each time the user changes page on the left navigation menu.

Overrides:
DoTaskOnChangePage in class EditorModel

DoTaskOnComeBackFromSubEditor

public void DoTaskOnComeBackFromSubEditor()
This method will be called when you come back to the main Editor from a sub Editor.

Overrides:
DoTaskOnComeBackFromSubEditor in class ObjEditorModel

DoTaskOnStartEditor

public void DoTaskOnStartEditor(XPHashtable _htFormData)
Initializes the property type member variable with the one from IPTProperty in Edit mode and the default value in create mode.

Overrides:
DoTaskOnStartEditor in class EditorModel
Parameters:
_htFormData -
Throws:
XPException

SetUseForceSubPortal

public void SetUseForceSubPortal(boolean bForce)
Does nothing in the community editor.

Specified by:
SetUseForceSubPortal in interface IHeaderAndFooterModel
See Also:
IHeaderAndFooterModel.SetUseForceSubPortal(boolean)

FlipTitleBar

public void FlipTitleBar(XPHashtable _htFormData)
Flip the title bar check box.


GetCommunityFolderID

public int GetCommunityFolderID()
Description copied from interface: ICommunityEditorModelRO
Returns the community folder id.

Specified by:
GetCommunityFolderID in interface ICommunityEditorModelRO
Specified by:
GetCommunityFolderID in interface IHeaderAndFooterModel
Returns:
int
See Also:
ICommunityEditorModelRO.GetCommunityFolderID()

GetCommunityID

public int GetCommunityID()
Specified by:
GetCommunityID in interface IHeaderAndFooterModel
Specified by:
GetCommunityID in interface IPortletPreferencesModelRO
Returns:
int
See Also:
IPortletPreferencesModelRO.GetCommunityID()

GetData

public java.lang.String GetData(java.lang.String name)
Specified by:
GetData in interface IHeaderAndFooterModel
Returns:
String

GetFooterHasCommunityPrefs

public boolean GetFooterHasCommunityPrefs()
Specified by:
GetFooterHasCommunityPrefs in interface IHeaderAndFooterModel
Returns:

GetFooterID

public int GetFooterID()
Specified by:
GetFooterID in interface IHeaderAndFooterModel
Returns:

GetFooterName

public java.lang.String GetFooterName()
Specified by:
GetFooterName in interface IHeaderAndFooterModel
Returns:
String
See Also:
com.plumtree.portalpages.browsing.editors.community.IHeaderAndBannerModel#GetFooterName()

IsTemplateSelector

public boolean IsTemplateSelector()
Description copied from interface: IHeaderAndFooterModel
Check to see if the force subportal header/banner checkbox should be enabled.

Specified by:
IsTemplateSelector in interface IHeaderAndFooterModel
Returns:
boolean
See Also:
IHeaderAndFooterModel.IsTemplateSelector()

GetPortletPreferencesList

public PTSortedArrayWrapper GetPortletPreferencesList(int iPageID)
Specified by:
GetPortletPreferencesList in interface IPortletPreferencesModelRO
Returns:
See Also:
com.plumtree.portalpages.browsing.editors.community.IPortletPreferencesModelRO#GetPortletPreferencesList()

GetHeaderHasCommunityPrefs

public boolean GetHeaderHasCommunityPrefs()
Specified by:
GetHeaderHasCommunityPrefs in interface IHeaderAndFooterModel
Returns:

GetHeaderID

public int GetHeaderID()
Specified by:
GetHeaderID in interface IHeaderAndFooterModel
Returns:

GetHeaderName

public java.lang.String GetHeaderName()
Specified by:
GetHeaderName in interface IHeaderAndFooterModel
Returns:
String
See Also:
com.plumtree.portalpages.browsing.editors.community.IHeaderAndBannerModel#GetHeaderName()

GetName

public java.lang.String GetName()
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorModel
Returns:
String

GetNoTitleBarPref

public java.lang.String GetNoTitleBarPref()
Turn m_mapPortletsWithNoTitleBars into a pref that we can store. Executed after the object is stored, this pref is then stored into the DB.


GetPageCount

public int GetPageCount()
Specified by:
GetPageCount in interface IPortletPreferencesModelRO
Returns:
See Also:
IPortletPreferencesModelRO.GetPageCount()

GetPageID

public int GetPageID(int nPageIndex)
Specified by:
GetPageID in interface IPortletPreferencesModelRO
Returns:
See Also:
IPortletPreferencesModelRO.GetPageID(int)

GetPageModelAt

public PageData GetPageModelAt(int nPageIndex)
Description copied from interface: ICommunityEditorModelRO
Get the page model at the given index.

Specified by:
GetPageModelAt in interface ICommunityEditorModelRO
Returns:
PageData
See Also:
ICommunityEditorModelRO.GetPageModelAt(int)

GetPageName

public java.lang.String GetPageName(int nPageIndex)
Specified by:
GetPageName in interface IPortletPreferencesModelRO
Returns:
See Also:
IPortletPreferencesModelRO.GetPageName(int)

GetRedirectAfterFinish

public Redirect GetRedirectAfterFinish()
If this is a subcommunity editor and hence a popup, close it when editor is done.

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

IsCommunityEditor

public boolean IsCommunityEditor()
Description copied from interface: IPortletPreferencesModelRO
If this is the community editor, then we link to the community prefs page; if it's a community page but we're not in the community editor, then we link to the user-gadget-community prefs page.

Specified by:
IsCommunityEditor in interface IPortletPreferencesModelRO
Returns:
True if this is the community editor.
See Also:
IPortletPreferencesModelRO#IsCommunityEditor()

IsSiteMapDisabled

public boolean IsSiteMapDisabled()
Description copied from interface: ICommunityEditorModelRO
Is Site Map Disabled

Specified by:
IsSiteMapDisabled in interface ICommunityEditorModelRO
Returns:

RefreshItemFromFooterTree

public void RefreshItemFromFooterTree(XPHashtable _htFormData)
This method gets the selected items from the tree.

Specified by:
RefreshItemFromFooterTree in interface IHeaderAndFooterModel

RefreshItemFromHeaderTree

public void RefreshItemFromHeaderTree(XPHashtable _htFormData)
Get the header and footer selected from the tree.

Specified by:
RefreshItemFromHeaderTree in interface IHeaderAndFooterModel
See Also:
com.plumtree.portalpages.browsing.editors.community.IHeaderAndBannerModel#RefreshItemFromHeaderTree(XPHashtable)

ReversePortletPrefsSort

public void ReversePortletPrefsSort(XPHashtable _htFormData)
Reverses the sort order of one of the pages of gadget prefs.


ABOJobIDToDisplay

public boolean ABOJobIDToDisplay()
Description copied from interface: IFolderSecurityABOModelRO
This method returns whether or not there is a job ID to display.

Specified by:
ABOJobIDToDisplay in interface IFolderSecurityABOModelRO
Returns:
boolean true implies there is a job ID to display.

GetABOJobID

public int GetABOJobID()
Description copied from interface: IFolderSecurityABOModelRO
This method returns the job ID for a security change job.

Specified by:
GetABOJobID in interface IFolderSecurityABOModelRO
Returns:
int the job ID for security changes.

GetCreatedJobName

public java.lang.String GetCreatedJobName()
Description copied from interface: IFolderSecurityABOModelRO
Retrieves the name of the job created by ABO.

Specified by:
GetCreatedJobName in interface IFolderSecurityABOModelRO

GetFolderNameForCreatedJobs

public java.lang.String GetFolderNameForCreatedJobs()
Description copied from interface: IFolderSecurityABOModelRO
Retrieves the name of the folder that ABO created the job in.

Specified by:
GetFolderNameForCreatedJobs in interface IFolderSecurityABOModelRO

GetCurrentFolderACL

public IPTAccessList GetCurrentFolderACL()
Returns:
the current IPTAccessList of the folder whose security is being edited

IsAdminModifiedOnFolder

public boolean IsAdminModifiedOnFolder(IPTAccessList _ptOldACL)
Parameters:
_ptOldACL - the IPTAccessList from before the ACLs were changed
Returns:
true if an admin acl was added or an acl was changed to admin.

ApplySecurityChangesUsingABO

public void ApplySecurityChangesUsingABO(boolean bPropagateAllACLs)
Apply the subportal profile to the users in the folder later, using ABO.

Parameters:
bPropagateAllACLs - - If true propagate all acls to child objects and subfolders, if false propagate only admin acls.

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
Overrides:
SavePage in class ObjEditorModel
Parameters:
_sPageName -
_htFormData -
Returns:
int Page status for server side validation

SetDefaultHeaderOrFooter

public void SetDefaultHeaderOrFooter(boolean bHeader)
Is this one used??

Specified by:
SetDefaultHeaderOrFooter in interface IHeaderAndFooterModel
See Also:
com.plumtree.portalpages.browsing.editors.community.IHeaderAndBannerModel#SetDefaultHeaderOrFooter(boolean)

SetupHeaderAndFooter

public void SetupHeaderAndFooter(int nCommTempHeaderID,
                                 int nCommTempFooterID)
Helper method to start the Selected Header or Footer List. Look for header and footer gadget in the community template, if none is set in the template, look in the community object, otherwise just get it from the subportal (if one is set). Is also called by the pagelistmodel when a community template is set.


StartCommGroupSelectPTObject

public void StartCommGroupSelectPTObject()
Helper method to start the Select PTObject List.


StartCommPortletSelectPTObject

public void StartCommPortletSelectPTObject()
Helper method to start the Select PTObject List.


StartSubCommunitySelectPTObject

public void StartSubCommunitySelectPTObject()
Helper method to start the Select PTObject List.


UsingFooterFromCommunityTemplate

public boolean UsingFooterFromCommunityTemplate()
Returns true if the footer was set in the community template.

Specified by:
UsingFooterFromCommunityTemplate in interface IHeaderAndFooterModel
Returns:
true if the footer was set in the community template.

UsingHeaderFromCommunityTemplate

public boolean UsingHeaderFromCommunityTemplate()
Returns true if the header was set in the community template.

Specified by:
UsingHeaderFromCommunityTemplate in interface IHeaderAndFooterModel
Returns:
true if the header was set in the community template.

SavePortletPrefsPage

protected void SavePortletPrefsPage(XPHashtable _htFormData)
Saves the data on the gadget prefs page.

Parameters:
_htFormData -



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