psdi.security.vmm

Class VMMDataMap

  • java.lang.Object
    • psdi.security.vmm.VMMDataMap


  • public class VMMDataMap
    extends java.lang.Object
    A class used to represent data mapping of a user or group object's VMM attributes to MAXIMO database tables and columns
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ALN
      ALN data type.
      static int CRYPTO
      Password field
      static int INTEGER
      INTEGER data type.
      static int LOWER
      LOWER case ALN data tpe.
      static int UPPER
      UPPER case ALN data type.
      static int YORN
      Boolean data type represented as 1 or 0.
    • Constructor Summary

      Constructors 
      Constructor and Description
      VMMDataMap() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addDataMap(java.lang.String tableId, java.lang.String table, java.lang.String column, java.lang.String attribute, boolean keyColumn, boolean required, boolean allowRecDelete, java.lang.String type)
      Adds the data mapping information to the appropriate internal data structures.
      boolean allowRecDelete(java.lang.String tableId)
      Returns whether the table row is allowed to be deleted or not when the required information is not available in VMM Server.
      java.lang.String getAttribute(java.lang.String tableId, java.lang.String column)
      Returns the attribute that's mapped to the given table column.
      java.lang.String getColumnNameForAttribute(java.lang.String tableId, java.lang.String attributeName)
      Get the column name for the given attribute name.
      java.util.Iterator getColumnNames(java.lang.String tableId)
      Returns an iterator to iterate over list of columns for the given table id.
      java.util.Iterator getKeyColumnNames(java.lang.String tableId)
      Returns an iterator to iterate over list of key columns for the given table id.
      java.lang.String getObjectName(java.lang.String tableId, java.sql.Connection con)
      Returns object name for a given table id.
      java.lang.String getTableId(java.lang.String objectName)
      Returns Table ID for a given object name.
      java.util.Iterator getTableIds()
      Returns an iterator to iterate the table ids
      java.lang.String getTableName(java.lang.String tableId)
      Returns table name for a given table id.
      java.lang.String getType(java.lang.String tableId, java.lang.String column)
      Returns data type of the column.
      int getTypeAsInt(java.lang.String tableId, java.lang.String column)
      Returns data type of the column as an integer value.
      java.lang.String[] getVMMAttributes()
      Returns list of configured VMM attributes.
      boolean isMappedToVMMAttribute(java.lang.String tableId, java.lang.String column)
      Returns whether the given column is mapped to an VMM attribute or not.
      boolean isRequired(java.lang.String tableId, java.lang.String column)
      Returns whether the given column is required or not.
      boolean isSysDateColumn(java.lang.String tableId, java.lang.String column)
      Returns whether the column is configured to have system date when adding records.
      boolean isUniqueIdColumn(java.lang.String tableId, java.lang.String column)
      Returns whether the column is configured to have unique id generated when adding records.
      java.lang.String toString()
      Returns a string representation of the data for debug purpose.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • VMMDataMap

        public VMMDataMap()
    • Method Detail

      • addDataMap

        public void addDataMap(java.lang.String tableId,
                               java.lang.String table,
                               java.lang.String column,
                               java.lang.String attribute,
                               boolean keyColumn,
                               boolean required,
                               boolean allowRecDelete,
                               java.lang.String type)
        Adds the data mapping information to the appropriate internal data structures.
        Parameters:
        tableId - table id
        table - name of database table
        column - name of database column
        attribute - VMM attribute to be used
        keyColumn - indicates whether this is a key column or not
        required - indicates whether a value is a required or not
        allowRecDelete - indicates whether a record should be delete or not when the required columns do not have data.
      • getTableName

        public java.lang.String getTableName(java.lang.String tableId)
        Returns table name for a given table id.
        Parameters:
        tableId - table id for which table name is needed.
        Returns:
        table name for a given table id, if present, otherwise null.
      • getTableId

        public java.lang.String getTableId(java.lang.String objectName)
        Returns Table ID for a given object name.
        Parameters:
        objectName - Object name for which table ID is needed.
        Returns:
        TableID, if present, otherwise null.
      • getObjectName

        public java.lang.String getObjectName(java.lang.String tableId,
                                              java.sql.Connection con)
        Returns object name for a given table id.
        Parameters:
        tableId - table id for which object name is needed.
        Returns:
        Object name for a given table id, if present, otherwise empty string.
      • allowRecDelete

        public boolean allowRecDelete(java.lang.String tableId)
        Returns whether the table row is allowed to be deleted or not when the required information is not available in VMM Server.
        Parameters:
        tableId - tableId table id for which the information is needed.
        Returns:
        true, if the table row is allowed to be deleted, otherwise false.
      • getTableIds

        public java.util.Iterator getTableIds()
        Returns an iterator to iterate the table ids
        Returns:
        an iterator to iterate the table ids
      • isUniqueIdColumn

        public boolean isUniqueIdColumn(java.lang.String tableId,
                                        java.lang.String column)
        Returns whether the column is configured to have unique id generated when adding records.
        Parameters:
        tableId - table id
        column - column name
        Returns:
        true, if column is configured to have unique id.
      • isSysDateColumn

        public boolean isSysDateColumn(java.lang.String tableId,
                                       java.lang.String column)
        Returns whether the column is configured to have system date when adding records.
        Parameters:
        tableId - table id
        column - column name
        Returns:
        true, if column is configured to have system date.
      • getColumnNames

        public java.util.Iterator getColumnNames(java.lang.String tableId)
        Returns an iterator to iterate over list of columns for the given table id.
        Parameters:
        tableId - table id.
        Returns:
        an iterator to iterate over list of columns for the given table id.
      • getKeyColumnNames

        public java.util.Iterator getKeyColumnNames(java.lang.String tableId)
        Returns an iterator to iterate over list of key columns for the given table id.
        Parameters:
        tableId - table id.
        Returns:
        an iterator to iterate over list of key columns for the given table id.
      • getColumnNameForAttribute

        public java.lang.String getColumnNameForAttribute(java.lang.String tableId,
                                                          java.lang.String attributeName)
        Get the column name for the given attribute name.
        Returns:
        The columnName for the given attributename, e.g. sAMAccountName; null if not found.
      • isMappedToVMMAttribute

        public boolean isMappedToVMMAttribute(java.lang.String tableId,
                                              java.lang.String column)
        Returns whether the given column is mapped to an VMM attribute or not.
        Parameters:
        tableId - table id.
        column - column name
        Returns:
        true, if the given column is mapped to an VMM attribute.
      • getAttribute

        public java.lang.String getAttribute(java.lang.String tableId,
                                             java.lang.String column)
        Returns the attribute that's mapped to the given table column.
        Parameters:
        tableId - table id.
        column - column name, e.g. 'personid'
        Returns:
        the attribute that's mapped to the given table column, e.g. 'sAMAccountName'
      • isRequired

        public boolean isRequired(java.lang.String tableId,
                                  java.lang.String column)
        Returns whether the given column is required or not.
        Parameters:
        tableId - table id.
        column - column name
        Returns:
        true, if the given column is required or not.
      • getType

        public java.lang.String getType(java.lang.String tableId,
                                        java.lang.String column)
        Returns data type of the column.
        Parameters:
        tableId - table id.
        column - column name
        Returns:
        data type of the column
      • getTypeAsInt

        public int getTypeAsInt(java.lang.String tableId,
                                java.lang.String column)
        Returns data type of the column as an integer value.
        Parameters:
        tableId - table id.
        column - column name
        Returns:
        data type of the column as an integer value.
      • getVMMAttributes

        public java.lang.String[] getVMMAttributes()
        Returns list of configured VMM attributes.
        Returns:
        list of configured VMM attributes.
      • toString

        public java.lang.String toString()
        Returns a string representation of the data for debug purpose.
        Overrides:
        toString in class java.lang.Object