psdi.security.ldap

Class LdapSyncEvent

  • java.lang.Object
    • psdi.security.ldap.LdapSyncEvent


  • public class LdapSyncEvent
    extends java.lang.Object
    An event class used to notify the listener object when it's time to synchronize individual user and group data to MAXIMO database tables. The event object contains all the necessary information needed by the listener object to perform the task. The event id can be used to determine the nature of the event and based on the event id, the appropriate information is available in the event object.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int SYNC_ENDED
      An event indicating the end of the synchronization.
      static int SYNC_GROUP
      An event indicating that group data need to be synchronized.
      static int SYNC_GROUPMEMBERS
      An event indicating that group member data need to be synchronized.
      static int SYNC_STARTING
      An event indicating the start of the synchronization.
      static int SYNC_USER
      An event indicating that user data need to be synchronized.
    • Constructor Summary

      Constructors 
      Constructor and Description
      LdapSyncEvent(int eventId, java.sql.Connection con, MXLogger logger, MXLogger sqlLogger, UserInfo userInfo)
      Constructor to be used to indicate start and end events.
      LdapSyncEvent(int eventId, DataMap dataMap, SyncData syncData)
      Constructor to be used to indicate user and group data synchronization events.
      LdapSyncEvent(int eventId, MemberDataMap memberDataMap, SyncData syncData, java.util.Set members)
      Constructor to be used to indicate group member data synchronization events.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.sql.Connection getConnection()
      Returns the database connection to be used, which is availabe only for the start and end events.
      int getEventType()
      Returns the event id to indicate the type of event.
      DataMap getGroupDataMap()
      Returns the group data mapping as defined in the configuration file.
      MemberDataMap getGroupMemberDataMap()
      Returns the group member data mapping as defined in the configuration file.
      java.util.Set getGroupMembers()
      Returns the list of group members.
      SyncData getGroupSyncData()
      Returns the group data obtained from the LDAP Server that should be synchronized to MAXIMO database tables.
      MXLogger getLogger()
      Returns the logger object to be used to log messages.
      MXLogger getSqlLogger()
      Returns the logger object to be used to log SQL messages.
      DataMap getUserDataMap()
      Returns the user data mapping as defined in the configuration file.
      UserInfo getUserInfo()
      Returns the UserInfo for getting MboSets.
      SyncData getUserSyncData()
      Returns the user data obtained from the LDAP Server that should be synchronized to MAXIMO database tables.
      • Methods inherited from class java.lang.Object

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

      • SYNC_STARTING

        public static final int SYNC_STARTING
        An event indicating the start of the synchronization.
        See Also:
        Constant Field Values
      • SYNC_USER

        public static final int SYNC_USER
        An event indicating that user data need to be synchronized.
        See Also:
        Constant Field Values
      • SYNC_GROUP

        public static final int SYNC_GROUP
        An event indicating that group data need to be synchronized.
        See Also:
        Constant Field Values
      • SYNC_GROUPMEMBERS

        public static final int SYNC_GROUPMEMBERS
        An event indicating that group member data need to be synchronized.
        See Also:
        Constant Field Values
      • SYNC_ENDED

        public static final int SYNC_ENDED
        An event indicating the end of the synchronization.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LdapSyncEvent

        public LdapSyncEvent(int eventId,
                             java.sql.Connection con,
                             MXLogger logger,
                             MXLogger sqlLogger,
                             UserInfo userInfo)
        Constructor to be used to indicate start and end events.
        Parameters:
        eventId - event id, either SYNC_STARTING or SYNC_ENDED.
        con - database connection.
        logger - logger object to be used to log messages.
        sqlLogger - logger object to be used to log SQL messages.
        userInfo - UserInfo for getting MboSets.
      • LdapSyncEvent

        public LdapSyncEvent(int eventId,
                             DataMap dataMap,
                             SyncData syncData)
        Constructor to be used to indicate user and group data synchronization events.
        Parameters:
        eventId - event id, either SYNC_USER or SYNC_GROUP.
        dataMap - user or group data mapping.
        syncData - data from the LDAP Server that should be synchronized to MAXIMO tables.
      • LdapSyncEvent

        public LdapSyncEvent(int eventId,
                             MemberDataMap memberDataMap,
                             SyncData syncData,
                             java.util.Set members)
        Constructor to be used to indicate group member data synchronization events.
        Parameters:
        eventId - event id, SYNC_GROUPMEMBERS.
        memberDataMap - group member data mapping
        syncData - group data from the LDAP Server that should be synchronized to MAXIMO tables.
        members - list of user accounts that are members of the group.
    • Method Detail

      • getEventType

        public int getEventType()
        Returns the event id to indicate the type of event.
        Returns:
        the event id to indicate the type of event.
      • getConnection

        public java.sql.Connection getConnection()
        Returns the database connection to be used, which is availabe only for the start and end events.
        Returns:
        the database connection to be used.
      • getUserInfo

        public UserInfo getUserInfo()
        Returns the UserInfo for getting MboSets.
      • getLogger

        public MXLogger getLogger()
        Returns the logger object to be used to log messages.
        Returns:
        the logger object to be used to log messages.
      • getSqlLogger

        public MXLogger getSqlLogger()
        Returns the logger object to be used to log SQL messages.
        Returns:
        the logger object to be used to log SQL messages.
      • getUserSyncData

        public SyncData getUserSyncData()
        Returns the user data obtained from the LDAP Server that should be synchronized to MAXIMO database tables.
        Returns:
        the user data obtained from the LDAP Server.
      • getUserDataMap

        public DataMap getUserDataMap()
        Returns the user data mapping as defined in the configuration file.
        Returns:
        the user data mapping as defined in the configuration file.
      • getGroupSyncData

        public SyncData getGroupSyncData()
        Returns the group data obtained from the LDAP Server that should be synchronized to MAXIMO database tables.
        Returns:
        the group data obtained from the LDAP Server.
      • getGroupDataMap

        public DataMap getGroupDataMap()
        Returns the group data mapping as defined in the configuration file.
        Returns:
        the group data mapping as defined in the configuration file.
      • getGroupMemberDataMap

        public MemberDataMap getGroupMemberDataMap()
        Returns the group member data mapping as defined in the configuration file.
        Returns:
        the group member data mapping as defined in the configuration file.
      • getGroupMembers

        public java.util.Set getGroupMembers()
        Returns the list of group members.
        Returns:
        the list of group members.