public class UserAccount extends Object
Holds the details of a user account on the server.
Constructor and Description |
---|
UserAccount()
Default constructor
|
UserAccount(String user,
String pwd)
Create a user with the specified name and password.
|
Modifier and Type | Method and Description |
---|---|
void |
addShare(String shr)
Add the specified share to the list of allowed shares for this user.
|
boolean |
allowsShare(String shr)
Determine if this user is allowed to access the specified share.
|
String |
getComment()
Return the user comment
|
String |
getHomeDirectory()
Return the home directory for this user
|
byte[] |
getMD4Password()
Return the MD4 hashed password
|
String |
getPassword()
Return the password
|
String |
getRealName()
Return the real user name
|
StringList |
getShareList()
Return the list of shares
|
String |
getUserName()
Return the user name.
|
boolean |
hasHomeDirectory()
Check if the user has a home direectory configured
|
boolean |
hasMD4Password()
Check if the MD4 hashed password is available
|
boolean |
hasShare(String shr)
Check if the specified share is listed in the users allowed list.
|
boolean |
hasShareRestrictions()
Detemrine if this account is restricted to using certain shares only.
|
boolean |
isAdministrator()
Determine if this user in an administrator.
|
boolean |
isGuest()
Determine if the user is a guest user
|
void |
removeAllShares()
Remove all shares from the list of restricted shares.
|
void |
removeShare(String shr)
Remove the specified share from the list of shares this user is allowed to access.
|
void |
setAdministrator(boolean admin)
Set the administrator flag.
|
void |
setComment(String comment)
Set the comment
|
void |
setGuest(boolean guest)
Set the guest flag
|
void |
setHomeDirectory(String home)
Set the user home directory
|
void |
setMD4Password(byte[] md4Pwd)
Set the MD4 hashed password
|
void |
setPassword(String pwd)
Set the password for this account.
|
void |
setRealName(String name)
Set the real user name
|
void |
setUserName(String user)
Set the user name.
|
String |
toString()
Return the user account as a string.
|
public final void addShare(String shr)
shr
- java.lang.Stringpublic final boolean allowsShare(String shr)
shr
- java.lang.Stringpublic final boolean hasHomeDirectory()
public final String getHomeDirectory()
public final String getPassword()
public final boolean hasMD4Password()
public final byte[] getMD4Password()
public final String getUserName()
public final String getRealName()
public final String getComment()
public final boolean hasShare(String shr)
shr
- java.lang.Stringpublic final boolean hasShareRestrictions()
public final StringList getShareList()
public final boolean isAdministrator()
public final boolean isGuest()
public final void removeAllShares()
public final void removeShare(String shr)
shr
- java.lang.Stringpublic final void setAdministrator(boolean admin)
admin
- booleanpublic final void setGuest(boolean guest)
guest
- booleanpublic final void setHomeDirectory(String home)
home
- Stringpublic final void setPassword(String pwd)
pwd
- java.lang.Stringpublic final void setMD4Password(byte[] md4Pwd)
md4Pwd
- byte[]public final void setUserName(String user)
user
- java.lang.Stringpublic final void setRealName(String name)
name
- Stringpublic final void setComment(String comment)
comment
- StringCopyright © 2005–2018 Alfresco Software. All rights reserved.