com.silverpeas.directory.control
Class DirectorySessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by com.silverpeas.directory.control.DirectorySessionController
All Implemented Interfaces:
ComponentSessionController

public class DirectorySessionController
extends AbstractComponentSessionController

Author:
Nabil Bensalem

Field Summary
static int DIRECTORY_COMMON
           
static int DIRECTORY_DEFAULT
           
static int DIRECTORY_DOMAIN
           
static int DIRECTORY_GROUP
           
static int DIRECTORY_MINE
           
static int DIRECTORY_OTHER
           
static int DIRECTORY_SPACE
           
static String SORT_ALPHA
           
static String SORT_NEWEST
           
static String SORT_PERTINENCE
           
static String VIEW_ALL
           
static String VIEW_CONNECTED
           
static String VIEW_QUERY
           
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
DirectorySessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
          Standard Session Controller Constructeur
 
Method Summary
 DirectoryItemList getAllContactsOfUser(String userId)
           
 DirectoryItemList getAllUsers()
          get All Users
 DirectoryItemList getAllUsersByDomain(String domainId)
          return All user of Domain Id="domainId"
 DirectoryItemList getAllUsersByDomains(List<String> domainIds)
           
 DirectoryItemList getAllUsersByGroup(String groupId)
          get all User of the Group who has Id="groupId"
 DirectoryItemList getAllUsersByGroups(List<String> groupIds)
          get all Users of the Groups which Id is in "groupIds"
 DirectoryItemList getAllUsersBySpace(String spaceId)
          return All users of Space who has Id="spaceId"
 DirectoryItemList getCommonContacts(String userId)
           
 UserDetail getCommonUserDetail()
           
 DirectoryItemList getConnectedUsers()
           
 int getCurrentDirectory()
           
 List<Domain> getCurrentDomains()
           
 List<Group> getCurrentGroups()
           
 String getCurrentQuery()
           
 String getCurrentSort()
           
 SpaceInstLight getCurrentSpace()
           
 String getCurrentView()
           
 int getElementsByPage()
           
 List<UserFragmentVO> getFragments(DirectoryItemList itemsToDisplay)
           
 DirectoryItemList getLastListOfAllUsers()
          get all User "we keep the last list of All users"
 DirectoryItemList getLastListOfUsersCalled()
          get the last list of users called "keep the session"
 UserDetail getOtherUserDetail()
           
 UserFull getUserFul(String userId)
           
 DirectoryItemList getUsersByIndex(String index)
          get all Users that their Last Name begin with 'Index'
 DirectoryItemList getUsersByQuery(String query, boolean globalSearch)
          get all User that their lastname or first name like "Key"
 void mergeUsersIntoDirectoryItemList(UserDetail[] users, DirectoryItemList directoryItems)
          Merges given user list into the specified directory list of items.
 void sendMessage(String compoId, String txtTitle, String txtMessage, UserRecipient[] selectedUsers)
           
 void setCurrentQuery(String currentQuery)
           
 void setCurrentSort(String sort)
           
 void setCurrentView(String currentView)
           
 void sort(String sort)
           
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW_ALL

public static final String VIEW_ALL
See Also:
Constant Field Values

VIEW_CONNECTED

public static final String VIEW_CONNECTED
See Also:
Constant Field Values

VIEW_QUERY

public static final String VIEW_QUERY
See Also:
Constant Field Values

DIRECTORY_DEFAULT

public static final int DIRECTORY_DEFAULT
See Also:
Constant Field Values

DIRECTORY_MINE

public static final int DIRECTORY_MINE
See Also:
Constant Field Values

DIRECTORY_COMMON

public static final int DIRECTORY_COMMON
See Also:
Constant Field Values

DIRECTORY_OTHER

public static final int DIRECTORY_OTHER
See Also:
Constant Field Values

DIRECTORY_GROUP

public static final int DIRECTORY_GROUP
See Also:
Constant Field Values

DIRECTORY_DOMAIN

public static final int DIRECTORY_DOMAIN
See Also:
Constant Field Values

DIRECTORY_SPACE

public static final int DIRECTORY_SPACE
See Also:
Constant Field Values

SORT_ALPHA

public static final String SORT_ALPHA
See Also:
Constant Field Values

SORT_NEWEST

