no.feide.moria.directory.index
Class IndexedReference

java.lang.Object
  extended by no.feide.moria.directory.index.IndexedReference

public class IndexedReference
extends java.lang.Object

Represents an indexed reference to an external element. Used to distinguish between explicitly and implicitly indexed references.


Field Summary
private  boolean explicit
          true if this is a fully qualified reference to an external element.
private  java.lang.String[] myPasswords
          Passwords, where each element matches the same index in myReferences.
private  java.lang.String[] myReferences
          External references.
private  java.lang.String[] myUsernames
          Usernames, where each element matches the same index in myReferences.
 
Constructor Summary
IndexedReference(java.lang.String[] references, java.lang.String[] usernames, java.lang.String[] passwords, boolean explicitReference)
          Constructor.
 
Method Summary
 java.lang.String[] getPasswords()
          Gets the external passwords.
 java.lang.String[] getReferences()
          Gets the external references.
 java.lang.String[] getUsernames()
          Gets the usernames.
 boolean isExplicitlyIndexed()
          Checks whether this reference is an explicit reference to an external element, or an implicit reference to a search base of some sort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myReferences

private final java.lang.String[] myReferences
External references.


myUsernames

private final java.lang.String[] myUsernames
Usernames, where each element matches the same index in myReferences.


myPasswords

private final java.lang.String[] myPasswords
Passwords, where each element matches the same index in myReferences.


explicit

private final boolean explicit
true if this is a fully qualified reference to an external element.

Constructor Detail

IndexedReference

public IndexedReference(java.lang.String[] references,
                        java.lang.String[] usernames,
                        java.lang.String[] passwords,
                        boolean explicitReference)
                 throws java.lang.IllegalArgumentException
Constructor. Creates a new indexed reference.

Parameters:
references - One or more external references. Cannot be null.
usernames - Usernames for each external reference. Cannot be null, and must have the same number of elements as references.
passwords - Passwords for each external reference. Cannot be null, and must have the same number of elements as references.
explicitReference - true if this is a fully qualified reference to an external element, otherwise false.
Throws:
java.lang.NullPointerException
java.lang.IllegalArgumentException - If references is null or an empty array, or if usernames or passwords are null or contain a different number of elements than references.
Method Detail

getReferences

public final java.lang.String[] getReferences()
Gets the external references.

Returns:
One or more external references.

getUsernames

public final java.lang.String[] getUsernames()
Gets the usernames.

Returns:
One or more usernames.

getPasswords

public final java.lang.String[] getPasswords()
Gets the external passwords.

Returns:
One or more passwords.

isExplicitlyIndexed

public final boolean isExplicitlyIndexed()
Checks whether this reference is an explicit reference to an external element, or an implicit reference to a search base of some sort.

Returns:
true if this is a fully qualified external reference to an element, otherwise false.


Copyright © 2001-2006 UNINETT FAS. All Rights Reserved.