com.plumtree.portalpages.admin.editors.communitytemplate
Class CommunityTemplateModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
          extended by com.plumtree.portalpages.admin.editors.communitytemplate.CommunityTemplateModel
All Implemented Interfaces:
IHeaderAndFooterModel, IDescriptionModelRO, IMigrationModelRO, IObjEditorModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class CommunityTemplateModel
extends ObjEditorModel
implements IEditorModelRO, IHeaderAndFooterModel

Author:
michaeld

Field Summary
static int HEADERFOOTER_ID_FORCE_SUBPORTAL
           
static int LIST_KEY_FOOTER
          List Key: Footer
static int LIST_KEY_HEADER
          List Key: Header
static int POSTTOSELF_ACTION_RETURN_FROM_TREE
          Repost Action: From Tree
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
CommunityTemplateModel()
           
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 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 DoTaskOnStartEditor(XPHashtable _htFormData)
          Initializes the property type member variable with the one from IPTProperty in Edit mode and the default value in create mode.
 int GetCommunityFolderID()
           
 int GetCommunityID()
          Not a community return -1.
 java.lang.String GetData(java.lang.String name)
           
 boolean GetFooterHasCommunityPrefs()
           
 int GetFooterID()
           
 java.lang.String GetFooterName()
           
 boolean GetHeaderHasCommunityPrefs()
           
 int GetHeaderID()
           
 java.lang.String GetHeaderName()
           
 java.lang.String GetName()
          Returns the Class name.
 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)
           
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetDefaultHeaderOrFooter(boolean bHeader)
           
 void SetUseForceSubPortal(boolean bForce)
           
 boolean UsingFooterFromCommunityTemplate()
          This is a function used in the community editor to determine whether the footer was set in the community template, in which case we disable some of the buttons on the footer selection page.
 boolean UsingHeaderFromCommunityTemplate()
          This is a function used in the community editor to determine whether the header was set in the community template, in which case we disable some of the buttons on the header selection page.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccess, CheckEditorAccessAndStart, CheckFolderType, DisableSecurity, DoTaskOnComeBackFromSubEditor, Finish, 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
Cancel, CleanupAllData, CleanupTempData, DoTaskOnChangePage, GetAccessToEditorPriviledges, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly, GetRedirectAfterFinish, 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.uiinfrastructure.editor.IEditorModelRO
GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Object Name

See Also:
Constant Field Values

POSTTOSELF_ACTION_RETURN_FROM_TREE

public static final int POSTTOSELF_ACTION_RETURN_FROM_TREE
Repost Action: From Tree

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

HEADERFOOTER_ID_FORCE_SUBPORTAL

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

CommunityTemplateModel

public CommunityTemplateModel()
Method Detail

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

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

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 -

GetCommunityID

public int GetCommunityID()
Not a community return -1.

Specified by:
GetCommunityID in interface IHeaderAndFooterModel
Returns:
int
See Also:
com.plumtree.portalpages.browsing.editors.community.IHeaderAndBannerModel#GetCommunityID()

GetData

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

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

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

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

GetName

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

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

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)
Specified by:
RefreshItemFromHeaderTree in interface IHeaderAndFooterModel
Parameters:
_htFormData -

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)
Specified by:
SetDefaultHeaderOrFooter in interface IHeaderAndFooterModel
Parameters:
bHeader -

SetUseForceSubPortal

public void SetUseForceSubPortal(boolean bForce)
Specified by:
SetUseForceSubPortal in interface IHeaderAndFooterModel

UsingFooterFromCommunityTemplate

public boolean UsingFooterFromCommunityTemplate()
This is a function used in the community editor to determine whether the footer was set in the community template, in which case we disable some of the buttons on the footer selection page. When we're in the community template editor, we just return true.

Specified by:
UsingFooterFromCommunityTemplate in interface IHeaderAndFooterModel
Returns:
true

UsingHeaderFromCommunityTemplate

public boolean UsingHeaderFromCommunityTemplate()
This is a function used in the community editor to determine whether the header was set in the community template, in which case we disable some of the buttons on the header selection page. When we're in the community template editor, we just return true.

Specified by:
UsingHeaderFromCommunityTemplate in interface IHeaderAndFooterModel
Returns:
true

GetCommunityFolderID

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



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