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

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

public class IntrinsicUserPrefsPluginModel
extends EditorHelperModel
implements IIntrinsicUserPrefsPluginModelRO, IWSSubModel

Store the activity space for the intrinsic portlet preference pages. Even though there is only one prefs plugin model and one prefs plugin view, there are actually three instances of this model in existence. Each of these models will contain information about one preference type, whether it be admin portlet prefs, user portlet prefs, or community portlet prefs.

Author:
josephc

Field Summary
static java.lang.String STR_MVC_CLASS_NAME
          Class name for IntrinsicUserPrefsPluginModel
static int UPPM_PREFMODE_ADMINPREFS
          Admin portlet preferences
static int UPPM_PREFMODE_COMMUNITYPREFS
          Community portlet preferences
static int UPPM_PREFMODE_USERPREFS
          User portlet preferences
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
IntrinsicUserPrefsPluginModel()
           
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskBeforeWSStore()
          This method updates the personalization flag of the web service.
 void DoTaskOnRemoteServerUpdate(java.lang.String strRemoteServerID, java.lang.String strRemoteServerName, java.lang.String strRemoteServerBaseURL)
          Called when the Remote Server is changed.
 void DoTaskOnWSModeUpdate(int nNewWSMode)
          Called when the Web Service type is changed.
 java.lang.String GetName()
          Returns the Class name.
 int GetPrefMode()
          This method checks whether this model is used to set community preferences or user preferences.
 java.lang.String GetPrefsSpace()
          Gets the preference space value for the current type of preference.
 java.lang.String GetTemplatePrefsSpace()
          Gets the preference space value for portlet template admin preferences.
 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.
 int SaveSection(XPHashtable _htFormData)
          Saves the preference spaces.
 void SetPrefMode(int nPrefMode)
          This method specifies whether this model is used to set community preferences or user preferences.
 void SetPrefsSpace(java.lang.String strPrefsSpace)
          Sets the prefs space
 void SetTemplatePrefsSpace(java.lang.String strTemplatePrefsSpace)
          Sets the Template Admin Prefs space
 
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
Class name for IntrinsicUserPrefsPluginModel

See Also:
Constant Field Values

UPPM_PREFMODE_USERPREFS

public static final int UPPM_PREFMODE_USERPREFS
User portlet preferences

See Also:
Constant Field Values

UPPM_PREFMODE_COMMUNITYPREFS

public static final int UPPM_PREFMODE_COMMUNITYPREFS
Community portlet preferences

See Also:
Constant Field Values

UPPM_PREFMODE_ADMINPREFS

public static final int UPPM_PREFMODE_ADMINPREFS
Admin portlet preferences

See Also:
Constant Field Values
Constructor Detail

IntrinsicUserPrefsPluginModel

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

DoTaskBeforeWSStore

public void DoTaskBeforeWSStore()
This method updates the personalization flag of the web service. This model only represents one type of preference, either user prefs, community prefs, or admin prefs. So we just need to check if the text box has a value, then OR the value so that the flag is set. If the text box does not have a valid value, then AND the value so the flag is unset.

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

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

DoTaskOnWSModeUpdate

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

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

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:
IMVCObject.GetName()

GetPrefMode

public int GetPrefMode()
This method checks whether this model is used to set community preferences or user preferences. SetPrefMode can be used to set this when the model is initialized. GetPrefMode can be used to get which mode this model is in.

Specified by:
GetPrefMode in interface IIntrinsicUserPrefsPluginModelRO
Returns:
Preference mode

GetPrefsSpace

public java.lang.String GetPrefsSpace()
Gets the preference space value for the current type of preference.

Specified by:
GetPrefsSpace in interface IIntrinsicUserPrefsPluginModelRO
Returns:
Preference space
See Also:
IIntrinsicUserPrefsPluginModelRO.GetPrefsSpace()

GetTemplatePrefsSpace

public java.lang.String GetTemplatePrefsSpace()
Gets the preference space value for portlet template admin preferences.

Specified by:
GetTemplatePrefsSpace in interface IIntrinsicUserPrefsPluginModelRO
Returns:
Portlet template admin preference space
See Also:
IIntrinsicUserPrefsPluginModelRO.GetTemplatePrefsSpace()

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

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

SaveSection

public int SaveSection(XPHashtable _htFormData)
Saves the preference spaces.

Specified by:
SaveSection in class EditorHelperModel
Parameters:
_htFormData - Form posted data.
Returns:
int Status for server side validation
See Also:
EditorHelperModel.SaveSection(XPHashtable)

SetPrefMode

public void SetPrefMode(int nPrefMode)
This method specifies whether this model is used to set community preferences or user preferences. SetPrefMode can be used to set this when the model is initialized. GetPrefMode can be used to get which mode this model is in.

Parameters:
nPrefMode - Preference mode

SetPrefsSpace

public void SetPrefsSpace(java.lang.String strPrefsSpace)
Sets the prefs space

Parameters:
strPrefsSpace - Activity space for preferences

SetTemplatePrefsSpace

public void SetTemplatePrefsSpace(java.lang.String strTemplatePrefsSpace)
Sets the Template Admin Prefs space

Parameters:
strTemplatePrefsSpace - Activity space for admin template preferences



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