com.plumtree.portalpages.admin.editors.webservice.plugins
Class PageletParamsMapPluginModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.portalpages.admin.editors.webservice.plugins.PageletParamsMapPluginModel
All Implemented Interfaces:
IWSSubModel, IManagedObject, IModel, IModelRO, IMVCObject

public class PageletParamsMapPluginModel
extends EditorHelperModel
implements IWSSubModel

Author:
rozhang

Field Summary
static java.lang.String INPUTNAME_ADMIN
           
static java.lang.String INPUTNAME_COMM
           
static java.lang.String INPUTNAME_USER
           
protected  XPArrayList m_adminParamDescs
           
protected  XPArrayList m_adminParams
           
protected  XPArrayList m_commParamDescs
           
protected  XPArrayList m_commParams
           
protected  boolean m_hasAdminPrefs
           
protected  boolean m_hasCommunityPrefs
           
protected  boolean m_hasUserPrefs
           
protected  java.lang.String[] m_paramDescriptions
           
protected  java.lang.String[] m_paramNames
           
protected  java.lang.String m_prevPageletId
           
protected  XPArrayList m_userParamDescs
          list with descriptions of parameters mapped to each preference type
protected  XPArrayList m_userParams
          list with names of parameters mapped to each preference type
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
PageletParamsMapPluginModel()
           
 
Method Summary
 void CleanupAllData()
          This method is called when an ActivitySpace is removed from the cache.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
protected  XPArrayList ConvertObjectArrayToList(java.lang.Object[] o)
          Helper function
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskBeforeWSStore()
          Sub models are expected to store themselves to the ptWebService object passed in in InitWSModel during this call.
 void DoTaskOnRemoteServerUpdate(java.lang.String strRemoteServerID, java.lang.String strRemoteServerName, java.lang.String strRemoteServerBaseURL)
          Called when the Remote Server is changed.
 void DoTaskOnWSModeUpdate(int newWSMode)
          Called when the Web Service type is changed.
 java.lang.String GetName()
          Returns the Class name.
 java.lang.String[] GetPageletParameterDescriptions()
          Get supported parameter descriptions
 java.lang.String[] GetPageletParameterNames()
          Get supported parameter names
 java.lang.String GetValidationFunction()
          This returns the name of the client-side validation function that the model wants added to the page-level validation funtion.
 void InitWSModel(IPTWebService ptWebService)
          Initializes the sub-model.
 boolean IsMappedToAdminPrefs(java.lang.String paramName)
          Checks if a parameter is mapped to admin preference
 boolean IsMappedToCommPrefs(java.lang.String paramName)
          Checks if a parameter is mapped to community preference
 boolean IsMappedToUserPrefs(java.lang.String paramName)
          Checks if a parameter is mapped to user preference
 boolean IsUsingNewPagelet()
          Checks if different pagelet was selected inside the webservice editor
 int SaveSection(XPHashtable formData)
          Code to save the section represented by this Model.
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
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
See Also:
Constant Field Values

INPUTNAME_USER

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

INPUTNAME_COMM

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

INPUTNAME_ADMIN

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

m_hasUserPrefs

protected boolean m_hasUserPrefs

m_hasCommunityPrefs

protected boolean m_hasCommunityPrefs

m_hasAdminPrefs

protected boolean m_hasAdminPrefs

m_prevPageletId

protected java.lang.String m_prevPageletId

m_paramNames

protected java.lang.String[] m_paramNames

m_paramDescriptions

protected java.lang.String[] m_paramDescriptions

m_userParams

protected XPArrayList m_userParams
list with names of parameters mapped to each preference type


m_commParams

protected XPArrayList m_commParams

m_adminParams

protected XPArrayList m_adminParams

m_userParamDescs

protected XPArrayList m_userParamDescs
list with descriptions of parameters mapped to each preference type


m_commParamDescs

protected XPArrayList m_commParamDescs

m_adminParamDescs

protected XPArrayList m_adminParamDescs
Constructor Detail

PageletParamsMapPluginModel

public PageletParamsMapPluginModel()
Method Detail

InitWSModel

public void InitWSModel(IPTWebService ptWebService)
Description copied from interface: IWSSubModel
Initializes the sub-model. Provides an opportunity for the submodel to load it's state from the WebService.

Specified by:
InitWSModel in interface IWSSubModel
See Also:
com.plumtree.portalpages.admin.editors.webservice.IWSSubModel#InitWSModel(com.plumtree.server.IPTWebService)

SaveSection

