com.plumtree.portalpages.admin.editors.portlet
Class PortletModel

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

public class PortletModel
extends ObjEditorModel
implements IPortletModelRO

Author:
adolfoc

Field Summary
static java.lang.String HTTPGP_CLSID
          These static variables are used in determining what UI to display and how to initialize the portlet object.
static java.lang.String IGP_CLSID
           
protected  XPArrayList m_xalPPluginDPs
          This member maintains a registry of page names that extend PPluginDP.
protected  XPArrayList m_xalPSubModels
          This member maintains a registry of Plugin model keys that support the IWSSubModel interface.
static int PMODE_CREATE
           
static int PMODE_CREATE_FROMTEMPLATE
           
static int PMODE_EDIT
           
static int PMODE_INVALID
          The following static members define the possible modes this editor can be in.
static int PMODE_PRECREATE
           
static java.lang.String PORTLET_CLSID
           
static java.lang.String PORTLET_TEMPLATE_CLSID
           
static java.lang.String QS_SHOWFREEFORM
          Query String to determine if freeform templates should be shown
static java.lang.String QS_SHOWHEADERFOOTER
          Query String to determine if freeform templates should be shown
static java.lang.String STR_MVC_CLASS_NAME
           
static int WSID_COMMUNITYLINKS
          Web Service ID for intrinsic Community Links portlet
 
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
PortletModel()
           
 
Method Summary
 void AddSendToOthersButtonToHelpBanner(PTConstruct myHelpBanner)
           
protected  boolean CheckEditorAccess(XPHashtable _htFormData)
          Helper method to check the current user rights to this Object Editor.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 IPTGadget CreateObjectFromTemplate(int nObjectIDOfTemplate)
          If this editor is invoked from a template - this function is used to create the m_ptObject from a template.
 void DetermineWhetherToDisplayMandatoryColumnOnSecurityPage()
          Calculates whether or not the "mandatory" column should be displayed on the security tab.
 void DoTaskBeforeStore()
          That method contains the code that should be executed just before the object is stored in the DB.
 void DoTaskOnComeBackFromSubEditor()
          This method will be called when you come back to the main Editor from a sub Editor.
 void DoTaskOnStartEditor(XPHashtable _htFormData)
          That method contains the code that should be executed just after the object has been initialized when the new editor is started.
 int GetCreatorClassID()
          Returns the creatorClassID.
 int GetCreatorID()
          Returns the creatorID.
 int GetFolderID()
          Returns the Folder ID in which the Object will be saved.
 java.lang.String GetName()
          Returns the Class name.
 int GetPMode()
          Returns the nPMode.
 int GetPortletSize()
          Returns the Portlet's visual size.
 int GetPortletType()
           
 java.lang.String GetProviderCLSID()
           
 IPTWebService GetWebService()
           
 boolean IsForCommunity()
           
 boolean IsMandatory()
           
 boolean IsTemplate()
           
 void PreStorePSubModels()
           
 void RegisterPPage(java.lang.String strDPName)
          This method is used to register a new PPluginDP with this WebService main model.
 void RegisterPSubModel(java.lang.String strPluginModelStorageName)
          This method is used to register a new submodel with this WebService main model.
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetEditedObject(IPTGadget ptPortlet)
          Reset the portlet object we are editing to this new one.
 void SetMemberVariablesFromQS(XPHashtable _htFormData)
          Helper method for the StartEditor method.
 void SetPMode(int nPMode)
          Sets the nPMode.
 void UpdatePages()
           
 void UpdatePSubModels()
           
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccessAndStart, CheckFolderType, DisableSecurity, Finish, ForceSaveInFolder, GetClassID, GetFolderName, GetIsSysAdmin, GetMigrationStatus, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession, Init, InitIsSysAdminFlag, InitPTObject, IsDescriptionDisabled, IsMigrationApproved, SaveMigrationStatus, SetDisableDescription, SetEditorToReadOnly, SetMigrationStatus, StartKeywords, StartLocNamesList, StartMigrationHistory, StartObjectProp, StartSecurityList, StoreObject
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, CleanupAllData, CleanupTempData, DoTaskAfterStore, 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.portaluiinfrastructure.editor.IObjEditorModelRO
GetClassID, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession
 
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
See Also:
Constant Field Values

HTTPGP_CLSID

public static final java.lang.String HTTPGP_CLSID
These static variables are used in determining what UI to display and how to initialize the portlet object.


IGP_CLSID

public static final java.lang.String IGP_CLSID

PORTLET_CLSID

public static final java.lang.String PORTLET_CLSID
See Also:
Constant Field Values

PORTLET_TEMPLATE_CLSID

public static final java.lang.String PORTLET_TEMPLATE_CLSID
See Also:
Constant Field Values

PMODE_INVALID

public static final int PMODE_INVALID
The following static members define the possible modes this editor can be in.

See Also:
Constant Field Values

PMODE_PRECREATE

public static final int PMODE_PRECREATE
See Also:
Constant Field Values

PMODE_CREATE

public static final int PMODE_CREATE
See Also:
Constant Field Values

PMODE_CREATE_FROMTEMPLATE

public static final int PMODE_CREATE_FROMTEMPLATE
See Also:
Constant Field Values

PMODE_EDIT

public static final int PMODE_EDIT
See Also:
Constant Field Values

QS_SHOWFREEFORM

public static final java.lang.String QS_SHOWFREEFORM
Query String to determine if freeform templates should be shown

See Also:
Constant Field Values

