psdi.webclient.controls

Class ResultSetPortlet

  • All Implemented Interfaces:
    java.lang.Cloneable


    public class ResultSetPortlet
    extends PortletDataInstance
    Represents the control instance for Result Set Portlet in the Start Center application. It contains methods to get data needed for rendering the portlet.
    • Constructor Detail

      • ResultSetPortlet

        public ResultSetPortlet()
    • Method Detail

      • getResultSet

        public MboSetData getResultSet()
                                throws MXException,
                                       java.rmi.RemoteException
        Returns result set data as mbo value data
        Parameters:
        starting - index
        end - index
        Returns:
        MboValueData[][]
        Throws:
        MXException
        java.rmi.RemoteException
      • getResultMboSetInfo

        public MboSetInfo getResultMboSetInfo()
                                       throws MXException,
                                              java.rmi.RemoteException
        Called to get information on the attributes for the underlying table the query is bound to
        Returns:
        MboSetInfo
        Throws:
        MXException
        java.rmi.RemoteException
      • getConfigMboSetInfo

        public MboSetInfo getConfigMboSetInfo()
                                       throws MXException,
                                              java.rmi.RemoteException
        Returns MBoSetInfo for the current Set
        Returns:
        MBoSetInfo
        Throws:
        MXException
        java.rmi.RemoteException
      • generateGraphData

        public java.util.ArrayList generateGraphData()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns result set data as mbo value data
        Parameters:
        starting - index
        end - index
        Returns:
        MboValueData[][]
        Throws:
        MXException
        java.rmi.RemoteException
      • getNoOfRecords

        public int getNoOfRecords()
                           throws MXException,
                                  java.rmi.RemoteException
        Returns No of records
        Throws:
        MXException
        java.rmi.RemoteException
      • getKeyColumn

        public java.lang.String getKeyColumn()
                                      throws MXException,
                                             java.rmi.RemoteException
        Returns key column in the result set. A link will be provided for that
        Returns:
        string as the key column in the result set.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAppName

        public java.lang.String getAppName()
                                    throws MXException,
                                           java.rmi.RemoteException
        Returns app name of the result set.
        Returns:
        application name
        Throws:
        MXException
        java.rmi.RemoteException
      • getResultSetAttributes

        public java.util.Vector getResultSetAttributes()
                                                throws MXException,
                                                       java.rmi.RemoteException
        Returns a collection of the columns the user has selected to display the result set for
        Returns:
        vector of the columns the user has selected to display the result set for
        Throws:
        MXException
        java.rmi.RemoteException
      • getSortAttribute

        public java.lang.String getSortAttribute(java.lang.String sortIndex)
        Return the attribute name for sorting given a column index
        Overrides:
        getSortAttribute in class PortletDataInstance
        Parameters:
        colIndex -
        Returns:
        Attribute Name
      • getApp

        public java.lang.String getApp()
                                throws MXException,
                                       java.rmi.RemoteException
        Returns the app for the query
        Returns:
        string as the app for the query
        Throws:
        MXException
        java.rmi.RemoteException
      • isSiteError

        public boolean isSiteError()
        Returns if the site is different than the current site. for future use
      • getConditions

        public java.util.HashSet getConditions()
                                        throws java.rmi.RemoteException,
                                               MXException
        Returns display conditions associated with this protlet
        Throws:
        java.rmi.RemoteException
        MXException
      • getConditionAttribute

        public java.lang.String getConditionAttribute()
                                               throws java.rmi.RemoteException,
                                                      MXException
        Returns display condition attribute associated with this protlet
        Throws:
        java.rmi.RemoteException
        MXException
      • getGroupByAttribute

        public java.lang.String[] getGroupByAttribute()
                                               throws java.rmi.RemoteException,
                                                      MXException
        Returns display condition attribute associated with this protlet
        Throws:
        java.rmi.RemoteException
        MXException
      • compareValues

        public java.lang.String compareValues(MboValueData mvd)
        Compares two values based on the datatype of the primary value. This method has to be on the UI since for the sake of putting code in the backend, we can't have repeated calls to backend.
        Parameters:
        mvd - MboValueData value to be compared
        expressions - MboValueData[][] containing data for Portlet display conditions
        Returns:
        HTML style as a string to set the color
      • getGraphDetails

        public java.util.Properties getGraphDetails()
                                             throws java.rmi.RemoteException,
                                                    MXException
        Calls method on the remotes to get graph related details
        Returns:
        properties for graphs drawing
        Throws:
        java.rmi.RemoteException
        MXException
      • getFilterWhere

        public java.lang.String getFilterWhere(java.lang.String rsKey)
                                        throws java.rmi.RemoteException,
                                               MXException
        Returns a complete where clause based on the query where and filter where This is passed to the application being called when clicking on the pie chart
        Returns:
        string representing complete where
        Throws:
        java.rmi.RemoteException
        MXException
      • setUpDefaults

        public void setUpDefaults()
                           throws java.rmi.RemoteException,
                                  MXException
        Call mnethod on the remotes to setup defaults fot the set
        Throws:
        java.rmi.RemoteException
        MXException
      • setQbes

        public void setQbes(java.lang.String qbeKeyValuePair)
        Stores the qbe done on the result set portlet graph
        Parameters:
        attributeName -
        qbeExpression -
      • getQbeSetting

        public java.lang.String getQbeSetting(java.lang.String attribName)
        Returns the qbes set on the result set
        Returns:
        String as the qbe setting
      • clearfilter

        public int clearfilter()
        Removes the QBEs on the result set
        Returns:
      • isFilterSet

        public boolean isFilterSet()
        Returns true if filter is set on this portlet
      • queryExists

        public boolean queryExists()
                            throws java.rmi.RemoteException,
                                   MXException
        Returns true if the related query exists
        Returns:
        boolean - true if the query exists
        Throws:
        java.rmi.RemoteException
        MXException
      • getLabels

        public java.lang.String[] getLabels()
        Returns labels for this portlet. Following list shows list of keys to be used and the labels they stand for
        Returns:
        String array of locale specific labels
      • changeview

        public void changeview()
        Handles the changeDisplay event fire when user selects between List or Graphical View in the portlet.
      • rsdisplay

        public int rsdisplay()
        Handles call to show the dialog for changing a Result Set graph option
      • setqbeandfilter

        public void setqbeandfilter()
        This method handles the "setqbeandfilter" event where use enters a qbe and presses the enter key
      • setvalue

        public int setvalue()
        This method handles the "setqbe" event where use enters a qbe and tabs out
      • hasViewChanged

        public boolean hasViewChanged()
        Returns:
        boolean - Returns true of the user toggled between List / Graph View
      • setViewChanged

        public void setViewChanged(boolean flag)
        Parameters:
        listViewOn - - Set true if the user would like to see portlet in list or graphical mode.
      • openrecord

        public void openrecord()
        Call through the method in superclass to open an app with unqiueid
      • gotoportletapp

        public void gotoportletapp()
        Go to the application that the result set is based on, and apply the full where clause of the result set in the portlet
      • errorInPortlet

        public java.lang.String errorInPortlet()
                                        throws java.rmi.RemoteException,
                                               MXException
        Overridden to flag the error in getting data for the flag Jun 6, 2007
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.webclient.controls.PortletDataInstance#errorInPortlet()
      • getGraphError

        public java.lang.String getGraphError()
                                       throws java.rmi.RemoteException,
                                              MXException
        Overridden to flag the error in getting data for the flag Jun 6, 2007
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.webclient.controls.PortletDataInstance#errorInPortlet()
      • showrsdata

        public void showrsdata()
        Called when a sector in the pie or bar of the chart is clicked
      • isFilterOpen

        public java.lang.String isFilterOpen()
        Returns whether filter panel is open
        Overrides:
        isFilterOpen in class PortletDataInstance
        Returns:
        String - "true" if filter panel is open
      • setErrorCondition

        public void setErrorCondition(boolean flag)
      • getErrorCondition

        public boolean getErrorCondition()
      • getNonPersistentColumns

        public java.util.ArrayList getNonPersistentColumns()
                                                    throws MXException,
                                                           java.rmi.RemoteException
        Returns a collection of the columns that are non persistent
        Returns:
        vector of the columns that are non persistent
        Throws:
        MXException
        java.rmi.RemoteException
      • canDownloadcsv

        public java.lang.Object canDownloadcsv()
        returns whether or not the download csv button should be active. Only activate if there is an internal object name
        Returns:
      • getQueryMboSet

        public MboSetRemote getQueryMboSet(java.lang.String orderby)
                                    throws MXException,
                                           java.rmi.RemoteException
        return a MboSetRemote for the result set portlet query
        Parameters:
        orderby -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException