Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.SubEntry


   * Add a given entry to this subentry manager.
   * @param entry to add.
   */
  private void addSubEntry(Entry entry) throws DirectoryException
  {
    SubEntry subEntry = new SubEntry(entry);
    SubtreeSpecification subSpec =
            subEntry.getSubTreeSpecification();
    DN subDN = subSpec.getBaseDN();
    List<SubEntry> subList = null;
    lock.writeLock().lock();
    try
    {
      if (subEntry.isCollective() || subEntry.isInheritedCollective())
      {
        subList = dn2CollectiveSubEntry.get(subDN);
      }
      else
      {
        subList = dn2SubEntry.get(subDN);
      }
      if (subList == null)
      {
        subList = new ArrayList<SubEntry>();
        if (subEntry.isCollective() || subEntry.isInheritedCollective())
        {
          dn2CollectiveSubEntry.put(subDN, subList);
        }
        else
        {
View Full Code Here


        Map.Entry<DN, List<SubEntry>> mapEntry = setIterator.next();
        List<SubEntry> subList = mapEntry.getValue();
        Iterator<SubEntry> listIterator = subList.iterator();
        while (listIterator.hasNext())
        {
          SubEntry subEntry = listIterator.next();
          if (subEntry.getDN().equals(entry.getDN()))
          {
            dit2SubEntry.remove(entry.getDN());
            listIterator.remove();
            removed = true;
            break;
          }
        }
        if (subList.isEmpty())
        {
          setIterator.remove();
        }
        if (removed)
        {
          return;
        }
      }
      setIterator = dn2CollectiveSubEntry.entrySet().iterator();
      while (setIterator.hasNext())
      {
        Map.Entry<DN, List<SubEntry>> mapEntry = setIterator.next();
        List<SubEntry> subList = mapEntry.getValue();
        Iterator<SubEntry> listIterator = subList.iterator();
        while (listIterator.hasNext())
        {
          SubEntry subEntry = listIterator.next();
          if (subEntry.getDN().equals(entry.getDN()))
          {
            dit2SubEntry.remove(entry.getDN());
            listIterator.remove();
            removed = true;
            break;
View Full Code Here

        Map.Entry<DN, List<SubEntry>> mapEntry = setIterator.next();
        List<SubEntry> subList = mapEntry.getValue();
        Iterator<SubEntry> listIterator = subList.iterator();
        while (listIterator.hasNext())
        {
          SubEntry subEntry = listIterator.next();
          if (backend.handlesEntry(subEntry.getDN()))
          {
            dit2SubEntry.remove(subEntry.getDN());
            listIterator.remove();

            // Notify change listeners.
            for (SubentryChangeListener changeListener :
              changeListeners)
            {
              try
              {
                changeListener.handleSubentryDelete(
                        subEntry.getEntry());
              }
              catch (Exception e)
              {
                if (debugEnabled())
                {
                  TRACER.debugCaught(DebugLogLevel.ERROR, e);
                }
              }
            }
          }
        }
        if (subList.isEmpty())
        {
          setIterator.remove();
        }
      }
      setIterator = dn2CollectiveSubEntry.entrySet().iterator();
      while (setIterator.hasNext())
      {
        Map.Entry<DN, List<SubEntry>> mapEntry = setIterator.next();
        List<SubEntry> subList = mapEntry.getValue();
        Iterator<SubEntry> listIterator = subList.iterator();
        while (listIterator.hasNext())
        {
          SubEntry subEntry = listIterator.next();
          if (backend.handlesEntry(subEntry.getDN()))
          {
            dit2SubEntry.remove(subEntry.getDN());
            listIterator.remove();

            // Notify change listeners.
            for (SubentryChangeListener changeListener :
              changeListeners)
            {
              try
              {
                changeListener.handleSubentryDelete(
                        subEntry.getEntry());
              }
              catch (Exception e)
              {
                if (debugEnabled())
                {
View Full Code Here

   *         given subentry.
   */
  public static void checkSubentryAcceptable(Entry entry)
          throws DirectoryException
  {
    SubEntry subentry = new SubEntry(entry);
    SubentryPasswordPolicy subentryPolicy =
            new SubentryPasswordPolicy(subentry);
    try
    {
      new PasswordPolicy(subentryPolicy);
View Full Code Here

  {
    if (entry.isPasswordPolicySubentry())
    {
      try
      {
        SubEntry subentry = new SubEntry(entry);
        PasswordPolicyConfig config =
                  createPasswordPolicyConfig(subentry);
        DirectoryServer.registerPasswordPolicy(
            subentry.getDN(), config);
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
View Full Code Here

    if (newEntry.isPasswordPolicySubentry())
    {
      try
      {
        SubEntry subentry = new SubEntry(newEntry);
        PasswordPolicyConfig config =
                  createPasswordPolicyConfig(subentry);
        DirectoryServer.registerPasswordPolicy(
            subentry.getDN(), config);
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
View Full Code Here

    if (newEntry.isPasswordPolicySubentry())
    {
      try
      {
        SubEntry subentry = new SubEntry(newEntry);
        PasswordPolicyConfig config =
                  createPasswordPolicyConfig(subentry);
        DirectoryServer.registerPasswordPolicy(
            subentry.getDN(), config);
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
View Full Code Here

TOP

Related Classes of org.nasutekds.server.types.SubEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.