psdi.mbo

Class MaxMessageCache

  • java.lang.Object
    • psdi.mbo.MaxMessageCache
    • Constructor Detail

      • MaxMessageCache

        public MaxMessageCache()
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialize the cache object. This will be called by the app server on startup.
        Specified by:
        init in interface MaximoCache
        Throws:
        MXException
      • reload

        public void reload()
                    throws MXException
        Reloads the cache object. It simply clears everything in the cache. The value then will be reloaded on demand. This will be called by the app server whenever the cache needs to be refreshed.
        Specified by:
        reload in interface MaximoCache
        Throws:
        MXException
      • reload

        public void reload(java.lang.String hashKey)
                    throws MXException
        Initialize a specific component of the cache identified by the key. If the key is composed as message group and message key seperated by a bar "|", the already loaded message of all languages will be reloaded. If the key is only one string. It will be interpruted as the group name, then everything of this group in all languages will be unloaded. The messages of the group will be loaded on demand when requested. If nothing was loaded when the reload request is issued, the messages will remain unloaded until a request to reference a message of the group is issued.
        Specified by:
        reload in interface MaximoCache
        Parameters:
        key - group|key or group only if there is no bar in the string
        Throws:
        MXException
      • reload

        public void reload(java.lang.String group,
                           java.lang.String key,
                           java.lang.String langCode)
                    throws MXException,
                           java.rmi.RemoteException
        Reload a specific message in a particular language. A query will be made the the database for this message and the information will be re-cached.
        Parameters:
        group - message group
        key - message key
        langCode - language code
        Throws:
        MXException
        java.rmi.RemoteException
      • getName

        public java.lang.String getName()
        Returns the name of the cache object MAXMESSAGECACHE.
        Specified by:
        getName in interface MaximoCache
        Returns:
      • getMaxMessage

        public MaxMessage getMaxMessage(java.lang.String group,
                                        java.lang.String key,
                                        UserInfo ui)
                                 throws MXException,
                                        java.rmi.RemoteException
        Get the MaxMessage object in the language specified in the userinfo.
        Parameters:
        bundle -
        key -
        ui -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getMaxMessage

        public MaxMessage getMaxMessage(java.lang.String group,
                                        java.lang.String key,
                                        java.lang.String langCode)
                                 throws MXException,
                                        java.rmi.RemoteException
        Get the message for group,key and language
        Parameters:
        group -
        key -
        langCode -
        Returns:
        Message
        Throws:
        MXException
        java.rmi.RemoteException
      • getMessage

        public Message getMessage(java.lang.String group,
                                  java.lang.String key,
                                  UserInfo ui)
                           throws MXException,
                                  java.rmi.RemoteException
        Get the psdi.util.Message object of the message specified by the group, key, in the language of the user info.
        Parameters:
        group -
        key -
        ui -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getTaggedMessage

        public Message getTaggedMessage(java.lang.String group,
                                        java.lang.String key,
                                        UserInfo ui)
                                 throws MXException,
                                        java.rmi.RemoteException
        Called from MXException This message will tag the group and key information also Get the psdi.util.Message object of the message specified by the group, key, in the language of the user info.
        Parameters:
        group -
        key -
        ui -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getTaggedMessage

        public Message getTaggedMessage(java.lang.String group,
                                        java.lang.String key,
                                        java.lang.String langCode)
                                 throws MXException,
                                        java.rmi.RemoteException
        Get the message for the group,key and language
        Parameters:
        group -
        key -
        langCode -
        Returns:
        Message
        Throws:
        MXException
        java.rmi.RemoteException
      • getMaxMessage

        public MaxMessage getMaxMessage(java.lang.String group,
                                        java.lang.String key)
                                 throws MXException,
                                        java.rmi.RemoteException
        Get the MaxMessage object in base language.
        Parameters:
        bundle -
        key -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getMessage

        public Message getMessage(java.lang.String group,
                                  java.lang.String key)
                           throws MXException,
                                  java.rmi.RemoteException
        Get the psdi.util.Message of the base language.
        Parameters:
        group -
        key -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getTaggedMessage

        public Message getTaggedMessage(java.lang.String group,
                                        java.lang.String key)
                                 throws MXException,
                                        java.rmi.RemoteException
        Called from MXException This message will tag the group and key information also Get the psdi.util.Message of the base language.
        Parameters:
        group -
        key -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • loadMsgGroup

        public void loadMsgGroup(java.lang.String group,
                                 UserInfo ui)
                          throws MXException,
                                 java.rmi.RemoteException
        Load the entire message group to the cache for the language specified in the userInfo.
        Parameters:
        ui -
        Throws:
        MXException
        java.rmi.RemoteException
      • isMsgBundleLoaded

        public boolean isMsgBundleLoaded(java.lang.String msgGroup,
                                         java.lang.String langCode)
        Returns true if the message group has already loaded for the language specified in the userinfo.
        Parameters:
        ui -
        Returns: