com.google.enterprise.adaptor
Class Principal

java.lang.Object
  extended by com.google.enterprise.adaptor.Principal
All Implemented Interfaces:
Comparable<Principal>
Direct Known Subclasses:
GroupPrincipal, UserPrincipal

public abstract class Principal
extends Object
implements Comparable<Principal>

Represents either a user or a group.


Field Summary
static String DEFAULT_NAMESPACE
           
 
Method Summary
 int compareTo(Principal other)
          Sorts by 1) namespace, 2) user or group, 3) name.
 boolean equals(Object other)
           
 String getName()
           
 String getNamespace()
           
 int hashCode()
           
abstract  boolean isGroup()
           
abstract  boolean isUser()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_NAMESPACE

public static final String DEFAULT_NAMESPACE
See Also:
Constant Field Values
Method Detail

getName

public String getName()

getNamespace

public String getNamespace()

isUser

public abstract boolean isUser()

isGroup

public abstract boolean isGroup()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Principal other)
Sorts by 1) namespace, 2) user or group, 3) name.

Specified by:
compareTo in interface Comparable<Principal>