Package com.avsystem.anjay
Class AnjayAccessControl
- java.lang.Object
-
- com.avsystem.anjay.AnjayAccessControl
-
public final class AnjayAccessControl extends java.lang.ObjectAccess Control module.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnjayAccessControl.AccessMaskPossible values of an ACL Resource Instance which can be combined together, as described in the Access Control definition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnjayAccessControlinstall(Anjay anjay)Installs the Access Control Object in an Anjay instance.booleanisModified()voidpersist(java.io.OutputStream outputStream)Dumps all set access rights to the output stream.voidpurge()Removes all existing access rights leaving Access Control Object without any instances.voidrestore(java.io.InputStream inputStream)Attempts to restore access rights from specified input stream.voidsetAcl(int oid, int iid, int ssid, int mask)Creates a new instance of the Access Control Object or updates an existing instance if access rights of a particular Object Instance have already been set.
-
-
-
Method Detail
-
install
public static AnjayAccessControl install(Anjay anjay) throws java.lang.Exception
Installs the Access Control Object in an Anjay instance.- Parameters:
anjay- Anjay instance for which the Access Control Object is installed.- Returns:
- Access Control Object.
- Throws:
java.lang.Exception- In case of failure.
-
setAcl
public void setAcl(int oid, int iid, int ssid, int mask)Creates a new instance of the Access Control Object or updates an existing instance if access rights of a particular Object Instance have already been set.- Parameters:
oid- Object ID of an Object to create an ACL for.iid- Instance ID of an Object Instance to create an ACL for.ssid- SSID of a Server Object for which access rights are valid.mask- A number which defines access rights for a specified Object Instance.
-
purge
public void purge()
Removes all existing access rights leaving Access Control Object without any instances.
-
persist
public void persist(java.io.OutputStream outputStream) throws java.lang.ExceptionDumps all set access rights to the output stream.- Parameters:
outputStream- Stream to write to.- Throws:
java.lang.Exception- If the persist operation failed.
-
restore
public void restore(java.io.InputStream inputStream) throws java.lang.ExceptionAttempts to restore access rights from specified input stream.- Parameters:
inputStream- Stream to read from.- Throws:
java.lang.Exception- If the restoration failed.
-
-