com.plumtree.portalpages.admin.editors.authsource
Class AuthSourceModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
          extended by com.plumtree.portalpages.admin.editors.authsource.AuthSourceModel
All Implemented Interfaces:
IAuthSourceModelRO, PropertyValidatorOwner, IDescriptionModelRO, IMigrationModelRO, IObjEditorModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel
Direct Known Subclasses:
RemoteAuthSourceModel

public abstract class AuthSourceModel
extends ObjEditorModel
implements IAuthSourceModelRO, PropertyValidatorOwner

Author:
OlegS

Field Summary
protected  XPArrayList m_ActionData
           
protected  boolean m_bImportCrossASMemberships
           
 XPStringBuilder m_errors
           
protected  XPArrayList m_groupsOrder
           
protected  int m_iddefFolder
           
 java.lang.String m_lastTreeSpaceId_ADMINFOLDERTREESPACE
           
 java.lang.String m_lastTreeSpaceId_USERGROUPTREESPACE
           
 int m_nAction
           
protected  int m_nReenabled
           
protected  java.lang.Object m_originalPassword
           
protected  boolean m_sameTimeCreatedAndModified
           
protected  java.lang.String m_sCategory
           
 int m_templateSelected
           
protected static java.lang.String templatesDir
           
protected static java.lang.String templatesPatttern
           
 
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
m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
AuthSourceModel()
          Creates a new AuthSourceModel object.
 
Method Summary
 java.lang.Object[][] allGroups(boolean doFilterByAuthSource)
           
 AActivitySpace asOwner()
           
 java.lang.Object[][] authPartners()
           
 int bulkCopyNum()
           
protected  void ClearActionData()
           
 void copyDataFromAuthSourceToPropValues(XPArrayList m_props, IPTAuthSource ptAS, int idx_start)
           
 void copyDataFromPropValuesToAuthSource(XPArrayList m_props, IPTAuthSource ptAS, int idx_start)
           
protected  void CreateDisabledGroupFolder(IPTAuthSource ptAS)
          Creates a disabled group folder and associated with the given auth source.
 java.lang.Object[][] defaultProfiles()
           
 int deferredGroupFolderID()
           
 int deletedUserFolderID()
           
 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 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.
protected  void ExtractAndSaveDefaultProfiles(XPHashtable _htFormData)
           
protected  void ExtractCheckboxes(java.lang.String[] ids)
           
protected  void ExtractDisabledCheckboxes(java.lang.String[] ids)
           
protected  boolean ExtractOneBoolElement(java.lang.Object o)
           
 java.lang.String ExtractOneElement(java.lang.Object o)
           
protected  void ExtractSyncCheckboxes(java.lang.String[] ids)
           
 java.lang.Object[][] fullySyncedGroups()
           
protected  int GetAction()
           
 java.lang.String GetAuthSourceCategory()
          Returns the Auth Source's category
protected  int GetDefaultFolderId()
           
protected  int GetDefaultProfileId()
           
 java.lang.String GetEmptyListInstructions()
           
 java.lang.String GetEmptyListMainMessage()
           
 XPStringBuilder GetErrorString()
           
 int GetNumDisabledUsers()
           
 int GetNumReenabledUsers()
           
 int groupsOrder(int j)
           
 boolean ImportCrossASMemberships()
          Indicates whether or not the underlying Authentication Source should resolve cross authentication source memberships.
 void Init(AActivitySpace parent)
          Inits the Model with the IPTSession.
 java.lang.String joinLists(java.lang.String lst1, java.lang.String lst2)
           
 java.lang.String lastTreeSpaceId_ADMINFOLDERTREESPACE()
           
 java.lang.String lastTreeSpaceId_USERGROUPTREESPACE()
           
 java.lang.String listOfAlienGroups()
          Helper function
 java.lang.String listOfMappedGroups()
          Helper function
 java.lang.String listOfNewGroupsFolder()
          Helper function
 java.lang.String listOfSyncGroups()
          Helper function
 java.lang.String listOfUnmappedGroups()
          Helper function
 java.lang.Object[][] mappedGroups(int reserveTopRows)
           
 int newGroupFolderId()
           
 int numTemplates()
           
 void onAddAllSyncGroups()
           
 void onAddGroup(int id)
          Action to be taken when a group is added to the list
 void onAddSyncGroup(int id)
           
 void onChangeCheckboxForSyncGroup(int k)
           
 void onChangeFolder(int id, int folderid)
          Action take when the selected folder is changed
 void onChangeFolderForNewGroups(int folderid)
           
 void onChangeFolderForSyncGroup(int id, int folderid)
          Event handler for when the folder is changed for a sync group
 void onMoveGroup(int id, int dir)
          Action to be taken when a group is moved in the list
 void onPossibleChangeOfSyncMode(int oldmode)
           
 void onReenableUsers()
          Action to be taken when a group is removed from the list
 void onRemoveGroup()
          Action to be taken when a group is removed from the list
 void onRemoveSyncGroup()
           
