Package com.orchestranetworks.service
Interface AccessRule
-
- All Known Implementing Classes:
AccessRule.NoWriteRule
public interface AccessRule
Specifies a programmatic access rule.Access rules are set by the methods
setAccessRule...
in the classSchemaExtensionsContext
.To specify a programmatic access rule applying in a creation context only, the
AccessRuleForCreate
interface should be used instead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AccessRule.NoWriteRule
Wraps another rule to return a maximum access level of read-only.
-
Field Summary
Fields Modifier and Type Field Description static AccessRule
ALWAYS_HIDDEN
Always returns hidden access permission.static AccessRule
ALWAYS_READ_ONLY
Always returns read-only access permission.static AccessRule
ALWAYS_READ_WRITE
Always returns read-write access permission.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccessPermission
getPermission(Adaptation aDataSetOrRecord, Session aSession, SchemaNode aNode)
Returns permissions for the specified arguments.
-
-
-
Field Detail
-
ALWAYS_READ_WRITE
static final AccessRule ALWAYS_READ_WRITE
Always returns read-write access permission.
-
ALWAYS_READ_ONLY
static final AccessRule ALWAYS_READ_ONLY
Always returns read-only access permission.
-
ALWAYS_HIDDEN
static final AccessRule ALWAYS_HIDDEN
Always returns hidden access permission.
-
-
Method Detail
-
getPermission
AccessPermission getPermission(Adaptation aDataSetOrRecord, Session aSession, SchemaNode aNode)
Returns permissions for the specified arguments.Warning: if this
AccessRule
is assigned to atable record
, this method is called in multiple contexts:- To evaluate table "column" permissions;
in this case,
aDataSetOrRecord
is the current dataset. - To evaluate the node permissions of a specific existing record;
in this case,
aDataSetOrRecord
is the current record. - To evaluate the node permissions in a record creation context
(meaning that the record does not exist yet);
in this case,
aDataSetOrRecord
is the current dataset. - Furthermore, if table history is activated, this method will also be invoked in the context of the history view in the first two cases above. In the context of the history view, some fields may be absent and the expected permissions can be different from those in other contexts. Consequently, the implementation of this method may need to check if it is being invoked from the history view. For more information, see Permissions for table history.
- Parameters:
aDataSetOrRecord
- current dataset or record (see warning above)aSession
- current user sessionaNode
- current data model node whose access must be computed; when the permission is requested for the dataset itself (not a particular node), this is the root node- Returns:
- a permission, never
null
. - See Also:
SchemaExtensionsContext
, Performance and tuning
- To evaluate table "column" permissions;
in this case,
-
-