com.ibm.tivoli.maximo.oslc.consumer.app.interaction

Class OslcPresentataionGenerator

  • java.lang.Object
    • com.ibm.tivoli.maximo.oslc.consumer.app.interaction.OslcPresentataionGenerator


  • public class OslcPresentataionGenerator
    extends java.lang.Object
    Oslc Presentation generator.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String addButton(org.jdom2.Element btngroup, java.lang.String oslcTabName, java.lang.String interaction, java.lang.String providerName, java.lang.String mapOption, java.lang.String buttonLabel)
      Add Button to Oslc Link table.
      boolean findButton(org.jdom2.Element in, java.lang.String inid, boolean remove)
      Find button by ID.
      org.jdom2.Element findById(org.jdom2.Element in, java.lang.String inid)
      Find button by ID.
      org.jdom2.Element findByName(org.jdom2.Element in, java.lang.String inName)
      Find Element by name.
      void generateNewMenu(java.lang.String intGroupName, java.lang.String menuId, java.lang.String newMenuId, java.lang.String sigOptionName, java.lang.String menuLabel)
      Generate new menu
      java.lang.String generatePresentataion(MboRemote oslcInteraction)
      Generate dialog based in IntGenerator Mbo.
      java.lang.String generateUniqueID()
      Generate unique ID for attribute ID return unique id
      java.util.Map getAppplicationsMenus(org.jdom2.Element top, java.util.Map allMenus)
      Get application menus
      org.jdom2.Element getAppplicationsTab(java.lang.String tabName, java.lang.String appName)
      Find Application Tab in tab group.
      java.util.Map getAppplicationsTabs(java.lang.String appName)
      Get map of application tabs
      org.jdom2.Document getAppXML(java.lang.String app, UserInfo userInfo)
      Get Application XML from MAXPRESENTATION table.
      static java.lang.String getFileName(java.lang.String inter, java.lang.String name)
      Get the full path and file name based on given message data.
      org.jdom2.Element getMenu(java.lang.String name, boolean remove)
      Get detail menu
      org.jdom2.Element getOslcLinkTab(org.jdom2.Element parent, java.lang.String oslcTabName)
      Find Oslc Link tab in tab group.
      org.jdom2.Element getOslcTabGroup(org.jdom2.Element parent, java.lang.String appName, java.lang.String tabName)
      Find Oslc Tab Group.
      org.jdom2.Document getPresentataionDocument()
      Generate unique ID for attribute ID return unique id
      boolean hasLicenseAccess(java.lang.String licensevalue)
      Validate if license key is installed.
      void modifyAttributeMenu(org.jdom2.Element in, java.util.Map modifyMenuMap)
      Modify Menu Attribute of a field.
      void modifyMenuItem(org.jdom2.Element in)
      Modify Menu items
      java.lang.String removePresentataion(MboRemote oslcInteraction, boolean hasLink)
      Remove tab from presentation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OslcPresentataionGenerator

        public OslcPresentataionGenerator(byte[] presentataion)
                                   throws java.rmi.RemoteException,
                                          MXException
        Construct generator
        Parameters:
        presentataion - Presentation XML byte array.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
    • Method Detail

      • generatePresentataion

        public java.lang.String generatePresentataion(MboRemote oslcInteraction)
                                               throws java.rmi.RemoteException,
                                                      MXException
        Generate dialog based in IntGenerator Mbo.
        Parameters:
        oslcInteraction - Give reference to Oslc Interaction Mbo.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getAppXML

        public org.jdom2.Document getAppXML(java.lang.String app,
                                            UserInfo userInfo)
                                     throws java.rmi.RemoteException,
                                            MXException
        Get Application XML from MAXPRESENTATION table.
        Parameters:
        app - name of an application
        userInfo - UserInfo object
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getOslcTabGroup

        public org.jdom2.Element getOslcTabGroup(org.jdom2.Element parent,
                                                 java.lang.String appName,
                                                 java.lang.String tabName)
        Find Oslc Tab Group.
        Parameters:
        parent - Parent element
        appName - Application name
        tabName - Application tab name
        Returns:
        oslc tab group
      • getAppplicationsTabs

        public java.util.Map getAppplicationsTabs(java.lang.String appName)
                                           throws java.rmi.RemoteException,
                                                  MXException
        Get map of application tabs
        Parameters:
        appName - Give application name.
        Returns:
        map of all application tabs
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getAppplicationsMenus

        public java.util.Map getAppplicationsMenus(org.jdom2.Element top,
                                                   java.util.Map allMenus)
                                            throws java.rmi.RemoteException,
                                                   MXException
        Get application menus
        Parameters:
        top - Top level element.
        allMenus - list of InteractionGroupAppMenuInfo
        Returns:
        map of all application tabs
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • generateNewMenu

        public void generateNewMenu(java.lang.String intGroupName,
                                    java.lang.String menuId,
                                    java.lang.String newMenuId,
                                    java.lang.String sigOptionName,
                                    java.lang.String menuLabel)
                             throws java.rmi.RemoteException,
                                    MXException
        Generate new menu
        Parameters:
        intGroupName - Interaction Group Name
        menuId - current menu id
        newMenuId - new menu id
        sigOptionName - signature option
        menuLabel - menu label
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • modifyMenuItem

        public void modifyMenuItem(org.jdom2.Element in)
        Modify Menu items
        Parameters:
        in - Top level element.
      • getMenu

        public org.jdom2.Element getMenu(java.lang.String name,
                                         boolean remove)
        Get detail menu
        Parameters:
        name - Menu name.
        remove - remove menu
        Returns:
        menu element
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getAppplicationsTab

        public org.jdom2.Element getAppplicationsTab(java.lang.String tabName,
                                                     java.lang.String appName)
                                              throws java.rmi.RemoteException,
                                                     MXException
        Find Application Tab in tab group. Returns null if tab is not found
        Parameters:
        tabName - application name
        appName - Give application name.
        Returns:
        application tab element
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getOslcLinkTab

        public org.jdom2.Element getOslcLinkTab(org.jdom2.Element parent,
                                                java.lang.String oslcTabName)
        Find Oslc Link tab in tab group.
        Parameters:
        parent - Parent element
        oslcTabName - Oslc Link tab name
        Returns:
        Oslc Link tab element
      • addButton

        public java.lang.String addButton(org.jdom2.Element btngroup,
                                          java.lang.String oslcTabName,
                                          java.lang.String interaction,
                                          java.lang.String providerName,
                                          java.lang.String mapOption,
                                          java.lang.String buttonLabel)
        Add Button to Oslc Link table.
        Parameters:
        btngroup - Parent button group
        oslcTabName - Oslc Link tab name
        interaction - Oslc interaction name
        providerName - Oslc provider name
        mapOption - Sig Option name
        buttonLabel - Button Label
      • removePresentataion

        public java.lang.String removePresentataion(MboRemote oslcInteraction,
                                                    boolean hasLink)
                                             throws java.rmi.RemoteException,
                                                    MXException
        Remove tab from presentation.
        Parameters:
        oslcInteraction - Give reference to Oslc Interaction Mbo.
        hasLink - Identifies if link was created
        Returns:
        presentation string
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • findButton

        public boolean findButton(org.jdom2.Element in,
                                  java.lang.String inid,
                                  boolean remove)
        Find button by ID.
        Parameters:
        in - Element to search
        inid - id to find
        remove - indicator to remove button
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • findById

        public org.jdom2.Element findById(org.jdom2.Element in,
                                          java.lang.String inid)
        Find button by ID.
        Parameters:
        in - Element to search
        inid - id to find
        remove - indicator to remove button
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • findByName

        public org.jdom2.Element findByName(org.jdom2.Element in,
                                            java.lang.String inName)
        Find Element by name.
        Parameters:
        in - Element to search
        inName - Name to find
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • modifyAttributeMenu

        public void modifyAttributeMenu(org.jdom2.Element in,
                                        java.util.Map modifyMenuMap)
        Modify Menu Attribute of a field.
        Parameters:
        in - Element to search
        modifyMenuMap - map of all attributes to modify
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • generateUniqueID

        public java.lang.String generateUniqueID()
        Generate unique ID for attribute ID return unique id
      • getPresentataionDocument

        public org.jdom2.Document getPresentataionDocument()
        Generate unique ID for attribute ID return unique id
      • hasLicenseAccess

        public boolean hasLicenseAccess(java.lang.String licensevalue)
        Validate if license key is installed.
        Parameters:
        licensevalue - Give license key value.
        Returns:
        true if license key value valid
      • getFileName

        public static java.lang.String getFileName(java.lang.String inter,
                                                   java.lang.String name)
                                            throws MXException
        Get the full path and file name based on given message data.
        Parameters:
        inter - Interaction Name
        name - file Name
        Returns:
        Full path and file name of message file.
        Throws:
        MXException