protected static int removeIdFromAction(int action)
           
 boolean sameTimeCreatedAndModified()
           
protected  void saveGroups(java.lang.Object[][] groups)
          Save the information about he selected groups to the model class
protected  int SaveMainPage(XPHashtable _htFormData)
           
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
protected  int SavePage2(XPHashtable _htFormData)
           
protected  int SavePage3(XPHashtable _htFormData)
           
protected  int SavePage4(XPHashtable _htFormData)
           
 int selectedPartnerId()
           
 int selectedTemplate()
           
protected  void SetDefaultFolderId(int id)
           
protected  void SetInvalid(java.lang.String s)
           
 int supportSyncMode()
           
 int syncType()
           
 IXPPropertyBag templateContents(int index)
           
 java.lang.String templateName(int index)
           
 java.lang.Object[][] unmappedGroups()
           
 java.lang.String userFolderPathIfSingle()
           
protected  java.lang.String userGroupName(int id)
           
protected  void validateAllProperties()
           
protected  void validatePage1Properties()
           
protected  void validatePage2Properties()
           
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccess, CheckEditorAccessAndStart, CheckFolderType, DisableSecurity, Finish, ForceSaveInFolder, GetClassID, GetFolderID, GetFolderName, GetIsSysAdmin, GetMigrationStatus, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession, InitIsSysAdminFlag, InitPTObject, IsDescriptionDisabled, IsMigrationApproved, SaveMigrationStatus, SetDisableDescription, SetEditorToReadOnly, SetMemberVariablesFromQS, SetMigrationStatus, StartKeywords, StartLocNamesList, StartMigrationHistory, StartObjectProp, StartSecurityList, StoreObject
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, CleanupAllData, CleanupTempData, Create, DoTaskOnChangePage, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetHideLeftNav, GetIsEditorReadOnly, GetName, 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, GetHideLeftNav, GetIsEditorReadOnly
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IMVCObject
GetName
 

Field Detail

templatesDir

protected static final java.lang.String templatesDir
See Also:
Constant Field Values

templatesPatttern

protected static final java.lang.String templatesPatttern

m_lastTreeSpaceId_ADMINFOLDERTREESPACE

public java.lang.String m_lastTreeSpaceId_ADMINFOLDERTREESPACE

m_lastTreeSpaceId_USERGROUPTREESPACE

public java.lang.String m_lastTreeSpaceId_USERGROUPTREESPACE

m_errors

public XPStringBuilder m_errors

m_nAction

public int m_nAction

m_templateSelected

public int m_templateSelected

m_sCategory

protected java.lang.String m_sCategory

m_ActionData

protected XPArrayList m_ActionData

m_groupsOrder

protected XPArrayList m_groupsOrder

m_iddefFolder

protected int m_iddefFolder

m_originalPassword

protected java.lang.Object m_originalPassword

m_sameTimeCreatedAndModified

protected boolean m_sameTimeCreatedAndModified

m_nReenabled

protected int m_nReenabled

m_bImportCrossASMemberships

protected boolean m_bImportCrossASMemberships
Constructor Detail

AuthSourceModel

public AuthSourceModel()
Creates a new AuthSourceModel object.

Method Detail

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

GetErrorString

public XPStringBuilder GetErrorString()
Specified by:
GetErrorString in interface PropertyValidatorOwner
Returns:

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

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

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
Parameters:
_htFormData -

CreateDisabledGroupFolder

protected void CreateDisabledGroupFolder(IPTAuthSource ptAS)
Creates a disabled group folder and associated with the given auth source.

Parameters:
ptAS - - IPTAuthSource to associate the disabled folder with...

ExtractOneElement

public java.lang.String ExtractOneElement(java.lang.Object o)
Parameters:
o -
Returns:

GetEmptyListInstructions

public java.lang.String GetEmptyListInstructions()
Specified by:
GetEmptyListInstructions in interface IAuthSourceModelRO
Returns:

GetEmptyListMainMessage

public java.lang.String GetEmptyListMainMessage()
Specified by:
GetEmptyListMainMessage in interface IAuthSourceModelRO
Returns:

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
Parameters:
_sPageName -
_htFormData -
Returns:

validateAllProperties

protected void validateAllProperties()

validatePage1Properties

protected void validatePage1Properties()

validatePage2Properties

