psdi.dm.collection

Class DMCollEventListenerMgr

  • java.lang.Object
    • psdi.dm.collection.DMCollEventListenerMgr
  • All Implemented Interfaces:
    MaximoCache


    public class DMCollEventListenerMgr
    extends java.lang.Object
    implements MaximoCache
    This class holds all events information of the Migration collections and manages them. For each mbo only one listener is registered.
    • Constructor Detail

      • DMCollEventListenerMgr

        public DMCollEventListenerMgr()
        Constructor to initialize all event lists.
    • Method Detail

      • 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:
      • unRegisterEventsForKey

        public void unRegisterEventsForKey(java.lang.String key)
                                    throws MXException
        Throws:
        MXException
      • registerEventsForKey

        public void registerEventsForKey(java.lang.String key)
                                  throws MXException
        Throws:
        MXException
      • unregisterAllEventListeners

        public void unregisterAllEventListeners()
                                         throws MXException
        Unregister all event listeners
        Throws:
        MXException
      • initCollEventListner

        public void initCollEventListner()
                                  throws MXException
        Initialize all Hashmaps needed to keep track the events. This should be called from the DMService.
        Throws:
        MXException
      • initCollectionPersonMap

        public void initCollectionPersonMap()
                                     throws MXException
        Initialize collectionPersonMap. collectionPersonMap holds all users whose events should be tracked for all collections.
        Throws:
        MXException
      • removeFromCollectionPersonMap

        public void removeFromCollectionPersonMap(long dmCollectionId)
                                           throws MXException
        Remove person map for a collection.
        Parameters:
        dmCollectionId - COLLECTIONID for which the person map should be removed
        Throws:
        MXException
      • isValidPerson

        public boolean isValidPerson(long dmCollectionId,
                                     java.lang.String userName)
                              throws MXException
        Should this user's event be tracked for the given collection.
        Parameters:
        dmCollectionId - COLLECTIONID of the collection
        userName - User name
        Returns:
        Throws:
        MXException
      • addToCollectionPersonMap

        public void addToCollectionPersonMap(long dmCollectionId,
                                             java.lang.String roleName,
                                             UserInfo userInfo)
                                      throws MXException,
                                             java.rmi.RemoteException
        Find all users for this role and add to collectionPersonMap
        Parameters:
        dmCollectionId -
        roleName -
        userInfo -
        Throws:
        MXException
        java.rmi.RemoteException
      • registerAllEventHandlersAtStartup

        public void registerAllEventHandlersAtStartup()
                                               throws MXException
        This method registers all events for collections.
        Throws:
        java.lang.Exception
        MXException
      • unregisterEventListenersForCollection

        public void unregisterEventListenersForCollection(long collectionid)
                                                   throws MXException
        Unregister events for a collection
        Parameters:
        collectionid -
        Throws:
        MXException