Constructor and Description |
---|
Principal(SpiConstants.PrincipalType principalType,
java.lang.String namespace,
java.lang.String name)
Builds a case-sensitive Principal instance.
|
Principal(SpiConstants.PrincipalType principalType,
java.lang.String namespace,
java.lang.String name,
SpiConstants.CaseSensitivityType caseSensitivityType)
Builds a Principal instance.
|
Principal(java.lang.String name)
Builds a Principal instance with simply a case-sensitive name.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Principal other)
Note that this comparison is inconsistent with equals, in
that the PrincipalType is not considered in ordering.
|
boolean |
equals(java.lang.Object obj) |
SpiConstants.CaseSensitivityType |
getCaseSensitivityType()
Gets how cases are handled for the principal.
|
java.lang.String |
getName()
Gets the principal name.
|
java.lang.String |
getNamespace()
Gets the principal namespace.
|
SpiConstants.PrincipalType |
getPrincipalType()
Gets the principal type.
|
int |
hashCode() |
java.lang.String |
toString() |
public Principal(java.lang.String name)
name
- the name of the principalpublic Principal(SpiConstants.PrincipalType principalType, java.lang.String namespace, java.lang.String name)
principalType
- the principal type for the principalnamespace
- the namespace for the principalname
- the name of the principalpublic Principal(SpiConstants.PrincipalType principalType, java.lang.String namespace, java.lang.String name, SpiConstants.CaseSensitivityType caseSensitivityType)
principalType
- the principal typenamespace
- the namespace for the principalname
- the name of the principalcaseSensitivityType
- how to handle casing for the principalpublic java.lang.String getName()
public java.lang.String getNamespace()
public SpiConstants.PrincipalType getPrincipalType()
public SpiConstants.CaseSensitivityType getCaseSensitivityType()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object