protected void validatePage2Properties()

allGroups

public java.lang.Object[][] allGroups(boolean doFilterByAuthSource)
Specified by:
allGroups in interface IAuthSourceModelRO
Parameters:
doFilterByAuthSource -
Returns:

asOwner

public AActivitySpace asOwner()
Specified by:
asOwner in interface PropertyValidatorOwner
Returns:

authPartners

public java.lang.Object[][] authPartners()
Specified by:
authPartners in interface IAuthSourceModelRO
Returns:

bulkCopyNum

public int bulkCopyNum()
Specified by:
bulkCopyNum in interface IAuthSourceModelRO
Returns:

copyDataFromAuthSourceToPropValues

public void copyDataFromAuthSourceToPropValues(XPArrayList m_props,
                                               IPTAuthSource ptAS,
                                               int idx_start)
Parameters:
m_props -
ptAS -
idx_start -

SetInvalid

protected void SetInvalid(java.lang.String s)

copyDataFromPropValuesToAuthSource

public void copyDataFromPropValuesToAuthSource(XPArrayList m_props,
                                               IPTAuthSource ptAS,
                                               int idx_start)
Parameters:
m_props -
ptAS -
idx_start -

GetAuthSourceCategory

public java.lang.String GetAuthSourceCategory()
Returns the Auth Source's category

Specified by:
GetAuthSourceCategory in interface IAuthSourceModelRO
Returns:

defaultProfiles

public java.lang.Object[][] defaultProfiles()
Specified by:
defaultProfiles in interface IAuthSourceModelRO
Returns:

deferredGroupFolderID

public int deferredGroupFolderID()
Specified by:
deferredGroupFolderID in interface IAuthSourceModelRO
Returns:

deletedUserFolderID

public int deletedUserFolderID()
Specified by:
deletedUserFolderID in interface IAuthSourceModelRO
Returns:

fullySyncedGroups

public java.lang.Object[][] fullySyncedGroups()
Specified by:
fullySyncedGroups in interface IAuthSourceModelRO
Returns:

groupsOrder

public int groupsOrder(int j)
Specified by:
groupsOrder in interface IAuthSourceModelRO
Parameters:
j -
Returns:

lastTreeSpaceId_ADMINFOLDERTREESPACE

public java.lang.String lastTreeSpaceId_ADMINFOLDERTREESPACE()
Specified by:
lastTreeSpaceId_ADMINFOLDERTREESPACE in interface IAuthSourceModelRO
Returns:

lastTreeSpaceId_USERGROUPTREESPACE

public java.lang.String lastTreeSpaceId_USERGROUPTREESPACE()
Specified by:
lastTreeSpaceId_USERGROUPTREESPACE in interface IAuthSourceModelRO
Returns:

listOfMappedGroups

public java.lang.String listOfMappedGroups()
Helper function

Specified by:
listOfMappedGroups in interface IAuthSourceModelRO
Returns:

listOfSyncGroups

public java.lang.String listOfSyncGroups()
Helper function

Specified by:
listOfSyncGroups in interface IAuthSourceModelRO
Returns:

listOfUnmappedGroups

public java.lang.String listOfUnmappedGroups()
Helper function

Specified by:
listOfUnmappedGroups in interface IAuthSourceModelRO
Returns:

listOfAlienGroups

public java.lang.String listOfAlienGroups()
Helper function

Specified by:
listOfAlienGroups in interface IAuthSourceModelRO
Returns:

listOfNewGroupsFolder

public java.lang.String listOfNewGroupsFolder()
Helper function

Specified by:
listOfNewGroupsFolder in interface IAuthSourceModelRO
Returns:

joinLists

public java.lang.String joinLists(java.lang.String lst1,
                                  java.lang.String lst2)
Specified by:
joinLists in interface IAuthSourceModelRO
Returns:

mappedGroups

public java.lang.Object[][] mappedGroups(int reserveTopRows)
Specified by:
mappedGroups in interface IAuthSourceModelRO
Parameters:
reserveTopRows -
Returns:

newGroupFolderId

public int newGroupFolderId()
Specified by:
newGroupFolderId in interface IAuthSourceModelRO
Parameters:
_fixDeletedfolder - - if the folderid no longer exists, replace the id with a default folder
Returns:

numTemplates

public int numTemplates()
Specified by:
numTemplates in interface IAuthSourceModelRO
Returns:

selectedPartnerId

public int selectedPartnerId()
Specified by:
selectedPartnerId in interface IAuthSourceModelRO
Returns:

selectedTemplate

public int selectedTemplate()
Specified by:
selectedTemplate in interface IAuthSourceModelRO
Returns:

supportSyncMode

public int supportSyncMode()
Specified by:
supportSyncMode in interface IAuthSourceModelRO
Returns:

syncType

public int syncType()
Specified by:
syncType in interface IAuthSourceModelRO
Returns:

templateContents

public IXPPropertyBag templateContents(int index)
Specified by:
templateContents in interface IAuthSourceModelRO
Parameters:
index -
Returns:

templateName

public java.lang.String templateName(int index)
Specified by:
templateName in interface IAuthSourceModelRO
Parameters:
index -
Returns:

unmappedGroups

public java.lang.Object[][] unmappedGroups()
Specified by:
unmappedGroups in interface IAuthSourceModelRO
Returns:

SaveMainPage

protected int SaveMainPage(XPHashtable _htFormData)
Parameters:
_htFormData -
Returns:

SavePage2

protected int SavePage2(XPHashtable _htFormData)
Parameters:
_htFormData -
Returns:

SavePage3

protected int SavePage3(XPHashtable _htFormData)
Parameters:
_htFormData -
Returns:

SavePage4

protected int SavePage4(XPHashtable _htFormData)
Parameters:
_htFormData -
Returns:

GetAction

protected int GetAction()
Returns:

SetDefaultFolderId

protected void SetDefaultFolderId(int id)
Parameters:
id -

GetDefaultFolderId

protected int GetDefaultFolderId()
Returns:

GetDefaultProfileId

protected int GetDefaultProfileId()

ClearActionData

protected void ClearActionData()

ExtractCheckboxes

protected void ExtractCheckboxes(java.lang.String[] ids)
Parameters:
ids -

ExtractDisabledCheckboxes

protected void ExtractDisabledCheckboxes(java.lang.String[] ids)
Parameters:
ids -

ExtractOneBoolElement

protected boolean ExtractOneBoolElement(java.lang.Object o)
Parameters:
o -
Returns:

onAddAllSyncGroups

public void onAddAllSyncGroups()

onAddSyncGroup

public void onAddSyncGroup(int id)
Parameters:
id -

onRemoveSyncGroup

public void onRemoveSyncGroup()

removeIdFromAction

protected static int removeIdFromAction(int action)

ExtractSyncCheckboxes

protected void ExtractSyncCheckboxes(java.lang.String[] ids)
Parameters:
ids -

onAddGroup

public void onAddGroup(int id)
Action to be taken when a group is added to the list

Parameters:
id -

onChangeCheckboxForSyncGroup

public void onChangeCheckboxForSyncGroup(int k)
Parameters:
k -

onChangeFolder

public void onChangeFolder(int id,
                           int folderid)
Action take when the selected folder is changed

Parameters:
id -
folderid -

onChangeFolderForNewGroups

public void onChangeFolderForNewGroups(int folderid)
Parameters:
folderid -

onChangeFolderForSyncGroup

public void onChangeFolderForSyncGroup(int id,
                                       int folderid)
Event handler for when the folder is changed for a sync group

Parameters:
id -
folderid -

onMoveGroup

public void onMoveGroup(int id,
                        int dir)
Action to be taken when a group is moved in the list

Parameters:
id -
dir -

onPossibleChangeOfSyncMode

public void onPossibleChangeOfSyncMode(int oldmode)
Parameters:
oldmode -

onRemoveGroup

public void onRemoveGroup()
Action to be taken when a group is removed from the list


onReenableUsers

public void onReenableUsers()
Action to be taken when a group is removed from the list


GetNumDisabledUsers

public int GetNumDisabledUsers()
Specified by:
GetNumDisabledUsers in interface IAuthSourceModelRO

GetNumReenabledUsers

public int GetNumReenabledUsers()
Specified by:
GetNumReenabledUsers in interface IAuthSourceModelRO

saveGroups

protected void saveGroups(java.lang.Object[][] groups)
Save the information about he selected groups to the model class

Parameters:
groups -

ExtractAndSaveDefaultProfiles

protected void ExtractAndSaveDefaultProfiles(XPHashtable _htFormData)

userFolderPathIfSingle

public java.lang.String userFolderPathIfSingle()
Returns:

userGroupName

protected java.lang.String userGroupName(int id)
Parameters:
id -
Returns:

sameTimeCreatedAndModified

public boolean sameTimeCreatedAndModified()

ImportCrossASMemberships

public boolean ImportCrossASMemberships()
Description copied from interface: IAuthSourceModelRO
Indicates whether or not the underlying Authentication Source should resolve cross authentication source memberships.

Specified by:
ImportCrossASMemberships in interface IAuthSourceModelRO
Returns:
- true if it should, false if the authentication source shouldn't.



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