ExtendedFileAccessPermissions

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.storage
Class ExtendedFileAccessPermissions

    java.lang.Object
      org.dvb.io.persistent.FileAccessPermissions
          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[]` | `getReadAccessOrganisationIds()` Gets the array of organisation identifiers with read permission.
`int[]` | `getReadAccessOrganizationIds()` Deprecated. This method will be removed in a future release. Use `getReadAccessOrganisationIds()` instead.
`int[]` | `getWriteAccessOrganisationIds()` Gets the array of organisation identifiers with write permission.
`int[]` | `getWriteAccessOrganizationIds()` Deprecated. This method will be removed in a future release. Use `getWriteAccessOrganisationIds()` instead.

`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
`equals, 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.

### getReadAccessOrganisationIds

    public int[] getReadAccessOrganisationIds()

  Gets the array of organisation identifiers with read permission.

  Returns:
    Array of organisation identifiers with read permission.

### getWriteAccessOrganisationIds

    public int[] getWriteAccessOrganisationIds()

  Gets the array of organisation identifiers with write permission.

  Returns:
    Array of organisation identifiers with write permission.

### getReadAccessOrganizationIds

    public int[] getReadAccessOrganizationIds()

  Deprecated. This method will be removed in a future release. Use `getReadAccessOrganisationIds()` instead.

  Gets the array of organisation identifiers with read permission.

  Returns:
    Array of organisation identifiers with read permission.

### getWriteAccessOrganizationIds

    public int[] getWriteAccessOrganizationIds()

  Deprecated. This method will be removed in a future release. Use `getWriteAccessOrganisationIds()` instead.

  Gets the array of organisation identifiers with write permission.

  Returns:
    Array of organisation identifiers with write permission.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD