com.plumtree.portalpages.common.editpage
Class PageLayoutPlugInModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.portalpages.common.editpage.PageLayoutPlugInModel
All Implemented Interfaces:
IPageLayoutModelRO, IManagedObject, IModel, IModelRO, IMVCObject

public class PageLayoutPlugInModel
extends EditorHelperModel
implements IPageLayoutModelRO

This Model contains the state of the plug-in section.

Author:
MichaelD

Field Summary
static int COL_GADGET_ALIGNMENT
          Selected Portlet Alignment Column
static int COL_GADGET_INDEX
          Selected Portlet Index Column
static int COL_GADGET_MAX
          Selected Portlet Column Count
static int COL_GADGET_NAME
          Selected Portlet Name Column
static int COL_GADGET_QUERY_INDEX
          Selected Portlet Query Index
protected  int[][] m_aanPortletOrder
          Portlet Order in Columns
static int PAGELAYOUT_COL_GADGET_MODEL
          Portlet Model Column
static int PAGELAYOUT_SORTEDARRAY_PROPID_INDEX
          Sorted Array Index Column
static java.lang.String STR_MVC_CLASS_NAME
          Object Name
static java.lang.String SUBSPACE_NAME_ADDFREEFORM
          Key name used by the Activity Space to store the add free form page.
static java.lang.String SUBSPACE_NAME_ADDGADGETS
          Key name used by the Activity Space to store the add gadgets page.
static java.lang.String SUBSPACE_NAME_SELECTLAYOUT
          Key name used by the Activity Space to store the select community template tree.
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
PageLayoutPlugInModel()
           
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskAfterStore(IPTPage page)
           
 void DoTaskBeforeStore(IPTPage page)
           
 int FreeFormToBeRemove()
          DCA - Returns the freeform portlet's ID if it has been removed.
 boolean GetCanChangeLayout()
          Method GetCanChangeLayout.
 boolean GetCanChooseFreeForm()
          Method GetCanChooseFreeForm.
 boolean GetCanCreatePortlet()
          Method GetCanCreatePortlet.
 int GetClassID()
          Method GetClassID.
 int[][] GetColumnOrder()
          Method GetColumnOrder.
 int GetFolderID()
          Method GetFolderID.
 int GetFreeFormPortletID()
          DCA - Returns the freeform portlet's ID.
 boolean GetHasFreeFormPortlet()
          Method GetHasFreeFormPortlet.
 java.lang.String GetInputValue(java.lang.String name)
          Method GetInputValue.
 java.lang.String GetName()
          Returns the Class name.
 int GetNewPortletID()
          Method GetNewPortletID.
 int GetObjectID()
          Method GetObjectID.
 PageData GetPageModel()
          Method GetPageModel.
 int GetPageType()
          Method GetPageType.
 int GetPortletAlignment(int nPortletIndex)
          Method GetPortletAlignment.
 int GetPortletColumn(int nPortletIndex)
          Method GetPortletColumn.
 int GetPortletCount()
          Method GetPortletCount.
 java.lang.String GetPortletDescription(int nPortletIndex)
          Method GetPortletDescription.
 int GetPortletID(int nPortletIndex)
          Method GetPortletID.
 boolean GetPortletIsCommunityType(int nPortletIndex)
          Method GetPortletIsCommunityType.
 boolean GetPortletIsFromPT(int nPortletIndex)
          Method GetPortletIsFromPT.
 java.lang.String GetPortletName(int nPortletIndex)
          Method GetPortletName.
 XPSortedDictionary GetPortletsToHide()
          Method GetPortletsToHide.
 XPSortedDictionary GetSelectedPortlets()
          Method GetSelectedPortlets.
 int GetTableHeight()
          Method GetTableHeight.
 boolean GetUseDragDropLayout()
          Method GetUseDragDropLayout.
 void InitializePlugIn(IPTPage ptPage, int _nTableHeight, IASQueryResult _ptqrPortlets, boolean bIgnorePortletFromPageTemplate, IPTSession _Session)
          Method InitializePlugIn.
 void InitializePlugIn(IPTPageTemplate ptPageTemplate, int _nTableHeight, IASQueryResult _ptqrPortlets, IPTSession _Session)
          Method InitializePlugIn.
 void InitializePlugIn(PageData _myPageModel, IPTCommunity _myCommunity, int _nTableHeight, IPTSession _Session)
          Method InitializePlugIn.
 boolean IsFreeFormLayoutAllowed()
          Method IsFreeFormLayoutAllowed.
 void RepostAddFreeForm()
          Method RepostAddFreeForm.
 void RepostAddPortlets()
          Method RepostAddPortlets.
 void RepostDeletePortlet()
          Method RepostDeletePortlet.
 void RepostNewPortlet()
          Method RepostNewPortlet.
 int SaveSection(XPHashtable _htFormData)
          Method SaveSection.
 void SetAllowFreeFormSection(boolean bAllowFreeFormSection)
           
 void SetIsHomeMyPage(boolean bIsHomeMyPage)
          Sets whether this is the users home my page or not.
 void SetOpenerClassID(int nOpenerClassID)
          Method SetOpenerClassID.
 void SetOpenerObjectID(int nOpenerObjectID)
          Method SetOpenerObjectID.
 void SetOpenerPageID(int nOpenerPageID)
          Method SetOpenerPageID.
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData, Init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Object Name

See Also:
Constant Field Values

SUBSPACE_NAME_ADDGADGETS

public static final java.lang.String SUBSPACE_NAME_ADDGADGETS
Key name used by the Activity Space to store the add gadgets page.

See Also:
Constant Field Values

SUBSPACE_NAME_ADDFREEFORM

public static final java.lang.String SUBSPACE_NAME_ADDFREEFORM
Key name used by the Activity Space to store the add free form page.

See Also:
Constant Field Values

SUBSPACE_NAME_SELECTLAYOUT

public static final java.lang.String SUBSPACE_NAME_SELECTLAYOUT
Key name used by the Activity Space to store the select community template tree.

See Also:
Constant Field Values

PAGELAYOUT_SORTEDARRAY_PROPID_INDEX

public static final int PAGELAYOUT_SORTEDARRAY_PROPID_INDEX
Sorted Array Index Column

See Also:
Constant Field Values

PAGELAYOUT_COL_GADGET_MODEL

public static final int PAGELAYOUT_COL_GADGET_MODEL
Portlet Model Column

See Also:
Constant Field Values

COL_GADGET_MAX

public static final int COL_GADGET_MAX
Selected Portlet Column Count

See Also:
Constant Field Values

COL_GADGET_INDEX

public static final int COL_GADGET_INDEX
Selected Portlet Index Column

See Also:
Constant Field Values

COL_GADGET_NAME

public static final int COL_GADGET_NAME
Selected Portlet Name Column

See Also:
Constant Field Values

COL_GADGET_ALIGNMENT

public static final int COL_GADGET_ALIGNMENT
Selected Portlet Alignment Column

See Also:
Constant Field Values

COL_GADGET_QUERY_INDEX

public static final int COL_GADGET_QUERY_INDEX
Selected Portlet Query Index

See Also:
Constant Field Values

m_aanPortletOrder

protected int[][] m_aanPortletOrder
Portlet Order in Columns

Constructor Detail

PageLayoutPlugInModel

public PageLayoutPlugInModel()
Method Detail

Create

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

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

DoTaskBeforeStore

public void DoTaskBeforeStore(IPTPage page)

DoTaskAfterStore

public void DoTaskAfterStore(IPTPage page)

GetCanChangeLayout

public boolean GetCanChangeLayout()
Description copied from interface: IPageLayoutModelRO
Method GetCanChangeLayout. If this editor can choose the page layout type for this page, then this will return true.

Specified by:
GetCanChangeLayout in interface IPageLayoutModelRO
Returns:
boolean
See Also:
IPageLayoutModelRO.GetCanChangeLayout()

GetCanChooseFreeForm

public boolean GetCanChooseFreeForm()
Description copied from interface: IPageLayoutModelRO
Method GetCanChooseFreeForm. If this editor can choose a free form gadget for this page, then this will return true.

Specified by:
GetCanChooseFreeForm in interface IPageLayoutModelRO
Returns:
boolean
See Also:
IPageLayoutModelRO.GetCanChooseFreeForm()

GetCanCreatePortlet

public boolean GetCanCreatePortlet()
Description copied from interface: IPageLayoutModelRO
Method GetCanCreatePortlet. If this editor can create a gadget from a gadget template, then this will return true.

Specified by:
GetCanCreatePortlet in interface IPageLayoutModelRO
Returns:
boolean
See Also:
IPageLayoutModelRO.GetCanCreatePortlet()

GetColumnOrder

public int[][] GetColumnOrder()
Method GetColumnOrder. Get the gadget order of the columns.

Returns:
int[][]

GetPortletAlignment

public int GetPortletAlignment(int nPortletIndex)
Description copied from interface: IPageLayoutModelRO
Method GetPortletAlignment. Gets the gadget alignment for the gadget at the given index.

Specified by:
GetPortletAlignment in interface IPageLayoutModelRO
Returns:
int
See Also:
IPageLayoutModelRO.GetPortletAlignment(int)

GetPortletColumn

public int GetPortletColumn(int nPortletIndex)
Description copied from interface: IPageLayoutModelRO
Method GetPortletColumn. Gets the gadget column for the gadget at the given index.

