public class ORole extends OIdentity implements OSecurityRole
OSecurityRole.ALLOW_MODES
Modifier and Type | Field and Description |
---|---|
static String |
ADMIN |
static String |
CLASS_NAME |
protected OSecurityRole.ALLOW_MODES |
mode |
protected ORole |
parentRole |
static int |
PERMISSION_ALL |
static int |
PERMISSION_CREATE |
static int |
PERMISSION_DELETE |
static int |
PERMISSION_EXECUTE |
static int |
PERMISSION_NONE |
static int |
PERMISSION_READ |
static int |
PERMISSION_UPDATE |
protected static byte |
STREAM_ALLOW |
protected static byte |
STREAM_DENY |
document
Constructor and Description |
---|
ORole()
Constructor used in unmarshalling.
|
ORole(ODocument iSource)
Create the role by reading the source document.
|
ORole(String iName,
ORole iParent,
OSecurityRole.ALLOW_MODES iAllowMode) |
Modifier and Type | Method and Description |
---|---|
ORole |
addRule(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iOperation) |
OSecurityRole |
addRule(String iResource,
int iOperation)
Deprecated.
|
boolean |
allow(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iCRUDOperation) |
boolean |
allow(String iResource,
int iCRUDOperation)
Deprecated.
|
void |
fromStream(ODocument iSource) |
OIdentifiable |
getIdentity() |
OSecurityRole.ALLOW_MODES |
getMode()
Deprecated.
|
String |
getName() |
ORole |
getParentRole() |
Map<String,Byte> |
getRules()
Deprecated.
|
Set<ORule> |
getRuleSet() |
ORole |
grant(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iOperation)
Grant a permission to the resource.
|
OSecurityRole |
grant(String iResource,
int iOperation)
Deprecated.
|
boolean |
hasRule(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific) |
boolean |
hasRule(String iResource)
Deprecated.
|
static String |
permissionToString(int iPermission)
Convert the permission code to a readable string.
|
static int |
registerPermissionBit(int iBitNo,
String iName) |
ORole |
revoke(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iOperation)
Revoke a permission to the resource.
|
OSecurityRole |
revoke(String iResource,
int iOperation)
Deprecated.
|
ORole |
save() |
ORole |
setMode(OSecurityRole.ALLOW_MODES iMode)
Deprecated.
|
ORole |
setParentRole(OSecurityRole iParent) |
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 int PERMISSION_NONE
public static final int PERMISSION_CREATE
public static final int PERMISSION_READ
public static final int PERMISSION_UPDATE
public static final int PERMISSION_DELETE
public static final int PERMISSION_EXECUTE
public static final int PERMISSION_ALL
protected static final byte STREAM_DENY
protected static final byte STREAM_ALLOW
protected OSecurityRole.ALLOW_MODES mode
protected ORole parentRole
public ORole()
public ORole(String iName, ORole iParent, OSecurityRole.ALLOW_MODES iAllowMode)
public ORole(ODocument iSource)
public static String permissionToString(int iPermission)
iPermission
- Permission to convertpublic static int registerPermissionBit(int iBitNo, String iName)
public void fromStream(ODocument iSource)
fromStream
in class ODocumentWrapper
public boolean allow(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iCRUDOperation)
allow
in interface OSecurityRole
public boolean hasRule(ORule.ResourceGeneric resourceGeneric, String resourceSpecific)
hasRule
in interface OSecurityRole
public ORole addRule(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation)
addRule
in interface OSecurityRole
@Deprecated public boolean allow(String iResource, int iCRUDOperation)
allow
in interface OSecurityRole
@Deprecated public boolean hasRule(String iResource)
hasRule
in interface OSecurityRole
@Deprecated public OSecurityRole addRule(String iResource, int iOperation)
addRule
in interface OSecurityRole
@Deprecated public OSecurityRole grant(String iResource, int iOperation)
grant
in interface OSecurityRole
@Deprecated public OSecurityRole revoke(String iResource, int iOperation)
revoke
in interface OSecurityRole
public ORole grant(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation)
grant
in interface OSecurityRole
public ORole revoke(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation)
revoke
in interface OSecurityRole
public String getName()
getName
in interface OSecurityRole
@Deprecated public OSecurityRole.ALLOW_MODES getMode()
getMode
in interface OSecurityRole
@Deprecated public ORole setMode(OSecurityRole.ALLOW_MODES iMode)
setMode
in interface OSecurityRole
public ORole getParentRole()
getParentRole
in interface OSecurityRole
public ORole setParentRole(OSecurityRole iParent)
setParentRole
in interface OSecurityRole
public ORole save()
save
in class ODocumentWrapper
public Set<ORule> getRuleSet()
getRuleSet
in interface OSecurityRole
@Deprecated public Map<String,Byte> getRules()
public String toString()
toString
in class ODocumentWrapper
public OIdentifiable getIdentity()
getIdentity
in interface OSecurityRole
Copyright © 2009–2020 OrientDB. All rights reserved.