|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.b2b.server.UGClass
public abstract class UGClass
Generic class used to represent both User and Group objects. These users and groups are circularly linked.
Field Summary | |
---|---|
static int |
LDAP
|
static int |
NIS
|
static int |
OTHER
|
static int |
WM
|
Constructor Summary | |
---|---|
UGClass()
|
Method Summary | |
---|---|
UGClass |
add(UGClass member)
Adds the supplied UG to this one (this has a slightly different meaning depending on whether this is a user or a group). |
void |
addCredential(Credential cred)
Adds a credential to this user. |
boolean |
check(Credential cred)
Checks the supplied credential against the set for this user. |
boolean |
checkPassword(java.lang.String guess)
Verifies the password of this UG. |
Credentials |
getCredentials()
Gets a set of credentials for this UG |
Values |
getData()
Returns arbitrary data associated with this UG -- be warned that this is most probably not thread-safe!! |
java.lang.String |
getName()
Returns the name of this UG |
int |
getSource()
Gets the source for this UG. |
boolean |
hasMember(java.lang.String member)
Indicates whether the supplied UG (given as a String) is a "member" of this object. |
boolean |
hasMember(UGClass member)
Indicates whether the supplied UG (given as a UGClass) is a "member" of this object. |
java.util.Enumeration |
membership()
Returns an Enumeration of String names. |
java.util.Vector |
membershipNames()
Same as membership but returns a Vector of Strings
instead of an Enumeration. |
java.lang.String |
remove(UGClass member)
Removes the supplied UG from this one's membership list. |
void |
setCredentials(Credentials creds)
Supplies a set of credentials for this UG. |
void |
setData(Values data)
Sets arbitrary data associated with this UG -- should probably only be set at creation-time. |
void |
setSource(int src)
Sets the source for this UG. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.wm.util.coder.Codable |
---|
getValue, getValueKeys, setValue |
Field Detail |
---|
public static final int WM
public static final int NIS
public static final int LDAP
public static final int OTHER
Constructor Detail |
---|
public UGClass()
Method Detail |
---|
public Values getData()
public void setData(Values data)
data
- The data to be associated with this UG.public boolean checkPassword(java.lang.String guess)
guess
- A password to test.
public java.lang.String getName()
public UGClass add(UGClass member)
member
- The new UG to add.
public boolean hasMember(UGClass member)
member
- The UG the check with.
public boolean hasMember(java.lang.String member)
member
- The name of the UG to check.
public java.lang.String remove(UGClass member)
member
- The UG to remove.
public java.util.Enumeration membership()
public java.util.Vector membershipNames()
membership
but returns a Vector of Strings
instead of an Enumeration.
membership()
public int getSource()
source == UGClass.WM
Non-native users
and groups (for instance, those from LDAP or NIS directories) have
source != UGClass.WM
.
public void setSource(int src)
getSource
for
comments on source. Should only be called when creating the
UG. Codes should be >10 for implementors of alternate
directory interfaces.
src
- Code for the source of this UG.public Credentials getCredentials()
public void setCredentials(Credentials creds)
creds
- The credentials (if any).public void addCredential(Credential cred)
cred
- The credential to add.public boolean check(Credential cred)
cred
- The credential to check.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |