Class VCSearchTabControl
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.VCSearchTabControl
-
@VelocityCallable("singleton") public final class VCSearchTabControl extends Object
-
-
Constructor Summary
Constructors Constructor Description VCSearchTabControl()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.uplanet.lucy.server.search.ITabcreateTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strTabGuid, Map<String,String> p_names, List<String> p_searchConfigInfos, boolean p_bIsOptional, String p_strStyleName)Create a tab instance.List<de.uplanet.lucy.server.search.SearchConfigInfo>getSearchConfigs(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strCtrlGuid, String p_strUserGuid)Get all search configurations for a given control.de.uplanet.lucy.server.search.ITabgetTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, String p_strTabGuid)Get a tab from the profile.List<de.uplanet.lucy.server.search.ITab>getTabs(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid)Get the tabs which are selected.List<de.uplanet.lucy.server.search.ITab>getTabsDeselected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid)Get the tabs which are deselected.List<de.uplanet.lucy.server.search.ITab>getTabsSelected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid)Get the tabs which are selected.Map<ApplicationInfo,List<de.uplanet.lucy.server.search.SearchConfigInfo>>groupByApplications(de.uplanet.lucy.server.IProcessingContext p_ctx, List<de.uplanet.lucy.server.search.SearchConfigInfo> p_searchConfigInfos)Group the search configurations by applications.booleanisCurrentUserAdmin(de.uplanet.lucy.server.IProcessingContext p_ctx, String p_strCtrlGuid)Determines if the current user is an administrator.booleanisUserAllowedToCreateTabs(String p_strCtrlGuid)Is a user allowed to create his own tabs on the specified control.booleanisUserAllowedToDragAndDropTabs(String p_strCtrlGuid)Is a user allowed to drag and drop tabs in the list of selected/deselected tabs on the specified control.booleanisUserAllowedToModifyTab(String p_strUserGuid, de.uplanet.lucy.server.search.ITab p_tab)Determines if a user is allowed to modify a tab.List<de.uplanet.lucy.server.search.SearchConfigInfo>removeSelectedFromAllSearchConfigs(List<de.uplanet.lucy.server.search.SearchConfigInfo> p_selectedSearchConfigs, List<de.uplanet.lucy.server.search.SearchConfigInfo> p_allSearchConfigs)Remove the selected from all search configurations.VCSearchTabControlremoveTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, String p_strTabGuid)Remove a tab.VCSearchTabControlsetTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, de.uplanet.lucy.server.search.Tab p_tab)Store a tab in the profile.VCSearchTabControlsetTabsDeselected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, List<String> p_tabGuids)Set the tabs which are deselected and store it in the profile.VCSearchTabControlsetTabsSelected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, List<String> p_tabGuids)Set the tabs which are selected and store it in the profile.booleanshowTabs(String p_strCtrlGuid)Should tabs be shown or not.
-
-
-
Method Detail
-
groupByApplications
public Map<ApplicationInfo,List<de.uplanet.lucy.server.search.SearchConfigInfo>> groupByApplications(de.uplanet.lucy.server.IProcessingContext p_ctx, List<de.uplanet.lucy.server.search.SearchConfigInfo> p_searchConfigInfos)
Group the search configurations by applications.- Parameters:
p_ctx- The processing context.p_searchConfigInfos- The search configurations.- Returns:
- The map with applications to search configurations.
-
isUserAllowedToCreateTabs
public boolean isUserAllowedToCreateTabs(String p_strCtrlGuid)
Is a user allowed to create his own tabs on the specified control.- Parameters:
p_strCtrlGuid- The control GUID.- Returns:
trueif he is allowed to create tabs,falseotherwise.
-
isUserAllowedToDragAndDropTabs
public boolean isUserAllowedToDragAndDropTabs(String p_strCtrlGuid)
Is a user allowed to drag and drop tabs in the list of selected/deselected tabs on the specified control.- Parameters:
p_strCtrlGuid- The control GUID.- Returns:
trueif he is allowed to drag and drop tabs,falseotherwise.
-
showTabs
public boolean showTabs(String p_strCtrlGuid)
Should tabs be shown or not.- Parameters:
p_strCtrlGuid- The control GUID.- Returns:
trueif tabs should be shown,falseotherwise.
-
isUserAllowedToModifyTab
public boolean isUserAllowedToModifyTab(String p_strUserGuid, de.uplanet.lucy.server.search.ITab p_tab)
Determines if a user is allowed to modify a tab.- Parameters:
p_strUserGuid- The user GUID.p_tab- The tab to modify.- Returns:
true, if the user is allowed to modify the tab,falseotherwise.
-
isCurrentUserAdmin
public boolean isCurrentUserAdmin(de.uplanet.lucy.server.IProcessingContext p_ctx, String p_strCtrlGuid)Determines if the current user is an administrator.- Parameters:
p_ctx- The processing context.p_strCtrlGuid- The control GUID (to receive the app-GUID).- Returns:
true, if the current user is an administrator,falseotherwise.
-
removeTab
public VCSearchTabControl removeTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, String p_strTabGuid)
Remove a tab.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.p_strTabGuid- The tab GUID.- Returns:
- This search profile instance.
-
setTabsSelected
public VCSearchTabControl setTabsSelected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, List<String> p_tabGuids)
Set the tabs which are selected and store it in the profile.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.p_tabGuids- The tab GUIDs to store.- Returns:
- This search profile instance.
-
setTabsDeselected
public VCSearchTabControl setTabsDeselected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, List<String> p_tabGuids)
Set the tabs which are deselected and store it in the profile.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.p_tabGuids- The tab GUIDs to store.- Returns:
- This search profile instance.
-
getTabs
public List<de.uplanet.lucy.server.search.ITab> getTabs(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid)
Get the tabs which are selected.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.- Returns:
- The tabs.
-
getTabsSelected
public List<de.uplanet.lucy.server.search.ITab> getTabsSelected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid)
Get the tabs which are selected.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.- Returns:
- The tabs.
-
getTabsDeselected
public List<de.uplanet.lucy.server.search.ITab> getTabsDeselected(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid)
Get the tabs which are deselected.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.- Returns:
- The tabs.
-
getTab
public de.uplanet.lucy.server.search.ITab getTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, String p_strTabGuid)Get a tab from the profile.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.p_strTabGuid- The tab GUID.- Returns:
- The tab instance created from data stored in the profile.
-
setTab
public VCSearchTabControl setTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, de.uplanet.lucy.server.search.Tab p_tab)
Store a tab in the profile.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strCtrlGuid- The control GUID.p_tab- The tab to store.- Returns:
- This search profile instance.
-
removeSelectedFromAllSearchConfigs
public List<de.uplanet.lucy.server.search.SearchConfigInfo> removeSelectedFromAllSearchConfigs(List<de.uplanet.lucy.server.search.SearchConfigInfo> p_selectedSearchConfigs, List<de.uplanet.lucy.server.search.SearchConfigInfo> p_allSearchConfigs)
Remove the selected from all search configurations.- Parameters:
p_selectedSearchConfigs- The selected search configurations.p_allSearchConfigs- All search configurations.- Returns:
- The list of all search configurations but without the selected ones.
-
createTab
public de.uplanet.lucy.server.search.ITab createTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strTabGuid, Map<String,String> p_names, List<String> p_searchConfigInfos, boolean p_bIsOptional, String p_strStyleName)Create a tab instance.- Parameters:
p_ctx- The processing context.p_strUserGuid- The user GUID.p_strTabGuid- The tab GUID.p_names- The tab-titles in different languages.p_searchConfigInfos- The search configurations which are selected.p_bIsOptional-True, if this tab is optional,falseotherwise.p_strStyleName- The name of the style.- Returns:
- A new tab instance.
-
getSearchConfigs
public List<de.uplanet.lucy.server.search.SearchConfigInfo> getSearchConfigs(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strCtrlGuid, String p_strUserGuid)
Get all search configurations for a given control.- Parameters:
p_ctx- The processing context.p_strCtrlGuid- The control GUID.- Returns:
- A list of found search configuration informations.
-
-