Class DirectorySessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.web.directory.control.DirectorySessionController
-
- All Implemented Interfaces:
Serializable
,ComponentSessionController
,SessionCloseable
public class DirectorySessionController extends AbstractComponentSessionController
- Author:
- Nabil Bensalem
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DIRECTORY_COMMON
Display only the contacts that are common to the current user and to another user.static int
DIRECTORY_COMPONENT
static int
DIRECTORY_CONTACTS
static int
DIRECTORY_DEFAULT
By default, display all users.static int
DIRECTORY_DOMAIN
Display all the users of a given domain.static int
DIRECTORY_GROUP
Display all the users of a given group.static int
DIRECTORY_MINE
Display only the contacts of the current user.static int
DIRECTORY_OTHER
Display only the contacts of another user.static int
DIRECTORY_SPACE
Display all the users that can access a given space.static String
SORT_ALPHA
static String
SORT_NEWEST
static String
SORT_PERTINENCE
static String
VIEW_ALL
static String
VIEW_CONNECTED
-
Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
context
-
-
Constructor Summary
Constructors Constructor Description DirectorySessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
-
Method Summary
-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance
-
-
-
-
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
-
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
-
DIRECTORY_DEFAULT
public static final int DIRECTORY_DEFAULT
By default, display all users.- See Also:
- Constant Field Values
-
DIRECTORY_MINE
public static final int DIRECTORY_MINE
Display only the contacts of the current user.- See Also:
- Constant Field Values
-
DIRECTORY_COMMON
public static final int DIRECTORY_COMMON
Display only the contacts that are common to the current user and to another user.- See Also:
- Constant Field Values
-
DIRECTORY_OTHER
public static final int DIRECTORY_OTHER
Display only the contacts of another user.- See Also:
- Constant Field Values
-
DIRECTORY_GROUP
public static final int DIRECTORY_GROUP
Display all the users of a given group.- See Also:
- Constant Field Values
-
DIRECTORY_DOMAIN
public static final int DIRECTORY_DOMAIN
Display all the users of a given domain.- See Also:
- Constant Field Values
-
DIRECTORY_SPACE
public static final int DIRECTORY_SPACE
Display all the users that can access a given space.- See Also:
- Constant Field Values
-
DIRECTORY_CONTACTS
public static final int DIRECTORY_CONTACTS
- See Also:
- Constant Field Values
-
DIRECTORY_COMPONENT
public static final int DIRECTORY_COMPONENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DirectorySessionController
public DirectorySessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
-
-
Method Detail
-
getMemberPage
public PaginationPage getMemberPage()
-
setMemberPage
public void setMemberPage(PaginationPage memberPage)
-
getAllUsers
public DirectoryItemList getAllUsers()
get All Users
-
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......
-
getUsersByQuery
public DirectoryItemList getUsersByQuery(QueryDescription queryDescription, boolean globalSearch) throws DirectoryException
get all users corresponding from the search request.- Parameters:
queryDescription
- the search requestglobalSearch
- true if it's a search outside directory (direct from URL)- Throws:
DirectoryException
- if an error occurs while searching users.
-
getAllUsersByGroup
public DirectoryItemList getAllUsersByGroup(String groupId)
get all User of the Group who has Id="groupId"- Parameters:
groupId
- :the ID of group
-
getAllUsersByGroups
public DirectoryItemList getAllUsersByGroups(List<String> groupIds, String componentId)
get all Users of the Groups which Id is in "groupIds"- Parameters:
groupIds
- :a list of groups' ids
-
getUsersOfSources
public DirectoryItemList getUsersOfSources()
-
removeUserFromLists
public void removeUserFromLists(User userToRemove)
-
getLastListOfAllUsers
public DirectoryItemList getLastListOfAllUsers()
get all User "we keep the last list of All users"
-
getLastListOfUsersCalled
public DirectoryItemList getLastListOfUsersCalled()
get the last list of users called "keep the session"
-
getAllUsersOfSpaceTree
public DirectoryItemList getAllUsersOfSpaceTree(String spaceId)
Gets all users specified at space level roles of given space and of component instances of space and its sub-spaces.- Parameters:
spaceId
- the unique identifier of a space.
-
getOnlyUsersOfSpace
public DirectoryItemList getOnlyUsersOfSpace(String spaceId)
Gets all users specified at space level roles of given space without taking care of component instances of the space and its sub-spaces.- Parameters:
spaceId
- the unique identifier of a space.
-
mergeUsersIntoDirectoryItemList
public void mergeUsersIntoDirectoryItemList(User[] 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.
-
mergeUserItemsIntoDirectoryItemList
public void mergeUserItemsIntoDirectoryItemList(DirectoryItemList userItems, DirectoryItemList directoryItems)
-
getAllUsersByDomains
public DirectoryItemList getAllUsersByDomains()
return All users of current domains
-
getAllContactsOfUser
public DirectoryItemList getAllContactsOfUser(String userId)
-
getCommonContacts
public DirectoryItemList getCommonContacts(String userId)
-
sendMessage
public void sendMessage(String compoId, String txtTitle, String txtMessage, UserRecipient[] selectedUsers) throws NotificationException
- Throws:
NotificationException
-
getCurrentView
public String getCurrentView()
-
setCurrentView
public void setCurrentView(String currentView)
-
getConnectedUsers
public DirectoryItemList getConnectedUsers()
-
getFragments
public SilverpeasList<UserFragmentVO> getFragments(SilverpeasList<DirectoryItem> items)
-
getCurrentDirectory
public int getCurrentDirectory()
-
setCurrentDirectory
public void setCurrentDirectory(int currentDirectory)
-
getCommonUserDetail
public UserDetail getCommonUserDetail()
-
getOtherUserDetail
public UserDetail getOtherUserDetail()
-
getCurrentSpace
public SpaceInstLight getCurrentSpace()
-
getCurrentQuery
public String getCurrentQuery()
-
setCurrentQuery
public void setCurrentQuery(String currentQuery)
-
getCurrentSort
public String getCurrentSort()
-
setCurrentSort
public void setCurrentSort(String sort)
-
sort
public void sort(String sort)
-
getExtraForm
public Form getExtraForm()
-
getExtraFormContext
public PagesContext getExtraFormContext()
-
buildSimpleQuery
public QueryDescription buildSimpleQuery(String query, boolean globalSearch)
-
buildQuery
public QueryDescription buildQuery(List<org.apache.commons.fileupload.FileItem> items, boolean globalSearch)
-
clearSearchCriteria
public void clearSearchCriteria()
-
isQuickUserSelectionEnabled
public boolean isQuickUserSelectionEnabled()
-
setUseQuickUserSelection
public void setUseQuickUserSelection(String value)
-
getContacts
public DirectoryItemList getContacts(String componentId, boolean componentScope)
Gets contacts of a given 'yellowPages' component.- Returns:
- the list of complete contact of component.
-
getCurrentComponent
public SilverpeasComponentInstance getCurrentComponent()
-
initSources
public void initSources(boolean domainsRestriction)
-
setSelectedSource
public void setSelectedSource(String id)
-
getDirectorySources
public List<DirectorySource> getDirectorySources()
-
setDoNotUseContacts
public void setDoNotUseContacts(boolean doNotUse)
-
setReferer
public void setReferer(String referer)
-
getReferer
public String getReferer()
-
isExportEnabled
public boolean isExportEnabled()
-
export
public ExportCSVBuilder export() throws PublicationTemplateException, FormException, AdminException
-
-