public int SaveSection(XPHashtable formData)
Description copied from class: EditorHelperModel
Code to save the section represented by this Model.

Specified by:
SaveSection in class EditorHelperModel
Parameters:
formData - Form posted data.
Returns:
int Status for server side validation
See Also:
com.plumtree.uiinfrastructure.editor.EditorHelperModel#SaveSection(com.plumtree.openfoundation.util.XPHashtable)

DoTaskBeforeWSStore

public void DoTaskBeforeWSStore()
Description copied from interface: IWSSubModel
Sub models are expected to store themselves to the ptWebService object passed in in InitWSModel during this call.

Specified by:
DoTaskBeforeWSStore in interface IWSSubModel
See Also:
Based on what preference types were mapped to, set/remove edit prefs url as necessary

CleanupTempData

public void CleanupTempData()
Description copied from interface: IModel
This method is called at the end of every HTTP request by the Interpreter. The Interpreter calls AActivitySpace.CleanupTempData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for cleaning up temporary data that is only used for the lifetime of a single request, like DB query results.

Specified by:
CleanupTempData in interface IModel
Overrides:
CleanupTempData in class EditorHelperModel
See Also:
IModel.CleanupTempData()

CleanupAllData

public void CleanupAllData()
Description copied from interface: IModel
This method is called when an ActivitySpace is removed from the cache. The Interpreter calls AActivitySpace.CleanupAllData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for releasing data stored in the server when the activity space is no longer needed, such as search objects that need to be maintained as long as the user is clicking through the search, but should be freed when the space can no longer be used. This can be used to prevent Java references to COM memory from hanging around in the long lived Java heap without cleaning up the underlying COM memory. The Java reference will still stay in the long lived heap until it gets garbage collected (which could be a while), but the COM memory should get released here. This method will not be called if an HTTPSession times out. CleanupTempData will be called before CleanupAllData.

Specified by:
CleanupAllData in interface IModel
Overrides:
CleanupAllData in class EditorHelperModel
See Also:
IModel.CleanupAllData()

IsUsingNewPagelet

public boolean IsUsingNewPagelet()
Checks if different pagelet was selected inside the webservice editor

Returns:

GetPageletParameterNames

public java.lang.String[] GetPageletParameterNames()
Get supported parameter names

Returns:

GetPageletParameterDescriptions

public java.lang.String[] GetPageletParameterDescriptions()
Get supported parameter descriptions

Returns:

IsMappedToUserPrefs

public boolean IsMappedToUserPrefs(java.lang.String paramName)
Checks if a parameter is mapped to user preference

Parameters:
paramName - Name of pagelet parameter
Returns:

IsMappedToCommPrefs

public boolean IsMappedToCommPrefs(java.lang.String paramName)
Checks if a parameter is mapped to community preference

Parameters:
paramName - Name of pagelet parameter
Returns:

IsMappedToAdminPrefs

public boolean IsMappedToAdminPrefs(java.lang.String paramName)
Checks if a parameter is mapped to admin preference

Parameters:
paramName - Name of pagelet parameter
Returns:

ConvertObjectArrayToList

protected XPArrayList ConvertObjectArrayToList(java.lang.Object[] o)
Helper function

Parameters:
o -
Returns:

DoTaskOnRemoteServerUpdate

public void DoTaskOnRemoteServerUpdate(java.lang.String strRemoteServerID,
                                       java.lang.String strRemoteServerName,
                                       java.lang.String strRemoteServerBaseURL)
Description copied from interface: IWSSubModel
Called when the Remote Server is changed. This is mostly used to update the base-url displayed before URL edit boxes.

Specified by:
DoTaskOnRemoteServerUpdate in interface IWSSubModel
See Also:
IWSSubModel.DoTaskOnRemoteServerUpdate(java.lang.String, java.lang.String, java.lang.String)

DoTaskOnWSModeUpdate

public void DoTaskOnWSModeUpdate(int newWSMode)
Description copied from interface: IWSSubModel
Called when the Web Service type is changed.

Specified by:
DoTaskOnWSModeUpdate in interface IWSSubModel
See Also:
IWSSubModel.DoTaskOnWSModeUpdate(int)

GetValidationFunction

public java.lang.String GetValidationFunction()
Description copied from interface: IWSSubModel
This returns the name of the client-side validation function that the model wants added to the page-level validation funtion. Models return null or "" if they don't have a validation function.

Specified by:
GetValidationFunction in interface IWSSubModel
See Also:
IWSSubModel.GetValidationFunction()

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

GetName

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

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



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