|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.structures.User
public class User
Provides read and write access to users stored in the local repository. Unlike many of the data access objects in anzo, users are not batched and changes are persisted to the database immediately.
| Method Summary | |
|---|---|
static User |
createUser(java.lang.Long id,
java.lang.Long roleId,
java.lang.Long aclId,
java.lang.String userId,
java.lang.String password,
RepositoryConnection repositoryConnection,
java.lang.Long modified)
Creates a new user and adds the user to the database. |
void |
flattenRoles(java.lang.Long modified)
Updates the 'implicit' entries in the UsersRoles table for this user. |
java.lang.Long |
getDefaultAclTemplateId()
Get the ID for the default Acl template associated with this user. |
java.lang.Long |
getDefaultRoleId()
Gets the ID for the default role associated with this user. |
java.lang.Long |
getId()
Gets the unique id for the user. |
java.lang.Long |
getModified()
Get timestamp when User was last modified |
java.util.Set<Role> |
getRoles()
Gets the roles the user belongs to. |
static User |
getUser(org.openrdf.model.URI uri,
RepositoryConnection repositoryConnection)
Load a User from user's URI |
java.lang.String |
getUserId()
|
static User |
loadUser(java.lang.Long userId,
RepositoryConnection repositoryConnection)
Load a User based on the user's Id. |
void |
remove(java.lang.Long modified)
Remove the User from the database |
void |
setDefaultAclTemplateId(java.lang.Long defaultAclId)
Set the Default Acl Template ID |
void |
setDefaultRoleId(java.lang.Long defaultRoleId)
Set the Default Role Id |
void |
setModified(java.lang.Long modified)
Set timestamp when User was last modified |
void |
setPassword(java.lang.String password)
Set the User password |
void |
setUserId(java.lang.String userId)
|
boolean |
update(java.lang.Long modified)
Update the User data in the database |
boolean |
verifyPassword(java.lang.String password)
Checks if the user's password matches the password parameter. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static User loadUser(java.lang.Long userId,
RepositoryConnection repositoryConnection)
userId - The id for the user.repositoryConnection - Repository connection to run queries against
null if ID not stored
public static User getUser(org.openrdf.model.URI uri,
RepositoryConnection repositoryConnection)
uri - URI for UserrepositoryConnection - Repository connection to run queries against
null if URI does not exist
public static User createUser(java.lang.Long id,
java.lang.Long roleId,
java.lang.Long aclId,
java.lang.String userId,
java.lang.String password,
RepositoryConnection repositoryConnection,
java.lang.Long modified)
throws AnzoException
id - Unique id for the UserroleId - The ID for the user's role. It must not be a pre-existing role.aclId - The ID for the user's default ACL templateuserId - The login id for the userpassword - The user's password.repositoryConnection - connection to the databasemodified - timestamp when user was modified
AnzoException
public boolean verifyPassword(java.lang.String password)
throws AnzoException
password -
AnzoExceptionpublic java.lang.Long getModified()
public void setModified(java.lang.Long modified)
modified - Timestamp when User was last modified
public java.util.Set<Role> getRoles()
throws AnzoException
AnzoException
public java.lang.Long getDefaultRoleId()
throws AnzoException
AnzoException
public java.lang.Long getDefaultAclTemplateId()
throws AnzoException
AnzoExceptionpublic java.lang.Long getId()
public void flattenRoles(java.lang.Long modified)
throws AnzoException
modified - Timestamp when updates to User were made
AnzoException
public boolean update(java.lang.Long modified)
throws AnzoException
modified - Timestamp when update was made to user
AnzoException
public void remove(java.lang.Long modified)
throws AnzoException
modified - Timestamp when User was removed from the database
AnzoExceptionpublic void setDefaultAclTemplateId(java.lang.Long defaultAclId)
defaultAclId - ID for Default ACL Templatepublic void setDefaultRoleId(java.lang.Long defaultRoleId)
defaultRoleId - ID for Default Role
public void setPassword(java.lang.String password)
throws AnzoException
password - clear text version of password
AnzoExceptionpublic java.lang.String getUserId()
public void setUserId(java.lang.String userId)
userId - the userId to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||