psdi.mbo

Class DataRestrictionCache

  • java.lang.Object
    • psdi.mbo.DataRestrictionCache
  • All Implemented Interfaces:
    MaximoCache, FixedLoggerNames, FixedLoggers


    public class DataRestrictionCache
    extends java.lang.Object
    implements MaximoCache, FixedLoggers
    Maximo cache to keep track which group data security specified for an app, object, attribute. The cache is accessd by everywhere when it needs to check wether a restriction needs to be processed. No where else has information regarding who has the data restriction. We keep this centralized cache to avoid updating more than one place when a restriction is added, deleted or modified. TODO: In development and not completed or finalized. Pending the merge rules if any for the restrictions for the groups that the user all belong. The data structure of the cache has a great chance of chaning too. Also need to decide if a cache for each user should also be keped in a least referenced fashion in order to avoid fetching the restrictions for its multiple groups everytime.
    • Field Detail

      • fastAccess

        public LRUCache fastAccess
        Enable instant retrival of a already figured out ResourceBundle.
    • Constructor Detail

      • DataRestrictionCache

        public DataRestrictionCache()
    • Method Detail

      • get

        public DataRestrictionCache.RestrictionBundle get(int level,
                                                          MboSetRemote msr,
                                                          java.lang.String attrName)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Get a restrictions of the specified restriction level for the given attribute, or object if the attribute parameter is null. The restriction is for the user who owns the passed in mbo set. Returns null or an empty object if there is no restrictions.
        Parameters:
        level -
        msr -
        attrName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • clearFromFastAccess

        public void clearFromFastAccess(java.lang.String userName)
      • getName

        public java.lang.String getName()
        Description copied from interface: MaximoCache
        Returns the name of the cache object. Should be unique within the app server. This name is used to uniquely identify the cache object among all cached object for both accessing the cache object as well as refreshing the cache object. Ex. MaximoDD returns "MAXIMODD"
        Specified by:
        getName in interface MaximoCache
        Returns:
      • reload

        public void reload()
                    throws MXException
        Description copied from interface: MaximoCache
        Reloads the cache object. This will be called by the app server whenever the cache needs to be refreshed. Don't call this method directly. Instead call MXServer.reloadCache(String, boolean).
        Specified by:
        reload in interface MaximoCache
        Throws:
        MXException
      • reload

        public void reload(java.lang.String key)
                    throws MXException
        Description copied from interface: MaximoCache
        Initialize a specific component of the cache identified by the key. E.g. In Maxvars, a specific maxvar can be reinitiliazed from the database. Don't call this method directly. Instead call MXServer.reloadCache(String, String, boolean).
        Specified by:
        reload in interface MaximoCache
        Throws:
        MXException
      • dump

        public void dump()