Class GDAMManager

java.lang.Object
com.isode.dsapi.config.GDAMManager

public class GDAMManager extends Object
GDAM manager manages the various GDAM entries stored in the directory session.
Since:
15.0
Author:
mv
  • Constructor Details

    • GDAMManager

      public GDAMManager(IsodeDirectorySession ds)
      Constructor for GDAM manager.
      Parameters:
      ds - Isode directory session
  • Method Details

    • create

      Create a GDAM.
      Parameters:
      name - GDAM name
      dir - Path to directory where GDAM will be created (on the DSA system). The path provided can be absolute or a single sub-directory name (that will be treated as relative to the DSA's directory on the filesystem).
      gdamtype - Type of GDAM.
      Returns:
      constructed GDAM entry
      Throws:
      BadValueException - if the name is invalid.
      ReadFailedException - if there is a problem on reading the committed entry back.
      DSAPIException - if there is a problem on applying the changes to the directory.
      ConfigOpFailedException - if there is any other problem on applying the changes.
    • delete

      public boolean delete(String name) throws ConfigOpFailedException
      Remove a GDAM entry.
      Parameters:
      name - GDAM name
      Returns:
      TRUE if the GDAM entry corresponding to the name was found, FALSE otherwise
      Throws:
      ConfigOpFailedException - if the operation failed.
    • load

      public void load(Entry entry) throws ConfigOpFailedException, ReadFailedException
      Load a GDAM entry.
      Parameters:
      entry - Entry.
      Throws:
      ConfigOpFailedException - if mandatory attributes are not loaded
      ReadFailedException - if there is an error while reading data from the directory server
    • get

      public HashMap<String,GDAMEntry> get()
      Get the hash map of GDAMEntry.
      Returns:
      hash map of GDAMEntry
    • get

      public GDAMEntry get(DN dn)
      Get a GDAMEntry by the DN of the configuration entry.
      Parameters:
      dn - DN of entry
      Returns:
      GDAMEntry found or null if not found
    • get

      public GDAMEntry get(String name)
      Get a GDAM by the GDAM name.
      Parameters:
      name - GDAM name
      Returns:
      GDAM found or null if not found
    • doesGdamNameExist

      public boolean doesGdamNameExist(String gdamName)
      Checks whether the given GDAM name already exists.
      Parameters:
      gdamName - GDAM name
      Returns:
      TRUE if exists, FALSE otherwise
    • getGdamPath

      public String getGdamPath()
      Get a default GDAM path.
      Returns:
      default GDAM path
    • validateName

      public void validateName(String gdamName) throws ConfigOpFailedException
      Validates given GDAM name.
      Parameters:
      gdamName - GDAM name
      Throws:
      ConfigOpFailedException - in case name is invalid or already exists