Specified by:
GetPortletColumn in interface IPageLayoutModelRO
Returns:
int
See Also:
IPageLayoutModelRO.GetPortletColumn(int)

GetPortletCount

public int GetPortletCount()
Description copied from interface: IPageLayoutModelRO
Method GetPortletCount. Gets the count of the gadgets on the page.

Specified by:
GetPortletCount in interface IPageLayoutModelRO
Returns:
int
See Also:
IPageLayoutModelRO.GetPortletCount()

GetPortletDescription

public java.lang.String GetPortletDescription(int nPortletIndex)
Description copied from interface: IPageLayoutModelRO
Method GetPortletDescription. Gets the gadget description for the gadget at the given index.

Specified by:
GetPortletDescription in interface IPageLayoutModelRO
Returns:
String
See Also:
IPageLayoutModelRO.GetPortletDescription(int)

GetPortletID

public int GetPortletID(int nPortletIndex)
Description copied from interface: IPageLayoutModelRO
Method GetPortletID. Gets the gadget ID for the gadget at the given index.

Specified by:
GetPortletID in interface IPageLayoutModelRO
Returns:
int
See Also:
IPageLayoutModelRO.GetPortletID(int)

GetPortletIsCommunityType

public boolean GetPortletIsCommunityType(int nPortletIndex)
Description copied from interface: IPageLayoutModelRO
Method GetPortletIsCommunityType. Gets whether the gadget at the given index is of type community or not.

Specified by:
GetPortletIsCommunityType in interface IPageLayoutModelRO
Returns:
boolean
See Also:
IPageLayoutModelRO.GetPortletIsCommunityType(int)

GetPortletIsFromPT

public boolean GetPortletIsFromPT(int nPortletIndex)
Description copied from interface: IPageLayoutModelRO
Method GetPortletIsFromPT. Returns true if the gadget is from the page template.

Specified by:
GetPortletIsFromPT in interface IPageLayoutModelRO
Returns:
boolean
See Also:
IPageLayoutModelRO.GetPortletIsFromPT(int)

GetPortletName

public java.lang.String GetPortletName(int nPortletIndex)
Description copied from interface: IPageLayoutModelRO
Method GetPortletName. Gets the gadget name for the gadget at the given index.

Specified by:
GetPortletName in interface IPageLayoutModelRO
Returns:
String
See Also:
IPageLayoutModelRO.GetPortletName(int)

GetPortletsToHide

public XPSortedDictionary GetPortletsToHide()
Method GetPortletsToHide.

Returns:
XPSortedDictionary

GetHasFreeFormPortlet

public boolean GetHasFreeFormPortlet()
Description copied from interface: IPageLayoutModelRO
Method GetHasFreeFormPortlet. Return true if the page has a free form portlet selected.

Specified by:
GetHasFreeFormPortlet in interface IPageLayoutModelRO
Returns:
boolean
See Also:
IPageLayoutModelRO.GetHasFreeFormPortlet()

GetFreeFormPortletID

public int GetFreeFormPortletID()
DCA - Returns the freeform portlet's ID. Must call GetHasFreeFormPortlet() before calling this function.


FreeFormToBeRemove

public int FreeFormToBeRemove()
DCA - Returns the freeform portlet's ID if it has been removed. Returns -1 if no FreeForm to be remove.


GetInputValue

public java.lang.String GetInputValue(java.lang.String name)
Description copied from interface: IPageLayoutModelRO
Method GetInputValue. Get the value for the given input.

Specified by:
GetInputValue in interface IPageLayoutModelRO
Returns:
String
See Also:
IPageLayoutModelRO.GetInputValue(String)

IsFreeFormLayoutAllowed

public boolean IsFreeFormLayoutAllowed()
Description copied from interface: IPageLayoutModelRO
Method IsFreeFormLayoutAllowed. Returns whether free form layouts can be selected.

Specified by:
IsFreeFormLayoutAllowed in interface IPageLayoutModelRO
Returns:
boolean
See Also:
IPageLayoutModelRO.IsFreeFormLayoutAllowed()

GetName

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

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

GetNewPortletID

public int GetNewPortletID()
Method GetNewPortletID. Get the New Portlet's ID.

Returns:
int

GetClassID

public int GetClassID()
Description copied from interface: IPageLayoutModelRO
Method GetClassID. Gets the class ID of the object that opened this layout page.

Specified by:
GetClassID in interface IPageLayoutModelRO
Returns:
int
See Also:
com.plumtree.portalpages.common.editpage.IPageLayoutModelRO#GetOpenerClassID()

GetFolderID

public int GetFolderID()
Description copied from interface: IPageLayoutModelRO
Method GetFolderID. Gets the Folder ID of the page that opened this layout page.

Specified by:
GetFolderID in interface IPageLayoutModelRO
Returns:
int
See Also:
com.plumtree.portalpages.common.editpage.IPageLayoutModelRO#GetOpenerCommunityID()

