Class VCSearchTabControl

java.lang.Object
de.uplanet.lucy.server.auxiliaries.VCSearchTabControl

@VelocityCallable("singleton") public final class VCSearchTabControl extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.ITab
    getTab(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.
    boolean
    isCurrentUserAdmin(de.uplanet.lucy.server.IProcessingContext p_ctx, String p_strCtrlGuid)
    Determines if the current user is an administrator.
    boolean
    Is a user allowed to create his own tabs on the specified control.
    boolean
    Is a user allowed to drag and drop tabs in the list of selected/deselected tabs on the specified control.
    boolean
    isUserAllowedToModifyTab(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.
    removeTab(de.uplanet.lucy.server.IDatabaseProcessingContext p_ctx, String p_strUserGuid, String p_strCtrlGuid, String p_strTabGuid)
    Remove a tab.
    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.
    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.
    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.
    boolean
    showTabs(String p_strCtrlGuid)
    Should tabs be shown or not.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VCSearchTabControl

      public VCSearchTabControl()
      Default constructor.
  • Method Details

    • 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:
      true if he is allowed to create tabs, false otherwise.
    • 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:
      true if he is allowed to drag and drop tabs, false otherwise.
    • showTabs

      public boolean showTabs(String p_strCtrlGuid)
      Should tabs be shown or not.
      Parameters:
      p_strCtrlGuid - The control GUID.
      Returns:
      true if tabs should be shown, false otherwise.
    • 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, false otherwise.
    • 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, false otherwise.
    • 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, false otherwise.
      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.