com.plumtree.portalpages.admin.editors.userprofilemanager
Class UsrProfMgrModel

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

public class UsrProfMgrModel
extends ObjEditorModel
implements IUsrProfMgrModelRO, IMigrationModelRO, IDescriptionModelRO

Author:
JHQ, jennifersu This is the main model for the user profile manager. Because the user profile manager encompasses multiple activity spaces and models, this model does not extend any particular model (i.e. CommunityEditorModel). Instead, it calls those models' methods directly. The models called within here are: CommunityEditorModel, PageListModel, and UserInfoPropMapModel

Field Summary
protected  boolean m_bIsSysAdmin
          Flag to know if the current user has system administration activity rights.
protected  IPTSession m_Session
          Server object: Plumtree Session
static int PT_ACCESS_LIST_ENTRY_READWRITE
           
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_nClassID, m_nFolderID, m_nFolderType, m_nObjectID, m_ptObject, m_sFolderName, OBJECT_NAME_TRUNCATE
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
UsrProfMgrModel()
           
 
Method Summary
 void Cancel()
          Implement some code to execute when the user clicks on "Cancel".
protected  boolean CheckActivityRight()
          Helper method to determine activity rights.
 boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
          Code executed when the Editor is starting.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskAfterStore()
          That method contains the code that should be executed just after the object has been stored in the DB.
 void DoTaskBeforeStore()
          That method contains the code that should be executed just before the object is stored in the DB.
 void DoTaskOnChangePage(java.lang.String _sNewSpaceName, java.lang.String _sNewPageName)
          This method can be implemented by classes extending this one.
 void DoTaskOnComeBackFromSubEditor()
          This method will be called when you come back to the main Editor from a sub Editor.
 void Finish()
          Code executed in finish.
 boolean GetIsSysAdmin()
          Returns the value of the m_bIsSysAdmin member variable.
 java.lang.String GetName()
          Returns the Class name.
 void Init(AActivitySpace parent)
          Inits the Model with the IPTSession.
protected  void InitIsSysAdminFlag()
          Helper method to init the isSysAdmin flag.
 boolean IsDescriptionDisabled()
          Returns true if the object description cannot be set/changed from the Editor.
 boolean IsMigrationApproved()
          Returns true if the migration has already been approved for the current object.
 boolean IsPropertiesMapEmpty()
          if the property display string is empty than that means that no properties were mapped to user objects via the global object properties map.
protected  void SaveMigrationStatus(XPHashtable _htFormData)
          Helper method to save the migration status checkbox.
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccess, CheckFolderType, DisableSecurity, ForceSaveInFolder, GetClassID, GetFolderID, GetFolderName, GetMigrationStatus, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession, InitPTObject, SaveMigrationStatus, SetDisableDescription, SetEditorToReadOnly, SetMemberVariablesFromQS, SetMigrationStatus, StartKeywords, StartLocNamesList, StartMigrationHistory, StartObjectProp, StartSecurityList, StoreObject
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
CleanupAllData, CleanupTempData, DoTaskOnStartEditor, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, 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, 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

PT_ACCESS_LIST_ENTRY_READWRITE

public static final int PT_ACCESS_LIST_ENTRY_READWRITE
See Also:
Constant Field Values

m_Session

protected IPTSession m_Session
Server object: Plumtree Session


m_bIsSysAdmin

protected boolean m_bIsSysAdmin
Flag to know if the current user has system administration activity rights. We need it to know when to display the migration checkbox.

Constructor Detail

UsrProfMgrModel

public UsrProfMgrModel()
Method Detail

Cancel

public void Cancel()
Description copied from class: EditorModel
Implement some code to execute when the user clicks on "Cancel".

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

CheckEditorAccessAndStart

public boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
Code executed when the Editor is starting.

Overrides:
CheckEditorAccessAndStart in class ObjEditorModel
Returns:
boolean Is true if the current user has the rights to access this Editor.

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

Finish

public void Finish()
Code executed in finish.

Specified by:
Finish in interface IRepostModel
Overrides:
Finish in class ObjEditorModel

GetIsSysAdmin

public boolean GetIsSysAdmin()
Returns the value of the m_bIsSysAdmin member variable.

Specified by:
GetIsSysAdmin in interface IMigrationModelRO
Overrides:
GetIsSysAdmin in class ObjEditorModel
Returns:
boolean
See Also:
ObjEditorModel.GetIsSysAdmin()

GetName

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

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

Init

public void Init(AActivitySpace parent)
Description copied from class: ObjEditorModel
Inits the Model with the IPTSession.

Specified by:
Init in interface IModel
Overrides:
Init in class ObjEditorModel
Parameters:
parent - the parent Activity Space
See Also:
IModel.Init(AActivitySpace)

IsDescriptionDisabled

public boolean IsDescriptionDisabled()
Returns true if the object description cannot be set/changed from the Editor. This is here mainly because ObjEditor has this method and the locNamesPrimaryNameView uses this to determine whether or not to display the description field and js validation. For our proposes, we will always display the discription field. So this will always return false.

Specified by:
IsDescriptionDisabled in interface IDescriptionModelRO
Overrides:
IsDescriptionDisabled in class ObjEditorModel
Returns:
boolean
See Also:
ObjEditorModel.IsDescriptionDisabled()

IsMigrationApproved

public boolean IsMigrationApproved()
Returns true if the migration has already been approved for the current object.

Specified by:
IsMigrationApproved in interface IMigrationModelRO
Overrides:
IsMigrationApproved in class ObjEditorModel
Returns:
boolean
See Also:
ObjEditorModel.IsMigrationApproved()

SaveMigrationStatus

protected void SaveMigrationStatus(XPHashtable _htFormData)
Helper method to save the migration status checkbox.

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

CheckActivityRight

protected boolean CheckActivityRight()
Helper method to determine activity rights.


InitIsSysAdminFlag

protected void InitIsSysAdminFlag()
Helper method to init the isSysAdmin flag.

Overrides:
InitIsSysAdminFlag in class ObjEditorModel

DoTaskOnChangePage

public void DoTaskOnChangePage(java.lang.String _sNewSpaceName,
                               java.lang.String _sNewPageName)
Description copied from class: EditorModel
This method can be implemented by classes extending this one. It will be executed each time the user changes page on the left navigation menu.

Overrides:
DoTaskOnChangePage in class EditorModel

DoTaskOnComeBackFromSubEditor

public void DoTaskOnComeBackFromSubEditor()
Description copied from class: ObjEditorModel
This method will be called when you come back to the main Editor from a sub Editor.

Overrides:
DoTaskOnComeBackFromSubEditor in class ObjEditorModel

DoTaskAfterStore

public void DoTaskAfterStore()
Description copied from class: EditorModel
That method contains the code that should be executed just after the object has been stored in the DB.

Overrides:
DoTaskAfterStore in class EditorModel

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

IsPropertiesMapEmpty

public boolean IsPropertiesMapEmpty()
if the property display string is empty than that means that no properties were mapped to user objects via the global object properties map.

Returns:
boolean if displaystring is blank.



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