psdi.app.designer.virtual

Class MapControlToolItemMboSet

    • Field Detail

      • TOOL_CONFIG_DIRECTORY

        public static final java.lang.String TOOL_CONFIG_DIRECTORY
        See Also:
        Constant Field Values
    • Constructor Detail

      • MapControlToolItemMboSet

        public MapControlToolItemMboSet(MboServerInterface ms)
                                 throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Description copied from class: MboSet
        Factory to create the business objects This must be overridden in derived class
        Specified by:
        getMboInstance in class MboSet
        Throws:
        MXException
        java.rmi.RemoteException
      • readFromJavascriptMatrix

        public void readFromJavascriptMatrix(java.util.Map availableWidgetMap,
                                             java.lang.String javascriptMatrix,
                                             java.lang.String appName)
                                      throws java.rmi.RemoteException,
                                             MXException
        Initialize this mbo set from a Javascript array form. The form of this Array is: [['RefresherTool', 'EVERYONE'], ['FullScreen', 'EVERYONE'], ['LayersTool', 'MAXADMIN', 'EVERYONE']]
        Parameters:
        javascriptMatrix -
        availableWidgetMap -
        Throws:
        MXException
        java.rmi.RemoteException
      • writeToJavascriptMatrix

        public java.lang.String writeToJavascriptMatrix()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Writes this mboset to a Javascript array form.
        Returns:
        A String containing all the selected tool items and its groups. For example: [['RefresherTool', 'EVERYONE'], ['FullScreen', 'EVERYONE'], ['LayersTool', 'MAXADMIN', 'EVERYONE']]
        Throws:
        MXException
        java.rmi.RemoteException
      • getDefaultToolItemGroupConfiguration

        public static java.lang.String getDefaultToolItemGroupConfiguration(java.util.List tools,
                                                                            UserInfo userInfo)
                                                                     throws java.rmi.RemoteException,
                                                                            MXException
        Method to fix the entire toolitems tag
        Parameters:
        tools -
        sb -
        Throws:
        MXException
        java.rmi.RemoteException
      • cleanToolConfiguration

        public static java.lang.String cleanToolConfiguration(java.lang.String toolConfig)
        Method to cleanup the tool configuration, removing the characters around it
        Parameters:
        toolConfig -
        Returns:
        String The configuration without any special character around it
      • isJavascriptInLegacyFormat

        public static boolean isJavascriptInLegacyFormat(java.lang.String javascriptArray)
        Checks if some javascript String is in legacy javascript format.
        Parameters:
        javascriptArray -
        Returns:
        true if it is legacy format, false otherwise.
      • migrateLegacyJavascriptFormat

        public static java.lang.String migrateLegacyJavascriptFormat(java.lang.String javascriptArray,
                                                                     UserInfo userInfo,
                                                                     java.lang.String appName)
                                                              throws java.rmi.RemoteException,
                                                                     MXException
        This method will migrate the legacy Javascript Array format to the new Javascript Matrix format.
        Parameters:
        javascriptArray -
        Returns:
        A javascript Matrix format
        Throws:
        MXException
        java.rmi.RemoteException
      • getDefaultTools

        public static java.util.List getDefaultTools(java.lang.String appName)
        Method that returns the default tools.
        Returns:
        List
      • extractToolItemsFromPresentation

        public static java.lang.String extractToolItemsFromPresentation(java.lang.String presentation)
        Method to extract the tool items statement from the presentation
        Parameters:
        presentation -
        Returns:
        String containing the tool item statement
      • getToolItemsFromDatabase

        public java.lang.String getToolItemsFromDatabase(java.lang.String appInstanceName)
                                                  throws java.rmi.RemoteException,
                                                         MXException
        This method access the presentation table and retrieves the content of the toolitems attribute.
        Parameters:
        appInstanceName - The application name instance.
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • generateNewPresentationFromToolItemsList

        public static java.lang.String generateNewPresentationFromToolItemsList(java.lang.String presentation,
                                                                                java.lang.String toolItems)
                                                                         throws java.rmi.RemoteException,
                                                                                MXException
        Updates the presentation with the new items list
        Parameters:
        presentation - The current presentation
        toolItems - The tool items list to be updated in the presentation
        Returns:
        String containing the new presentation with the tool items list
        Throws:
        MXException
        java.rmi.RemoteException
      • generateAllToolsEnabledString

        public java.lang.String generateAllToolsEnabledString(java.util.Map availabletWidgetMap,
                                                              java.lang.String toolItems,
                                                              java.lang.String appName)
                                                       throws java.rmi.RemoteException,
                                                              MXException
        Return a string with all the tools selected for the current app
        Parameters:
        availabletWidgetMap -
        toolItems -
        appName -
        Returns:
        A String with a list of all tools enabled
        Throws:
        java.rmi.RemoteException
        MXException