psdi.webclient.beans.startcntr

Class StartCenterAppBean

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.http.HttpSessionBindingListener, DataBeanListener


    public class StartCenterAppBean
    extends AppBean
    Custom Application bean for Start Center application.
    • Constructor Detail

      • StartCenterAppBean

        public StartCenterAppBean()
    • Method Detail

      • initialize

        protected void initialize()
                           throws MXException,
                                  java.rmi.RemoteException
        Overridden to make sure the SQL conditions are set so that a full select is not run
        Overrides:
        initialize in class AppBean
        Throws:
        MXException
        java.rmi.RemoteException
      • isSCAdmin

        public boolean isSCAdmin()
        Returns true if current user is allowed to create templates
        Parameters:
        bFlag - true if user can create templates
        Returns:
        - true if curent user is admin
      • getCurrentStartCenterUId

        public java.lang.String getCurrentStartCenterUId()
        Resets the set for data for that start center only
        Parameters:
        startCenterId - Current Start Center Id
        Returns:
        current start center id as String
        Throws:
        java.rmi.RemoteException
        MXException
      • getPageLeftLayoutPercent

        public java.lang.String getPageLeftLayoutPercent()
        Returns the current startcenter layout settings
        Returns:
        String representation of % that left column should have based on layout
      • getPageRightLayoutPercent

        public java.lang.String getPageRightLayoutPercent()
        Returns the current startcenter layout settings
        Returns:
        String representation of % that right column should have based on layout
      • getAllowedPortlets

        public java.util.HashSet getAllowedPortlets()
                                             throws java.rmi.RemoteException,
                                                    MXException
        Gets allowed portlets for the current user
        Returns:
        a Hashset of portlets that are allowed based on the access to their configuration apps
        Throws:
        java.rmi.RemoteException
        MXException
      • getAllPortletsByColumns

        public java.util.TreeMap getAllPortletsByColumns()
        Gets allowed portlets for the current user or returns an empty map
        Returns:
        TreeMap of TreeMaps of portlets that are on left and right column {leftcolumn, rightcolumn}
        Throws:
        java.rmi.RemoteException
        MXException
      • getBean

        public PortletBean getBean(java.lang.String portletId)
        Gets the bean for this portlet
        Parameters:
        portletId -
        Returns:
        PortletBean for a given portletid
        Throws:
        java.rmi.RemoteException
        MXException
      • getPageLayout

        public java.lang.String getPageLayout()
                                       throws java.rmi.RemoteException,
                                              MXException
        Returns the current startcenter page layout
        Returns:
        page layout as String for e.g {NW,WN,EQ}
        Throws:
        java.rmi.RemoteException
        MXException
      • canConfigureSC

        public boolean canConfigureSC()
        Can User Configure start Center
        Returns:
        returns true if user can configure the start center. Change Content Layout link will be shown then
        Throws:
        java.rmi.RemoteException
        MXException
      • getStartCenters

        public java.lang.Object[] getStartCenters()
        Returns list of current start centers with their names and ids to buld tabs etc
        It also send back any messaages relating to user having being take away froma template.
        Returns:
        Object[] with index 0 has ArrayList of start center info and index 1 as information on any messages to be shown
        Throws:
        java.rmi.RemoteException
        MXException
      • getGroupAssociationMessage

        public java.lang.String getGroupAssociationMessage(java.util.Hashtable messageInfo)
        Returns a message if a start center was removed
        Parameters:
        messageInfo -
        Returns:
        String the group association message if user's start center display is affected by security group info
        Throws:
        java.rmi.RemoteException
        MXException
      • getGroupAssociationMessageTemplateLink

        public java.lang.String getGroupAssociationMessageTemplateLink(java.util.Hashtable messageInfo)
        Returns a message if a start center was removed due to templates being disassociated
        Parameters:
        messageInfo - Hashtable of all messages that came from backend validation
        Returns:
        Complete String to be shown using STartCenterHelp
      • isTemplate

        public boolean isTemplate()
        Returns true if the current seleced start center is a template.
        Returns:
        true if current start center is a template
        Throws:
        java.rmi.RemoteException
        MXException
      • savetemplate

        public int savetemplate()
        Handle the Create Template event Creates a temporary start center for Admin as another tab and takes the admin to change content and layout
        Returns:
        EVENT_HANDLED
      • deletetemplate

        public int deletetemplate()
                           throws MXException,
                                  java.rmi.RemoteException
        Handles the delete template event. Removes the current start center from the set and refreshs the app.
        Returns:
        EVENT_HANDLED
        Throws:
        MXException
        java.rmi.RemoteException
      • updatestartcenter

        public int updatestartcenter()
                              throws MXException,
                                     java.rmi.RemoteException
        Handles the delete template event. Removes the current start center from the set and refreshs the app.
        Returns:
        EVENT_HANDLED
        Throws:
        MXException
        java.rmi.RemoteException
      • cancelchanges

        public int cancelchanges()
                          throws MXException,
                                 java.rmi.RemoteException
        Cancels the changes to the template. Removes the current start center from the set and refreshs the app.
        Returns:
        EVENT_HANDLED
        Throws:
        MXException
        java.rmi.RemoteException
      • createtemplate

        public int createtemplate()
        Handle the Create Template event Creates a temporary start center for Admin as another tab and takes the admin to change content and layout
        Returns:
        EVENT_HANDLED
      • isEditingTemplates

        public boolean isEditingTemplates(java.util.ArrayList startCenters)
        Return true if currnet user has any templates open.
        Parameters:
        startCenters -
        Returns:
        true/false
      • getUserStartCenter

        public void getUserStartCenter()
        Get all start centers for the current user when coming to the start center application for the first time
      • isPortletAppAllowed

        public boolean isPortletAppAllowed(java.lang.String portletId)
        Returns true if portlet application of the given Portlet type is allowed
        Parameters:
        portletId -
        Returns:
        returns true if portlet app is allowed
      • hasSigOptionAccess

        public boolean hasSigOptionAccess(int row,
                                          java.lang.String sigOption)
                                   throws java.rmi.RemoteException,
                                          MXException
        Overridden to by pass sigoption check as this is a special app When there are no start centers, still let the user access Profile options.
        Overrides:
        hasSigOptionAccess in class AppBean
        Parameters:
        row - - The index of the mbo to do the check on.
        sigOption - - The sigoption that will be checked to see if the user has privileges for it, for the given Mbo.
        Returns:
        true if sigoption has access.
        Throws:
        java.rmi.RemoteException
        MXException
      • canUpdateSC

        public boolean canUpdateSC()
        Returns true if current user is self service app user
        Returns:
        returns true if the current user can update the start center. "Update Start Center" info will be shown.
      • showPortlet

        public boolean showPortlet(java.lang.String portletName)
        Returns if the portlet has to be shown or not.
        Parameters:
        portletName -
        Returns:
        true if the portlet has not to be shown
        Throws:
        java.rmi.RemoteException
        MXException
      • getPortletControlNameMap

        public java.util.Hashtable getPortletControlNameMap()
        Returns a collection of portletappname vs their control names that are stored in the database
        Returns:
        hashtable
      • checkGroupAssociation

        public java.lang.String checkGroupAssociation()
        Deprecated. 
        Returns a message if a start center was removed
        Throws:
        java.rmi.RemoteException
        MXException
      • getPortletLoadingSync

        public java.lang.Object getPortletLoadingSync()
        Returns the object used to synchronize across the various portlets so that they would cross threads.