psdi.webclient.system.beans

Class AppBean

    • Constructor Detail

      • AppBean

        public AppBean()
    • Method Detail

      • getQueryOption

        public int getQueryOption()
        Return the query option
      • setQueryOption

        public void setQueryOption(int option)
        Set the query option
      • setupBean

        public void setupBean(WebClientSession wcs)
        Description copied from class: DataBean
        This method must be call after the bean is instantiated. It tells the bean what it's clientSession is , the control that created the bean and the event that caused the creation of the bean. Also gets the values the orderyby, whereclause, apprestrictions, rowsperpage, and parentdatasrc properties from the control (the one that instantiated the bean) if any are set. Plus it gets the list of bound controls from the presentations control handler.
        Overrides:
        setupBean in class DataBean
      • setupBean

        public void setupBean(SessionContext sc)
        Deprecated. FIREFOX
        TO REPLACE: use AppBean.setupBean(WebClientSession)
        Overrides:
        setupBean in class DataBean
      • hasStartRecord

        public boolean hasStartRecord(long uniqueId)
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • initializeApp

        public void initializeApp()
                           throws MXException,
                                  java.rmi.RemoteException
        This method is called when the presentations "main" page is initalized and before the page is rendered. It can be called multiple times to "reinitialize" the applicaiton, for example when the existing query is reset.

        Only on the first initialize the method also checks for these mutually exclusiive special conditions:

      • if there is a particular record the app needs to jump to (using uniqueid from the loadapp or gotoapp event) the result set is restricted to that record only
      • if there is a startup query sent through the launch in context as a startup where clause it is set as a user where clause
      • if there is an additional ecent "insert" a new record is inserted

        A subsequent call to initializeApp() will not check for these conditions, causing the default reset to happen

