| | |
| | | public class TemplateEntry |
| | | { |
| | | /** The branch used to generate this entry (if it is associated with a branch). */ |
| | | private Branch branch; |
| | | private final Branch branch; |
| | | /** The DN for this template entry, if it is known. */ |
| | | private DN dn; |
| | | /** The DN of the parent entry for this template entry, if it is available. */ |
| | | private DN parentDN; |
| | | private final DN parentDN; |
| | | |
| | | /** |
| | | * The set of attributes associated with this template entry, mapped from the |
| | |
| | | private final LinkedHashMap<AttributeType, ArrayList<TemplateValue>> attributes = new LinkedHashMap<>(); |
| | | |
| | | /** The template used to generate this entry (if it is associated with a template). */ |
| | | private Template template; |
| | | private final Template template; |
| | | |
| | | |
| | | /** |
| | |
| | | public TemplateEntry(Branch branch) |
| | | { |
| | | this.branch = branch; |
| | | |
| | | dn = branch.getBranchDN(); |
| | | template = null; |
| | | parentDN = null; |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public TemplateEntry(Template template, DN parentDN) |
| | | { |
| | | this.branch = null; |
| | | dn = null; |
| | | this.template = template; |
| | | this.parentDN = parentDN; |
| | | } |
| | |
| | | return dn; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this entry contains one or more values for the specified |
| | | * attribute type. |
| | | * |
| | | * @param attributeType The attribute type for which to make the |
| | | * determination. |
| | | * |
| | | * @return <CODE>true</CODE> if this entry contains one or more values for |
| | | * the specified attribute type, or <CODE>false</CODE> if not. |
| | | */ |
| | | public boolean hasAttribute(AttributeType attributeType) |
| | | { |
| | | return attributes.containsKey(attributeType); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the value for the specified attribute, if defined. If the |
| | | * specified attribute has multiple values, then the first will be returned. |