GetObjectID

public int GetObjectID()
Description copied from interface: IPageLayoutModelRO
Method GetObjectID. Gets the Object ID of the object that opened this layout page.

Specified by:
GetObjectID in interface IPageLayoutModelRO
Returns:
int
See Also:
com.plumtree.portalpages.common.editpage.IPageLayoutModelRO#GetOpenerObjectID()

GetPageModel

public PageData GetPageModel()
Method GetPageModel. Get the page model of the page.

Returns:
PageData

GetPageType

public int GetPageType()
Description copied from interface: IPageLayoutModelRO
Method GetPageType. Gets the page type of the page we are editing.

Specified by:
GetPageType in interface IPageLayoutModelRO
Returns:
int
See Also:
IPageLayoutModelRO.GetPageType()

GetSelectedPortlets

public XPSortedDictionary GetSelectedPortlets()
Method GetSelectedPortlets. Gets the selected gadgets in a dictionary.

Returns:
XPSortedDictionary

GetTableHeight

public int GetTableHeight()
Description copied from interface: IPageLayoutModelRO
Method GetTableHeight. Gets the height of the drag and drop table.

Specified by:
GetTableHeight in interface IPageLayoutModelRO
Returns:
int
See Also:
IPageLayoutModelRO.GetTableHeight()

InitializePlugIn

public void InitializePlugIn(IPTPage ptPage,
                             int _nTableHeight,
                             IASQueryResult _ptqrPortlets,
                             boolean bIgnorePortletFromPageTemplate,
                             IPTSession _Session)
Method InitializePlugIn. To initialize this plug-in you need to set the DP name and the default value of the plug-in setting. Called when creating a new page template or opening one to edit. Called when creating or editing a my page.

Parameters:
_nPageLayoutType -
_nPageTemplateID -
_nTableHeight -
_ptqrPortlets -
_Session -

InitializePlugIn

public void InitializePlugIn(IPTPageTemplate ptPageTemplate,
                             int _nTableHeight,
                             IASQueryResult _ptqrPortlets,
                             IPTSession _Session)
Method InitializePlugIn. To initialize this plug-in you need to set the DP name and the default value of the plug-in setting. Called when creating a new page template or opening one to edit. Called when creating or editing a my page.

Parameters:
_nPageLayoutType -
_nPageTemplateID -
_nTableHeight -
_ptqrPortlets -
_Session -

InitializePlugIn

public void InitializePlugIn(PageData _myPageModel,
                             IPTCommunity _myCommunity,
                             int _nTableHeight,
                             IPTSession _Session)
Method InitializePlugIn. To initialize this plug-in you need to set the DP name and the default value of the plug-in setting. Called when creating or editing a community page.

Parameters:
_myPageModel -
_myCommunity -
_nTableHeight -
_Session -

RepostAddFreeForm

public void RepostAddFreeForm()
Method RepostAddFreeForm. Add a free form portlet


RepostAddPortlets

public void RepostAddPortlets()
Method RepostAddPortlets. Set the gadgets that were selected.


RepostDeletePortlet

public void RepostDeletePortlet()
Method RepostDeletePortlet. Delete the gadget that were selected.


RepostNewPortlet

public void RepostNewPortlet()
Method RepostNewPortlet. Set the gadgets that were selected.


SaveSection

public int SaveSection(XPHashtable _htFormData)
Method SaveSection. Saves the data on the Main page. This method is called automatically by the Framework.

Specified by:
SaveSection in class EditorHelperModel
Parameters:
_htFormData -
Returns:
int Status for server side validation

SetOpenerClassID

public void SetOpenerClassID(int nOpenerClassID)
Method SetOpenerClassID. Sets the opener class ID.

Parameters:
nOpenerClassID -

SetOpenerObjectID

public void SetOpenerObjectID(int nOpenerObjectID)
Method SetOpenerObjectID. Sets the opener object ID.

Parameters:
nOpenerObjectID -

SetOpenerPageID

public void SetOpenerPageID(int nOpenerPageID)
Method SetOpenerPageID. Sets the opener page ID.

Parameters:
nOpenerPageID -

SetIsHomeMyPage

public void SetIsHomeMyPage(boolean bIsHomeMyPage)
Sets whether this is the users home my page or not.

Parameters:
bIsHomeMyPage -

SetAllowFreeFormSection

public void SetAllowFreeFormSection(boolean bAllowFreeFormSection)

GetUseDragDropLayout

public boolean GetUseDragDropLayout()
Description copied from interface: IPageLayoutModelRO
Method GetUseDragDropLayout. Gets wether to use the drag drop layout or the alternate layout based upon which browser is being used.

Specified by:
GetUseDragDropLayout in interface IPageLayoutModelRO
Returns:
boolean



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