Throws:
MXException
java.rmi.RemoteException
  • initialize

    protected void initialize()
                       throws MXException,
                              java.rmi.RemoteException
    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
    Overrides:
    initialize in class DataBean
    Throws:
    MXException
    java.rmi.RemoteException
  • structureChangedEvent

    public void structureChangedEvent(DataBean speaker)
    Event called by the "resultsBean" DataBean which tells this DataBean that it references a new mbo or MboSetRemote. The fireStructureChangedEvent is called thus setting the resetRemote flag for all the "children" MXWebClientDataBeans
    Specified by:
    structureChangedEvent in interface DataBeanListener
    Overrides:
    structureChangedEvent in class DataBean
  • fireStructureChangedEvent

    public void fireStructureChangedEvent(DataBean speaker)
    Description copied from class: DataBean
    tells all listeners that this DataBean refrerences a new mbo or mboSetRemote
    Overrides:
    fireStructureChangedEvent in class DataBean
  • reset

    public void reset()
               throws MXException
    Description copied from class: DataBean
    Resets the MboSet. Clears the internal cache and fires a structure change event to all listeners.
    Overrides:
    reset in class DataBean
    Throws:
    MXException
  • getMboSet

    public MboSetRemote getMboSet()
                           throws MXException,
                                  java.rmi.RemoteException
    Return's whether or not the MboSetRemote is null. Will fetch the MboSetRemote fromt the resultsBean if there is one and the resetRemote flag is true.
    Overrides:
    getMboSet in class DataBean
    Throws:
    MXException
    java.rmi.RemoteException
  • save

    public void save()
              throws MXException
    Needs it's own version of save to insure the proper record is set. If the current row is a new record then before saving, it stores the key attributes and their values. Calls save then resets the qbe and to the stored values. This insures that the inserted record stays as the current record after saving.
    Overrides:
    save in class DataBean
    Throws:
    MXException
  • saveattachment

    public void saveattachment()
                        throws MXException
    Used by adding attachment. Don't start workflow when attachment is saved. Difference from save() is that it won't call autoInitiateWorkflow()
    Throws:
    MXException
  • autoInitiateWorkflow

    public void autoInitiateWorkflow()
                              throws java.rmi.RemoteException,
                                     MXException
    Start workflow automatically when a new MBO is saved.
    Throws:
    java.rmi.RemoteException
    MXException
  • convertPortalParameters

    public void convertPortalParameters(WebClientSession wcs)
    Convert the Parameters Passed into this app from another external application to values Maximo can understand. Override this in the application's appBean.
  • getPortalEvent

    public java.lang.String getPortalEvent(DataBean speaker)
  • getCurrentRow

    public int getCurrentRow()
    Description copied from class: DataBean
    Returns the current row.
    Overrides:
    getCurrentRow in class DataBean
  • isEmpty

    public boolean isEmpty()
                    throws MXException,
                           java.rmi.RemoteException
    Description copied from class: DataBean
    Returns try if mboset has no members
    Overrides:
    isEmpty in class DataBean
    Throws:
    MXException
    java.rmi.RemoteException
  • saveYesNoCheck

    public boolean saveYesNoCheck()
                           throws MXException
    Checks the AppBean to see if it needs to be saved. If it does then it throw an MXException ("jspmessages", "savecontinue"). If the user selects YES then the AppBean is saved, if the user selects NO the AppBean is reset (throwing away the changes). Returns false if the user select Cancel.
    Returns:
    true means continue, false means stop what was going to happen
    Throws:
    MXApplicationYesNoCancelException - Thrown with "jspmessages" and one of "savecontinue", "interactioncontinue", or "saveinteractioncontinue" if the user has unsaved changes and or is in the middle of a workflow interaction.
    MXException
  • saveYesNoInteractionCheck

    public boolean saveYesNoInteractionCheck()
                                      throws MXException
    Checks the AppBean to see if it needs to be saved. If it does then it throw an MXException ("jspmessages", "savecontinue"). If the user selects YES then the AppBean is saved, if the user selects NO the AppBean is reset (throwing away the changes). Returns false if the user select Cancel or longop has started. This method will be called again when longop is complete.
    Returns:
    true means continue, false means stop what was going to happen
    Throws:
    MXApplicationYesNoCancelException - Thrown with "jspmessages" and one of "savecontinue", "interactioncontinue", or "saveinteractioncontinue" if the user has unsaved changes and or is in the middle of a workflow interaction.
    MXException
  • getAppInfo

    public com.ibm.json.java.JSONObject getAppInfo()
                                            throws MXException,
                                                   java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • NAVHISTORY

    public int NAVHISTORY()
    The NAVHISTORY event is used by the NAVHISTORY sigoption and toolbar menu item. This event will show the Navigation/View History if they've been collected via the heirarchicalmoveto event. This event ends up calling the showmenu() event passing the 'navhistory' menu name. See Menus for more information about the 'navhistory' menu.

    To add the NAVHISTORY support to the application, you'll need to add the sigoption.
     <add_sigoption visible="false" app="ASSET"
                    optionname="NAVHISTORY" description="View History" grantapp="ASSET"
                    grantoption="READ" esigenabled="false" langcode="EN" />
     

    And, to add the icon to the application toolbar, you'll need to add an entry to MAXMENU
     insert into maxmenu (menutype, moduleapp, position,
                            subposition,elementtype, keyvalue, headerdescription, visible,
                            image, accesskey, tabdisplay,maxmenuid)
                            Values
                            ('APPTOOL','ASSET',24,0,'OPTION','NAVHISTORY','','1','nav_icon_viewHistory.gif','','MAIN',maxmenuseq.nextval)
                            ;
     


    All hierarchicalmoveto events will capture the moveto history and populate the menu, which can be accessed via the toolbar view history icon.

    Returns:
  • SAVE

    public int SAVE()
             throws MXException,
                    java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • RUNREPORTS

    public int RUNREPORTS()
  • RUNREPORTBYNAME

    public int RUNREPORTBYNAME()
                        throws MXException,
                               java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • RUNAREPORT

    public int RUNAREPORT()
                   throws MXException,
                          java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • insert

    public void insert()
                throws MXException,
                       java.rmi.RemoteException
    Description copied from class: DataBean
    Inserts a row at the begining of the MboSet. Fires a row change event to all listeners upon success.
    Overrides:
    insert in class DataBean
    Throws:
    MXException
    java.rmi.RemoteException
  • INSERT

    public int INSERT()
               throws MXException,
                      java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • DELETE

    public int DELETE()
               throws MXException,
                      java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • DUPLICATE

    public int DUPLICATE()
                  throws MXException,
                         java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • CLEAR

    public int CLEAR()
              throws MXException,
                     java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • BOOKMARK

    public int BOOKMARK()
                 throws MXException,
                        java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • gotoTab

    protected void gotoTab(SessionContext clientSession,
                           java.lang.String tab)
    Deprecated. FIREFOX - use gotoTab(WebClientSession, String) instead
  • gotoTab

    protected void gotoTab(WebClientSession wcs,
                           java.lang.String tab)
  • find

    public int find()
             throws MXException,
                    java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • returnwithvalue

    public int returnwithvalue()
                        throws MXException,
                               java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • getQuickFindRemote

    public MboSetRemote getQuickFindRemote()
    Returns:
    -- Returns the mboSetRemote used in the quickfind event. This is used to determine if the record exists before reseting the ResultBean. You would only need the get the quickFindRemote is there were special restrictions on the records available for the results list.
  • setDefaultQbe

    public void setDefaultQbe(java.lang.String attribute,
                              java.lang.String expression)
    Overrides:
    setDefaultQbe in class DataBean
  • RECORDLOCK

    public int RECORDLOCK()
                   throws MXException,
                          java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • RECUNLOCK

    public int RECUNLOCK()
                  throws MXException,
                         java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • STRECLOCK

    public int STRECLOCK()
                  throws MXException,
                         java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • getRecordLockProperties

    public com.ibm.json.java.JSONObject getRecordLockProperties()
  • updateForRecordLock

    public void updateForRecordLock(ControlInstance control)
  • ROUTEWF

    public int ROUTEWF()
                throws MXException,
                       java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • STOPWF

    public int STOPWF()
               throws MXException,
                      java.rmi.RemoteException
    Response to the Workflow Stop action.
    Throws:
    MXException
    java.rmi.RemoteException
  • launchwf

    public int launchwf()
                 throws MXException,
                        java.rmi.RemoteException
    Special action to launch a Workflow process directly
    Throws:
    MXException
    java.rmi.RemoteException
  • setKPIId

    public void setKPIId(long newId)
    Sets the unique id of the KPI that has just been created. This method will be called from the Create KPI Dialog
    Parameters:
    newId - new KPI Unique Id as long
  • getKPIId

    public long getKPIId()
    Returns the unique id of the KPI that has just been created
    Returns:
    KPI Unique Id as long
  • getKPIWhere

    public java.lang.String getKPIWhere()
                                 throws MXException,
                                        java.rmi.RemoteException
    Returns the User and QBE where clause on the basis of which current application is showing data. This method should be overridden in case an application needs to set its own specific WHERE clause. (e.g applications not having List tab)
    Returns:
    complete where clause as a String
    Throws:
    MXException
    java.rmi.RemoteException
  • getKPISelect

    public java.lang.String getKPISelect()
                                  throws MXException,
                                         java.rmi.RemoteException
    Returns the default select clause to be used in CREATE KPI. This method can be overridden in case some application decides to provide a special select clause to the CREATE KPI action.
    Returns:
    default select clause as String
    Throws:
    MXException
    java.rmi.RemoteException
  • MODIFYSLAS

    public int MODIFYSLAS()
                   throws MXException,
                          java.rmi.RemoteException
    Handles the "Apply SLA" action in ticket, wo etc apps.
    Throws:
    MXException
    java.rmi.RemoteException
  • moveToUniqueId

    public int moveToUniqueId(long uniqueId)
                       throws MXException,
                              java.rmi.RemoteException
    Moves to the record with the passed in uniqueid .
    Throws:
    MXException
    java.rmi.RemoteException
  • canExit

    public boolean canExit()
                    throws MXException,
                           java.rmi.RemoteException
    Called when leaving the application
    Throws:
    MXException
    java.rmi.RemoteException
  • HELPWF

    public int HELPWF()
               throws MXException,
                      java.rmi.RemoteException
    Special action to show workflow help
    Throws:
    MXException
    java.rmi.RemoteException
  • inboxwf

    public int inboxwf()
                throws MXException,
                       java.rmi.RemoteException
    action to perform when brung up a record from the inbox
    Throws:
    MXException
    java.rmi.RemoteException
  • ensureRecord

    public void ensureRecord()
                      throws java.rmi.RemoteException,
                             MXException
    This is used to load the first record in the appbean if the appbean doesn't have a table associated with it and it doesn't have a resultsbean associated with it. This is mainly needed for single page apps that just insert a main record.
    Throws:
    java.rmi.RemoteException
    MXException
  • setFilterCleared

    public void setFilterCleared()
  • hasSaveAccess

    public boolean hasSaveAccess()
  • submitPrintJob

    public int submitPrintJob()
                       throws MXException
    Call the external JSP/Applet to print the report. Used by(PAD) option. Determine all the valide docs to be printed also.
    Returns:
    Throws:
    MXException
    java.rmi.RemoteException
  • isUserWhereClauseThroughIntegration

    public boolean isUserWhereClauseThroughIntegration()
  • setUserWhereClauseThroughIntegration

    public void setUserWhereClauseThroughIntegration(boolean userWhereClauseThroughIntegration)
  • hasSigOptionAccess

    public boolean hasSigOptionAccess(int row,
                                      java.lang.String sigOption,
                                      boolean checkAppLevel)
                               throws java.rmi.RemoteException,
                                      MXException
    Returns true if the user has record level privileges for a given sigoption on the given mbo. If the user is on the list tab or a single page app, the privileges will be checked on an app level. If the mbo doesn't exist, and the user is on the list tab or a single page app, the privileges will be checked on an app level.
    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:
    Throws:
    java.rmi.RemoteException
    MXException
  • hasSigOptionAccess

    public boolean hasSigOptionAccess(int row,
                                      java.lang.String sigOption)
                               throws java.rmi.RemoteException,
                                      MXException
    Returns true if the user has record level privileges for a given sigoption on the given mbo. If the user is on the list tab or a single page app, the privileges will be checked on an app level. If the mbo doesn't exist, and the user is on the list tab or a single page app, the privileges will be checked on an app level.
    Overrides:
    hasSigOptionAccess in class DataBean
    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:
    Throws:
    java.rmi.RemoteException
    MXException
  • initQuickFIndRemote

    public MboSetRemote initQuickFIndRemote()
                                     throws java.rmi.RemoteException,
                                            MXException
    Added to provide a way for users to control quickfind mbo which is not needed in some cases.
    Returns:
    Throws:
    java.rmi.RemoteException
    MXException
  • hasModifications

    public boolean hasModifications()
    Checks all the beans in the app to see if they need to be saved.