Interface Driver<U,​G>

All Known Implementing Classes:
BaseRestDriver

public interface Driver<U,​G>
Classes that implement Driver should be able to connect to some kind of data system and be able to perform user and group CRUD operations, and may also have the ability to assign a user to a group or remove him from a group. Some drivers may not be able to support all methods (for example, some systems may not allow you to delete a user, or assign him to a group). In those cases, implementations should throw UnsupportedOperationException to indicate it's not supported.
  • Method Details

    • getRequiredPropertyNames

      Set<ConnectorProperty> getRequiredPropertyNames()
      Returns the names of the properties for properties that must be present in order for this Driver to function.
      Returns:
      Set containing property names, represented as a set of enum values. Returning null or an empty set is also allowed if there are no properties for this driver.
    • initialize

      void initialize​(BaseConnectorConfiguration configuration, Authenticator authenticator) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Receives the configuration and authenticator objects that may be needed by the driver. In this method, any additional initialization that needs to be done to prep the Driver for repeated usage should also be done.
      Parameters:
      configuration - Reference to Configuration object so that this driver has access to configuration properties and the access token.
      authenticator - Reference to the Authenticator object in case this Driver needs to make a call to reauthenticate (often because of a timeout or token expiration condition).
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException - If a problem occurred that prevented Driver from completing it's initialization.
    • test

      void test() throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Performs a quick ping or health check to verify the Driver is still working or valid. Some Drivers may opt to a simpler sanity check (like making sure the configuration, authenticator or other fields are not null) or have this as a no-op, which is acceptable. NOTE: Midpoint systems tend to invoke this often, so be cautious this is a relatively inexpensive operation.
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException - if connector test failed in some way
    • close

      void close()
      Close any resources associated with this driver so that the object is unusable going forward.
    • createUser

      String createUser​(U userModel) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • createGroup

      String createGroup​(G groupModel) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • updateUser

      void updateUser​(String userId, U userModel) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • updateGroup

      void updateGroup​(String groupId, G groupModel) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • deleteUser

      void deleteUser​(String userId) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • deleteGroup

      void deleteGroup​(String groupId) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • getUsers

      List<U> getUsers() throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • getGroups

      List<G> getGroups() throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • getUser

      U getUser​(String userId) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • getGroup

      G getGroup​(String groupId) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • addGroupToUser

      void addGroupToUser​(String groupId, String userId) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException
    • removeGroupFromUser

      void removeGroupFromUser​(String groupId, String userId) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException