public class DatabaseMethodsImpl extends Object implements DatabaseMethods, PermissionChecker
DatabaseMethods and PermissionChecker.| Constructor and Description |
|---|
DatabaseMethodsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
check(Permission permission,
DBObject dBObject)
Check if a permission is available on a database object.
|
boolean |
check(Permission permission,
DBObject dBObject,
boolean permissionRequired)
Check if a permission is available on a database object.
|
void |
check(Permission permission,
Surrogate surrogate)
Check if a permission is available on a database object.
|
boolean |
check(Permission permission,
Surrogate surrogate,
boolean permissionRequired)
Check if a permission is available on a database object.
|
void |
checkIntegrity(DBObject object,
Surrogate s,
Surrogate referrer)
Throw an exception if the DBObject is null.
|
Surrogate |
makeSurrogate(Database db,
DBObjectType dot,
DBObjectId id)
Create a surrogate for a database object.
|
Surrogate |
makeSurrogate(DBObject dBObject,
DBObjectId id)
Create a surrogate for a database object.
|
public void checkIntegrity(DBObject object, Surrogate s, Surrogate referrer) throws T2DBException
object - an objects - its surrogatereferrer - the surrogate of the object's referrer or nullT2DBExceptionpublic Surrogate makeSurrogate(Database db, DBObjectType dot, DBObjectId id)
DatabaseMethodsmakeSurrogate in interface DatabaseMethodsdb - the database of the objectdot - the type of the objectid - the internal ID of the database objectpublic Surrogate makeSurrogate(DBObject dBObject, DBObjectId id)
DatabaseMethodsmakeSurrogate in interface DatabaseMethodsdBObject - a database objectid - the internal ID of the database objectpublic boolean check(Permission permission, DBObject dBObject, boolean permissionRequired) throws T2DBException
PermissionCheckerpermissionRequired throw an exception or return false on
failure.check in interface PermissionCheckerpermission - a permissiondBObject - a database objectpermissionRequired - if true throw an exception on failure else return falseT2DBExceptionpublic void check(Permission permission, DBObject dBObject) throws T2DBException
PermissionCheckercheck in interface PermissionCheckerpermission - a permissiondBObject - a database objectT2DBExceptionpublic boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException
PermissionCheckerpermissionRequired throw an exception or return false on
failure.check in interface PermissionCheckerpermission - a permissionsurrogate - a surrogate identifying a database objectpermissionRequired - if true throw an exception on failure else return falseT2DBExceptionpublic void check(Permission permission, Surrogate surrogate) throws T2DBException
PermissionCheckercheck in interface PermissionCheckerpermission - a permissionsurrogate - if true throw an exception on failure else return falseT2DBExceptionCopyright © 2017. All rights reserved.