Class SubEntry

java.lang.Object
org.opends.server.types.SubEntry

public final class SubEntry extends Object
This class represents RFC 3672 subentries and RFC 3671 collective attribute subentries objects.
  • Constructor Details

    • SubEntry

      public SubEntry(Entry entry, ServerContext serverContext) throws LdapException
      Constructs a subentry object from a given entry object.
      Parameters:
      entry - LDAP subentry to construct from.
      serverContext - The server context
      Throws:
      LdapException - if there is a problem with constructing a subentry from a given entry.
  • Method Details

    • getDN

      public Dn getDN()
      Retrieves the distinguished name for this subentry.
      Returns:
      The distinguished name for this subentry.
    • getEntry

      public Entry getEntry()
      Getter to retrieve the actual entry object for this subentry.
      Returns:
      entry object for this subentry.
    • isCollectiveOrInheritedCollective

      public boolean isCollectiveOrInheritedCollective()
      Indicates whether this subentry is a collective attribute subentry or an inherited collective attribute subentry.
      Returns:
      true if collective or inherited collective, false otherwise.
    • isInheritedFromDNCollective

      public boolean isInheritedFromDNCollective()
      Indicates whether this subentry is inherited from DN collective attribute subentry.
      Returns:
      true if inherited from DN collective, false otherwise.
    • isInheritedFromRDNCollective

      public boolean isInheritedFromRDNCollective()
      Indicates whether this subentry is inherited from RDN collective attribute subentry.
      Returns:
      true if inherited from RDN collective, false otherwise.
    • getInheritFromDNType

      public AttributeType getInheritFromDNType()
      Returns the attribute type where to find the DN of the entry from which to inherit collective attributes

      Only valid when isInheritedFromDNCollective() returns true.

      Returns:
      the attribute type where to find the DN of an entry, or null if there is none.
    • getInheritFromDNParent

      public int getInheritFromDNParent()
      Returns the number of parent levels to lookup in the DN for inherited collective attribute subentry.

      Only valid when:

      1. isInheritedFromDNCollective() returns true.
      2. getInheritFromDNType() returns a non-null value.
      Returns:
      the number of parent levels to lookup.
    • getInheritFromRDNAttrType

      public AttributeType getInheritFromRDNAttrType()
      Getter to retrieve inheritFromRDNAttribute type for inherited collective attribute subentry.
      Returns:
      Type of inheritFromRDNAttribute, or null if there is none.
    • getInheritFromRDNType

      public AttributeType getInheritFromRDNType()
      Getter to retrieve RDN type of inheritFromRDNType for inherited collective attribute subentry.
      Returns:
      RDN Type of inheritFromRDNAttribute, or null if there is none.
    • getInheritFromBaseDN

      public Dn getInheritFromBaseDN()
      Getter to retrieve inheritFromBaseRDN DN for inherited collective attribute subentry.
      Returns:
      DN of inheritFromBaseRDN, or null if there is none.
    • getSubTreeSpecification

      public SubtreeSpecification getSubTreeSpecification()
      Getter for subentry subtree specification.
      Returns:
      subtree specification for this subentry.
    • getCollectiveAttributes

      public List<Attribute> getCollectiveAttributes()
      Getter for collective attributes contained within this subentry.
      Returns:
      collective attributes contained within this subentry.
    • getInheritedCollectiveAttributes

      public Map<AttributeDescription,AttributeDescription> getInheritedCollectiveAttributes()
      Getter for inherited collective attributes mappings. The returned map's keys are the names of the attributes added to the entry and the map's values are the names of the attributes in the referenced entry.
      Returns:
      inherited collective attributes mappings.
    • getConflictBehavior

      public VirtualAttributeCfgDefn.ConflictBehavior getConflictBehavior()
      Getter for collective conflict behavior defined for this collective attribute's subentry.
      Returns:
      conflict behavior for this collective attribute's subentry.
    • toString

      public String toString()
      Overrides:
      toString in class Object