psdi.webclient.beans.common

Class GLNavigatorDialogBean

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


    public class GLNavigatorDialogBean
    extends DataBean
    • Field Detail

      • orgAttribute

        public java.lang.String orgAttribute
      • firstTime

        public boolean firstTime
    • Constructor Detail

      • GLNavigatorDialogBean

        public GLNavigatorDialogBean()
    • Method Detail

      • initialize

        protected void initialize()
                           throws MXException,
                                  java.rmi.RemoteException
        Description copied from class: DataBean
        Typically called after the DataBean gets a new MboSetRemote On the MboSetRemote it sets the app, the app defaults, user defaults If the remote is an instanceof NonPersistentMboSetRemote then setup is called on it and sets the current row to 0. If the DataBean isn't bound to a table then initialize fetches the first mbo (sets the current row to 0). If this method is overridden under most case you will want to call super.initalize at the end of the the new initialize method.
        Overrides:
        initialize in class DataBean
        Throws:
        MXException
        java.rmi.RemoteException
      • execute

        public int execute()
                    throws MXException,
                           java.rmi.RemoteException
        Handle when user clicks the done button. Should assemble the glaccount using the glformat, and write the account to the target mbo
        Overrides:
        execute in class DataBean
        Parameters:
        column - name where the resulting glaccount is to be stored
        Throws:
        MXException
        java.rmi.RemoteException
      • cancelDialog

        public int cancelDialog()
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from class: DataBean
        Called by the dialog control when the dialog is cancled. Override this method if any special processing needs to be done when the user closes a dialog.
        Overrides:
        cancelDialog in class DataBean
        Throws:
        MXException
        java.rmi.RemoteException
      • setsegment

        public int setsegment()
                       throws MXException,
                              java.rmi.RemoteException
        Handle the case where a segment is clicked. Should load the list of gl components based on the currently selected segment
        Parameters:
        the - string parameter taken from the http request containing the index of the clicked segment
        Throws:
        MXException
        java.rmi.RemoteException
      • setsegmentvalue

        public int setsegmentvalue()
                            throws MXException,
                                   java.rmi.RemoteException
        Handle when the user has selected a segment value. Should add the selected component to segmentValues[].
        Parameters:
        value - of the selected segment
        Returns:
        true if there is a next segment, false if we're at the last segment
        Throws:
        MXException
        java.rmi.RemoteException
      • refreshGL

        public int refreshGL()
                      throws MXException,
                             java.rmi.RemoteException
        Handle when the user clears a segment. Sets the currently selected segment to null, and stay on the segment. Also clears all the segments next to the current segment.
        Throws:
        MXException
        java.rmi.RemoteException
      • getPlaceHolder

        public java.lang.String getPlaceHolder()
      • getCurrentSegment

        public int getCurrentSegment()
        Allows the caller to determine which segment is currently selected
        Returns:
        the zero based index of the currently selected segment.
      • getSegmentValue

        public java.lang.String getSegmentValue(int segment)
        Provides access to the text value of a given segment. If the segment is null, the function returns an appropriately sized placeholder
        Returns:
        the gl formatted value of the requested segment
      • getSegmentName

        public java.lang.String getSegmentName(int segment)
        Provides access to the name of the requested segment, according to the loaded gl format.
        Returns:
        the name of the segment (same as glconfigure.comptext)
      • getSegmentSize

        public int getSegmentSize(int segment)
        Returns the number of characters in the requested segment value
        Returns:
        length of the segment string (same as glconfigure.gllength)
      • getSegmentDelimiter

        public char getSegmentDelimiter(int segment)
        Returns the delimiter character for the requested sement, according to the loaded gl format
        Returns:
        delimiter character, typically a '-'
      • getSegmentCount

        public int getSegmentCount()
        Returns the number of segments in the loaded gl format
        Returns:
        numeric count of gl segments in the glformat
      • getSegmentPlaceHolder

        public java.lang.String getSegmentPlaceHolder()
        Returns the placeholder character used by the loaded gl format to pad a null gl segment value
        Returns:
        placeholder character, usually a '?'
      • validateComponent

        public boolean validateComponent(java.lang.String compVal)
                                  throws MXException,
                                         java.rmi.RemoteException
        Returns the whether a particular component is valid or not
        Returns:
        boolean if a component is valid or not.
        Throws:
        MXException
        java.rmi.RemoteException
      • refreshGLData

        public void refreshGLData(GLNavigatorSelectOrgBean orgBean)
                           throws MXException,
                                  java.rmi.RemoteException
        Based on current ORGID and current segment, it refreshs accounts.
        Throws:
        MXException
        java.rmi.RemoteException
      • setOrgId

        public void setOrgId(java.lang.String newOrgId)
        Sets the orgid to be used for fetching GLComponents
        Parameters:
        newOrgId -
      • clearData

        public void clearData()
                       throws MXException
        Clears data for the table.
        Throws:
        MXException
        java.rmi.RemoteException
      • fetchOrgAndSiteIdFromSource

        public void fetchOrgAndSiteIdFromSource()
        Retrieves Org and Site from source. It first tries to find out a mapped org id i.e in Incidents, RELEVENT ORGID is ASSETORGID, so use that one. If that is not present then, use orgid. If SITEID field exists for the source, retrieve it.
      • setCurrentSegment

        public void setCurrentSegment(int i)