Class PersonalizationHandler


  • @RequestScoped
    public class PersonalizationHandler
    extends Object
    Handles personalization settings, stores them and retrieves them, taking into account priority order.
    • Constructor Detail

      • PersonalizationHandler

        public PersonalizationHandler()
    • Method Detail

      • getPersonalizationForWindow

        public org.codehaus.jettison.json.JSONObject getPersonalizationForWindow​(Window window)
        Returns all the personalization settings in an object keyed by tabid. The current client, org, role and user are taken into account to find the correct personalization entry. If no personalization record is present then null is returned for that specific tab.
        Parameters:
        window - the window for which the personalization settings are to be returned.
        Returns:
        the personalization settings in a json object for a window.
      • getPersonalizationForTab

        public UIPersonalization getPersonalizationForTab​(Tab tab)
        Returns all the personalization settings for a tab. The current client, org, role and user are taken into account to find the correct personalization entry. If no personalization entries are present then null is returned.
        Parameters:
        tab - the tab for which the personalization settings are to be returned.
        Returns:
        the personalization settings in a json object for this tab.
      • storePersonalization

        public UIPersonalization storePersonalization​(String persId,
                                                      String clientId,
                                                      String orgId,
                                                      String roleId,
                                                      String userId,
                                                      String tabId,
                                                      String windowId,
                                                      String target,
                                                      String value)
        Stores the personalization json object for a certain level, if there is no current record then a new one is created and persisted. If the pers
        Parameters:
        persId - if a specific personalization id is set then the system updates that record and ignores the other parameters.
        clientId - the client, maybe null
        orgId - the organization id, maybe null
        roleId - the role id, maybe null
        userId - the user id, maybe null
        tabId - the tab id, may not be null
        target - the personalization target, is either form or grid
        value - the value, a json string
        Returns:
        the persisted record
      • storePersonalization

        public UIPersonalization storePersonalization​(String persId,
                                                      String clientId,
                                                      String orgId,
                                                      String roleId,
                                                      String userId,
                                                      String tabId,
                                                      String windowId,
                                                      String target,
                                                      String value,
                                                      Boolean saveAsNewPersonalization)
        Stores the personalization json object for a certain level, if there is no current record then a new one is created and persisted. If the pers
        Parameters:
        persId - if a specific personalization id is set then the system updates that record and ignores the other parameters.
        clientId - the client, maybe null
        orgId - the organization id, maybe null
        roleId - the role id, maybe null
        userId - the user id, maybe null
        tabId - the tab id, may not be null
        target - the personalization target, is either form or grid
        value - the value, a json string
        saveAsNewPersonalization - to save the personalization as a new personalization
        Returns:
        the persisted record