public class OUser extends OIdentity implements OSecurityUser
ORole
,
Serialized FormOSecurityUser.STATUSES
Modifier and Type | Field and Description |
---|---|
static String |
ADMIN |
static String |
CLASS_NAME |
static String |
PASSWORD_FIELD |
protected Set<ORole> |
roles |
document
Constructor and Description |
---|
OUser()
Constructor used in unmarshalling.
|
OUser(ODocument iSource)
Create the user by reading the source document.
|
OUser(String iName) |
OUser(String iUserName,
String iUserPassword) |
Modifier and Type | Method and Description |
---|---|
OUser |
addRole(OSecurityRole iRole) |
OUser |
addRole(String iRole) |
ORole |
allow(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iOperation)
Checks if the user has the permission to access to the requested resource for the requested
operation.
|
OSecurityRole |
allow(String iResource,
int iOperation)
Deprecated.
|
ORole |
checkIfAllowed(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iOperation)
Checks if the user has the permission to access to the requested resource for the requested
operation.
|
OSecurityRole |
checkIfAllowed(String iResource,
int iOperation)
Deprecated.
|
boolean |
checkPassword(String iPassword) |
protected ORole |
createRole(ODocument roleDoc)
Derived classes can override createRole() to return an extended ORole implementation or null if
the role should not be added.
|
static boolean |
encodePassword(ODocument iDocument) |
static String |
encryptPassword(String iPassword) |
void |
fromStream(ODocument iSource) |
OSecurityUser.STATUSES |
getAccountStatus() |
OIdentifiable |
getIdentity() |
String |
getName() |
String |
getPassword() |
Set<ORole> |
getRoles() |
String |
getUserType() |
boolean |
hasRole(String iRoleName,
boolean iIncludeInherited) |
boolean |
isRuleDefined(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific)
Checks if a rule was defined for the user.
|
boolean |
isRuleDefined(String iResource)
Deprecated.
|
boolean |
removeRole(String iRoleName) |
OUser |
save() |
void |
setAccountStatus(OSecurityUser.STATUSES accountStatus) |
OUser |
setName(String iName) |
OUser |
setPassword(String iPassword) |
String |
toString() |
equals, getDocument, hashCode, load, reload, reload, reload, save, toStream
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDocument
public static final String ADMIN
public static final String CLASS_NAME
public static final String PASSWORD_FIELD
public OUser()
public OUser(String iName)
public OUser(ODocument iSource)
public static boolean encodePassword(ODocument iDocument)
public void fromStream(ODocument iSource)
fromStream
in class ODocumentWrapper
protected ORole createRole(ODocument roleDoc)
public ORole allow(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation)
allow
in interface OSecurityUser
iOperation
- Requested operationOSecurityAccessException
public ORole checkIfAllowed(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation)
checkIfAllowed
in interface OSecurityUser
iOperation
- Requested operation@Deprecated public OSecurityRole allow(String iResource, int iOperation)
allow
in interface OSecurityUser
@Deprecated public OSecurityRole checkIfAllowed(String iResource, int iOperation)
checkIfAllowed
in interface OSecurityUser
@Deprecated public boolean isRuleDefined(String iResource)
isRuleDefined
in interface OSecurityUser
public boolean isRuleDefined(ORule.ResourceGeneric resourceGeneric, String resourceSpecific)
isRuleDefined
in interface OSecurityUser
public boolean checkPassword(String iPassword)
checkPassword
in interface OSecurityUser
public String getName()
getName
in interface OSecurityUser
public OUser setName(String iName)
setName
in interface OSecurityUser
public String getPassword()
getPassword
in interface OSecurityUser
public OUser setPassword(String iPassword)
setPassword
in interface OSecurityUser
public OSecurityUser.STATUSES getAccountStatus()
getAccountStatus
in interface OSecurityUser
public void setAccountStatus(OSecurityUser.STATUSES accountStatus)
setAccountStatus
in interface OSecurityUser
public Set<ORole> getRoles()
getRoles
in interface OSecurityUser
public OUser addRole(String iRole)
addRole
in interface OSecurityUser
public OUser addRole(OSecurityRole iRole)
addRole
in interface OSecurityUser
public boolean removeRole(String iRoleName)
removeRole
in interface OSecurityUser
public boolean hasRole(String iRoleName, boolean iIncludeInherited)
hasRole
in interface OSecurityUser
public OUser save()
save
in class ODocumentWrapper
public String toString()
toString
in class ODocumentWrapper
public OIdentifiable getIdentity()
getIdentity
in interface OSecurityUser
public String getUserType()
getUserType
in interface OSecurityUser
Copyright © 2009–2020 OrientDB. All rights reserved.