All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.storage.ExtendedFileAccessPermissions.html Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version






ExtendedFileAccessPermissions














org.ocap.storage
Class ExtendedFileAccessPermissions

java.lang.Object
  extended by org.dvb.io.persistent.FileAccessPermissions
      extended by org.ocap.storage.ExtendedFileAccessPermissions

public class ExtendedFileAccessPermissions
extends FileAccessPermissions

This class extends FileAccessPermissions to let granting applications provide read and write file access to applications that have an organisation identifier different from a granting application.


Constructor Summary
ExtendedFileAccessPermissions(boolean readWorldAccessRight, boolean writeWorldAccessRight, boolean readOrganisationAccessRight, boolean writeOrganisationAccessRight, boolean readApplicationAccessRight, boolean writeApplicationAccessRight, int[] otherOrganisationsReadAccessRights, int[] otherOrganisationsWriteAccessRights)
          This constructor encodes application, application organisation, and world file access permissions as a set of booleans, and other organisations file access permissions as arrays of granted organisation identifiers.
 
Method Summary
 int[] getReadAccessOrganizationIds()
          Gets the array of organisation identifiers with read permission.
 int[] getWriteAccessOrganizationIds()
          Gets the array of organisation identifiers with write permission.
 void setPermissions(boolean readWorldAccessRight, boolean writeWorldAccessRight, boolean readOrganisationAccessRight, boolean writeOrganisationAccessRight, boolean readApplicationAccessRight, boolean writeApplicationAccessRight, int[] otherOrganisationsReadAccessRights, int[] otherOrganisationsWriteAcessRights)
          This method allows modification of the permissions on this instance of the ExtendedFileAccessPermission class.
 
Methods inherited from class org.dvb.io.persistent.FileAccessPermissions
hasReadApplicationAccessRight, hasReadOrganisationAccessRight, hasReadWorldAccessRight, hasWriteApplicationAccessRight, hasWriteOrganisationAccessRight, hasWriteWorldAccessRight, setPermissions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedFileAccessPermissions

public ExtendedFileAccessPermissions(boolean readWorldAccessRight,
                                     boolean writeWorldAccessRight,
                                     boolean readOrganisationAccessRight,
                                     boolean writeOrganisationAccessRight,
                                     boolean readApplicationAccessRight,
                                     boolean writeApplicationAccessRight,
                                     int[] otherOrganisationsReadAccessRights,
                                     int[] otherOrganisationsWriteAccessRights)
This constructor encodes application, application organisation, and world file access permissions as a set of booleans, and other organisations file access permissions as arrays of granted organisation identifiers.

Parameters:
readWorldAccessRight - read access for all applications
writeWorldAccessRight - write access for all applications
readOrganisationAccessRight - read access for applications with the same organisation as the granting application.
writeOrganisationAccessRight - write access for applications with the same organisation as the granting application.
readApplicationAccessRight - read access for the owner.
writeApplicationAccessRight - write access for the owner.
otherOrganisationsReadAccessRights - array of other organisation identifiers with read access. Applications with an organisation identifier matching one of these organisation identifiers will be given read access.
otherOrganisationsWriteAccessRights - array of other organisation identifiers with write access. Applications with an organisation identifier matching one of these organisation identifiers will be given write access.
Method Detail

setPermissions

public void setPermissions(boolean readWorldAccessRight,
                           boolean writeWorldAccessRight,
                           boolean readOrganisationAccessRight,
                           boolean writeOrganisationAccessRight,
                           boolean readApplicationAccessRight,
                           boolean writeApplicationAccessRight,
                           int[] otherOrganisationsReadAccessRights,
                           int[] otherOrganisationsWriteAcessRights)
This method allows modification of the permissions on this instance of the ExtendedFileAccessPermission class.

Parameters:
readWorldAccessRight - read access for all applications
writeWorldAccessRight - write access for all applications
readOrganisationAccessRight - read access for organisation
writeOrganisationAccessRight - write access for organisation
readApplicationAccessRight - read access for the owner
writeApplicationAccessRight - write access for the owner
otherOrganisationsReadAccessRights - array of other organisation identifiers with read access. Applications with an organisation identifier matching one of these organisation identifiers will be given read access.
otherOrganisationsWriteAcessRights - array of other organisation identifiers with write access. Applications with an organisation identifier matching one of these organisation identifiers will be given write access.

getReadAccessOrganizationIds

public int[] getReadAccessOrganizationIds()
Gets the array of organisation identifiers with read permission.

Returns:
Array of organisation identifiers with read permission.

getWriteAccessOrganizationIds

public int[] getWriteAccessOrganizationIds()
Gets the array of organisation identifiers with write permission.

Returns:
Array of organisation identifiers with write permission.






© 2015 - 2025 Weber Informatics LLC | Privacy Policy