QS_SHOWHEADERFOOTER

public static final java.lang.String QS_SHOWHEADERFOOTER
Query String to determine if freeform templates should be shown

See Also:
Constant Field Values

WSID_COMMUNITYLINKS

public static final int WSID_COMMUNITYLINKS
Web Service ID for intrinsic Community Links portlet

See Also:
Constant Field Values

m_xalPPluginDPs

protected XPArrayList m_xalPPluginDPs
This member maintains a registry of page names that extend PPluginDP. We must remember to enable and disable these pages when the appropriate updates occur.


m_xalPSubModels

protected XPArrayList m_xalPSubModels
This member maintains a registry of Plugin model keys that support the IWSSubModel interface. We must remember to exercise the IWSSubModel interface on them when the appropriate updates occur.

Constructor Detail

PortletModel

public PortletModel()
Method Detail

AddSendToOthersButtonToHelpBanner

public void AddSendToOthersButtonToHelpBanner(PTConstruct myHelpBanner)

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

DetermineWhetherToDisplayMandatoryColumnOnSecurityPage

public void DetermineWhetherToDisplayMandatoryColumnOnSecurityPage()
Calculates whether or not the "mandatory" column should be displayed on the security tab. We should display the mandatory column if the gadget is not a template AND it is a narrow or wide portlet.

See Also:
IRepostModel.SavePage(String, XPHashtable)

DoTaskBeforeStore

public void DoTaskBeforeStore()
Description copied from class: EditorModel
That method contains the code that should be executed just before the object is stored in the DB.

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

DoTaskOnStartEditor

public void DoTaskOnStartEditor(XPHashtable _htFormData)
Description copied from class: EditorModel
That method contains the code that should be executed just after the object has been initialized when the new editor is started.

Overrides:
DoTaskOnStartEditor in class EditorModel
See Also:
com.plumtree.uiinfrastructure.editor.EditorModel#DoTaskOnStartEditor(_htFormData)

IsForCommunity

public boolean IsForCommunity()
Specified by:
IsForCommunity in interface IPortletModelRO

GetFolderID

public int GetFolderID()
Description copied from class: ObjEditorModel
Returns the Folder ID in which the Object will be saved.

Specified by:
GetFolderID in interface IPortletModelRO
Overrides:
GetFolderID in class ObjEditorModel
Returns:
int

GetPortletType

public int GetPortletType()
Specified by:
GetPortletType in interface IPortletModelRO

GetName

public java.lang.String GetName()
Description copied from class: EditorModel
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorModel
Returns:
String
See Also:
IMVCObject.GetName()

GetPMode

public int GetPMode()
Returns the nPMode.

Specified by:
GetPMode in interface IPortletModelRO
Returns:
int

GetPortletSize

public int GetPortletSize()
Description copied from interface: IPortletModelRO
Returns the Portlet's visual size. See IPTGadget for more info.

Specified by:
GetPortletSize in interface IPortletModelRO
Returns:

GetProviderCLSID

public java.lang.String GetProviderCLSID()
Specified by:
GetProviderCLSID in interface IPortletModelRO

GetWebService

public IPTWebService GetWebService()
Specified by:
GetWebService in interface IPortletModelRO

IsTemplate

public boolean IsTemplate()
Specified by:
IsTemplate in interface IPortletModelRO

IsMandatory

public boolean IsMandatory()
Specified by:
IsMandatory in interface IPortletModelRO

PreStorePSubModels

public void PreStorePSubModels()

RegisterPPage

public void RegisterPPage(java.lang.String strDPName)
This method is used to register a new PPluginDP with this WebService main model. This is done so that plugin pages can be hidden and shown automatically depending on the PMODE.


RegisterPSubModel

public void RegisterPSubModel(java.lang.String strPluginModelStorageName)
This method is used to register a new submodel with this WebService main model. This is done so that submodels can have access to the Remote Server base URL which is necessary for them to display. All submodels that are registered must support the IPSubModel interface.


SavePage

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

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

SetEditedObject

public void SetEditedObject(IPTGadget ptPortlet)
Reset the portlet object we are editing to this new one. This will require some special processing as some of our framework needs to be updated along with our own submodels. Note* This call can only be called from CREATE mode and will do nothing if called in any other mode.


SetMemberVariablesFromQS

public void SetMemberVariablesFromQS(XPHashtable _htFormData)
Description copied from class: ObjEditorModel
Helper method for the StartEditor method. Fill out the member variables with data from QS.

Overrides:
SetMemberVariablesFromQS in class ObjEditorModel
See Also:
ObjEditorModel.SetMemberVariablesFromQS(XPHashtable)

SetPMode

public void SetPMode(int nPMode)
Sets the nPMode.

Parameters:
nPMode - The nPMode to set

UpdatePSubModels

public void UpdatePSubModels()

UpdatePages

public void UpdatePages()

CreateObjectFromTemplate

public IPTGadget CreateObjectFromTemplate(int nObjectIDOfTemplate)
If this editor is invoked from a template - this function is used to create the m_ptObject from a template.


GetCreatorClassID

public int GetCreatorClassID()
Returns the creatorClassID.

Returns:
int

GetCreatorID

public int GetCreatorID()
Returns the creatorID.

Returns:
int

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

CheckEditorAccess

protected boolean CheckEditorAccess(XPHashtable _htFormData)
Helper method to check the current user rights to this Object Editor.

Overrides:
CheckEditorAccess in class ObjEditorModel
Parameters:
_htFormData - Form data
Returns:
boolean



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