public interface AccountService
UserAccounts are used to manage login and access to the
LMF System.UserAccount| Modifier and Type | Method and Description |
|---|---|
void |
addRole(UserAccount account,
String role)
Add a single role to the roles of the given
UserAccount |
boolean |
checkPassword(String login,
String passwd)
Check the credentials for the given login
|
boolean |
checkPassword(UserAccount account,
String passwd)
Check the credentials for the given
UserAccount |
UserAccount |
createAccount(String login)
Create an user account
|
UserAccount |
createAccount(String login,
String firstName,
String lastName)
Create an user account and set first- and lastName in the user profile (foaf)
|
void |
createDefaultAccounts()
Create the default accounts, currently only admin
|
void |
deleteAccount(UserAccount account)
Deletes the given user account.
|
UserAccount |
getAccount(org.apache.marmotta.platform.core.model.user.MarmottaUser user)
Retrieve the user account for a given
MarmottaUser (facaded user resource) |
UserAccount |
getAccount(String login)
Retrieve the user account for the given login name
|
UserAccount |
getAccount(org.openrdf.model.URI userResource)
Retrieve the user account for the given (User)-Resource
|
Set<String> |
getRoles(UserAccount account)
Retrieve the roles for the given
UserAccount |
boolean |
hasRole(UserAccount account,
String role)
Check whether the given
UserAccount has the role in question. |
List<UserAccount> |
listAccounts()
List all
UserAccount. |
List<UserAccount> |
listAccounts(String role)
Returns a
List of UserAccount that have the given role associated. |
void |
removeRole(UserAccount account,
String role)
Remove a single role from the roles of the given
UserAccount |
UserAccount |
setPassword(UserAccount account,
String passwd)
Update/Set the password for the given
UserAccount |
void |
setRoles(UserAccount account,
Set<String> roles)
Set the roles for the given
UserAccount |
UserAccount createAccount(String login)
login - the unique username/loginUserAccountUserAccount createAccount(String login, String firstName, String lastName)
login - the unique username/login (also foaf:nick)firstName - the value for foaf:firstName, may be nulllastName - the value for foaf:lastName, may be nullUserAccountvoid createDefaultAccounts()
UserAccount getAccount(String login)
login - the login nameUserAccount for the given login nameUserAccount getAccount(org.openrdf.model.URI userResource)
userResource - the user resource (foaf:person)UserAccount, or null if no account present.UserAccount getAccount(org.apache.marmotta.platform.core.model.user.MarmottaUser user)
MarmottaUser (facaded user resource)user - the MarmottaUserUserAccount, of null if none present.getAccount(org.openrdf.model.URI)void deleteAccount(UserAccount account)
account - the UserAccount to delete.UserAccount setPassword(UserAccount account, String passwd)
UserAccountaccount - the UserAccount to modifypasswd - the new passwordUserAccountboolean checkPassword(UserAccount account, String passwd)
UserAccountaccount - the UserAccount to authenticatepasswd - the password (plain)true if the password matched the password of the UserAccountboolean checkPassword(String login, String passwd)
login - the login/account name/user namepasswd - the password (plain)true if the password matched the logins' UserAccount passwordvoid setRoles(UserAccount account, Set<String> roles)
UserAccountaccount - the UserAccount to modifyroles - the roles (names) of the accountUserAccount.setRoles(Set)Set<String> getRoles(UserAccount account)
UserAccountaccount - the UserAccountSet containing the role-names of the given UserAccountUserAccount.getRoles()void addRole(UserAccount account, String role)
UserAccountaccount - the UserAccount to modifyrole - the role(-name) to addvoid removeRole(UserAccount account, String role)
UserAccountaccount - the UserAccount to modifyrole - the role(-name) to removeboolean hasRole(UserAccount account, String role)
UserAccount has the role in question.account - the UserAccount to queryrole - the role(-name) in question.UserAccount has the role in questionList<UserAccount> listAccounts(String role)
List of UserAccount that have the given role associated.role - the role(-name)List of UserAccount that have the given role associated.List<UserAccount> listAccounts()
UserAccount.List of all UserAccountCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.