public static final String SORT_NEWEST
See Also:
Constant Field Values

SORT_PERTINENCE

public static final String SORT_PERTINENCE
See Also:
Constant Field Values
Constructor Detail

DirectorySessionController

public DirectorySessionController(MainSessionController mainSessionCtrl,
                                  ComponentContext componentContext)
Standard Session Controller Constructeur

Parameters:
mainSessionCtrl - The user's profile
componentContext - The component's profile
See Also:
Method Detail

getElementsByPage

public int getElementsByPage()

getAllUsers

public DirectoryItemList getAllUsers()
get All Users

See Also:

getUsersByIndex

public DirectoryItemList getUsersByIndex(String index)
get all Users that their Last Name begin with 'Index'

Parameters:
index:Alphabetical - Index like A,B,C,E......
See Also:

getUsersByQuery

public DirectoryItemList getUsersByQuery(String query,
                                         boolean globalSearch)
                                  throws DirectoryException
get all User that their lastname or first name like "Key"

Parameters:
query - the search query
globalSearch - true if it's a search outside directory (direct from URL)
Throws:
DirectoryException
See Also:

getAllUsersByGroup

public DirectoryItemList getAllUsersByGroup(String groupId)
get all User of the Group who has Id="groupId"

Parameters:
groupId:the - ID of group
See Also:

getAllUsersByGroups

public DirectoryItemList getAllUsersByGroups(List<String> groupIds)
get all Users of the Groups which Id is in "groupIds"

Parameters:
groupIds:a - list of groups' ids
See Also:

getLastListOfAllUsers

public DirectoryItemList getLastListOfAllUsers()
get all User "we keep the last list of All users"

See Also:

getLastListOfUsersCalled

public DirectoryItemList getLastListOfUsersCalled()
get the last list of users called "keep the session"

See Also:

getAllUsersBySpace

public DirectoryItemList getAllUsersBySpace(String spaceId)
return All users of Space who has Id="spaceId"

Parameters:
spaceId:the - ID of Space
See Also:

mergeUsersIntoDirectoryItemList

public void mergeUsersIntoDirectoryItemList(UserDetail[] users,
                                            DirectoryItemList directoryItems)
Merges given user list into the specified directory list of items. For each given user, if no associated user item exists into directoryItems it is added to the directoryItems. If it does already exist, nothing is done.

Parameters:
users - the users to add into directoryItems.
directoryItems - the list of directory items that will be filled.

getAllUsersByDomain

public DirectoryItemList getAllUsersByDomain(String domainId)
return All user of Domain Id="domainId"

Parameters:
domainId:the - ID of Domain
See Also:

getAllUsersByDomains

public DirectoryItemList getAllUsersByDomains(List<String> domainIds)

getAllContactsOfUser

public DirectoryItemList getAllContactsOfUser(String userId)

getCommonContacts

public DirectoryItemList getCommonContacts(String userId)

getUserFul

public UserFull getUserFul(String userId)

sendMessage

public void sendMessage(String compoId,
                        String txtTitle,
                        String txtMessage,
                        UserRecipient[] selectedUsers)
                 throws NotificationManagerException
Parameters:
compoId -
txtTitle -
txtMessage -
selectedUsers -
Throws:
NotificationManagerException

setCurrentView

public void setCurrentView(String currentView)

getCurrentView

public String getCurrentView()

getConnectedUsers

public DirectoryItemList getConnectedUsers()

getFragments

public List<UserFragmentVO> getFragments(DirectoryItemList itemsToDisplay)

getCurrentDirectory

public int getCurrentDirectory()

getCommonUserDetail

public UserDetail getCommonUserDetail()

getOtherUserDetail

public UserDetail getOtherUserDetail()

getCurrentGroups

public List<Group> getCurrentGroups()

getCurrentDomains

public List<Domain> getCurrentDomains()

getCurrentSpace

public SpaceInstLight getCurrentSpace()

setCurrentQuery

public void setCurrentQuery(String currentQuery)

getCurrentQuery

public String getCurrentQuery()

getCurrentSort

public String getCurrentSort()

setCurrentSort

public void setCurrentSort(String sort)

sort

public void sort(String sort)


Copyright © 2016 Silverpeas. All Rights Reserved.