com.tibco.tibjms.admin

## Class Permissions

- java.lang.Object
- - com.tibco.tibjms.admin.Permissions

-     public class Permissions
      extends java.lang.Object

  This class represents a set of permissions on destinations. Permissions objects are used with ACLEntries to represent the user-level and optionally administrative permissions that a principal has on a destination.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `BROWSE` Browse permission for a queue.
    `static long` | `BROWSE_PERMISSION` Browse permission for a queue, deprecated.
    `static long` | `CREATE` Administrative permission to create destination.
    `static long` | `DELETE` Administrative permission to delete destination.
    `static long` | `DURABLE` Permission to create a durable subscriber for a topic.
    `static long` | `DURABLE_PERMISSION` Permission to create a durable subscriber for a topic, deprecated.
    `static long` | `MODIFY` Administrative permission to modify destination.
    `static long` | `PUBLISH` Publish permission for a topic.
    `static long` | `PUBLISH_PERMISSION` Publish permission for a topic, deprecated.
    `static long` | `PURGE` Administrative permission to purge destination.
    `static long` | `RECEIVE` Receive permission for a queue.
    `static long` | `RECEIVE_PERMISSION` Receive permission for a queue, deprecated.
    `static long` | `SEND` Send permission for a queue.
    `static long` | `SEND_PERMISSION` Send permission for a queue, deprecated.
    `static long` | `SUBSCRIBE` Subscribe permission for a topic.
    `static long` | `SUBSCRIBE_PERMISSION` Subscribe permission for a topic, deprecated.
    `static long` | `USE_DURABLE` Permission to use a durable subscription that already exists on the EMS server.
    `static long` | `VIEW` Administrative permission to view destination.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Permissions()` Default constructor which creates empty set of permissions.
    `Permissions(long perms)` Creates given set of permissions.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasInheritedPermission(long perm)` Determine if the given permission is present in the Inherited Permissions.
    `boolean` | `hasPermission(long perm)` Determine if the given permission is present in these Permissions.
    `boolean` | `isEmpty()` Indicates whether or not the Permissions object has any permissions set.
    `void` | `setPermission(long perm, boolean grant)` Set or unset given permissions in this set of permissions.
    `java.lang.String` | `toString()` Generate a string representation of this Permissions.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### SEND

          public static final long SEND

      Send permission for a queue.
      See Also:
        Constant Field Values

    - #### SEND_PERMISSION

          public static final long SEND_PERMISSION

      Send permission for a queue, deprecated. Use SEND permission.
      See Also:
        Constant Field Values

    - #### RECEIVE

          public static final long RECEIVE

      Receive permission for a queue.
      See Also:
        Constant Field Values

    - #### RECEIVE_PERMISSION

          public static final long RECEIVE_PERMISSION

      Receive permission for a queue, deprecated. Use RECEIVE permission
      See Also:
        Constant Field Values

    - #### BROWSE

          public static final long BROWSE

      Browse permission for a queue.
      See Also:
        Constant Field Values

    - #### BROWSE_PERMISSION

          public static final long BROWSE_PERMISSION

      Browse permission for a queue, deprecated. Use BROWSE permission.
      See Also:
        Constant Field Values

    - #### PUBLISH

          public static final long PUBLISH

      Publish permission for a topic.
      See Also:
        Constant Field Values

    - #### PUBLISH_PERMISSION

          public static final long PUBLISH_PERMISSION

      Publish permission for a topic, deprecated. Use PUBLISH permission.
      See Also:
        Constant Field Values

    - #### SUBSCRIBE

          public static final long SUBSCRIBE

      Subscribe permission for a topic.
      See Also:
        Constant Field Values

    - #### SUBSCRIBE_PERMISSION

          public static final long SUBSCRIBE_PERMISSION

      Subscribe permission for a topic, deprecated. Use SUBSCRIBE permission.
      See Also:
        Constant Field Values

    - #### DURABLE

          public static final long DURABLE

      Permission to create a durable subscriber for a topic.
      See Also:
        Constant Field Values

    - #### DURABLE_PERMISSION

          public static final long DURABLE_PERMISSION

      Permission to create a durable subscriber for a topic, deprecated. Use DURABLE permission.
      See Also:
        Constant Field Values

    - #### USE_DURABLE

          public static final long USE_DURABLE

      Permission to use a durable subscription that already exists on the EMS server.
      Since:
        EMS 4.2
      See Also:
        Constant Field Values

    - #### VIEW

          public static final long VIEW

      Administrative permission to view destination.
      See Also:
        Constant Field Values

    - #### CREATE

          public static final long CREATE

      Administrative permission to create destination.
      See Also:
        Constant Field Values

    - #### DELETE

          public static final long DELETE

      Administrative permission to delete destination.
      See Also:
        Constant Field Values

    - #### MODIFY

          public static final long MODIFY

      Administrative permission to modify destination.
      See Also:
        Constant Field Values

    - #### PURGE

          public static final long PURGE

      Administrative permission to purge destination.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Permissions

          public Permissions()

      Default constructor which creates empty set of permissions.

    - #### Permissions

          public Permissions(long perms)

      Creates given set of permissions.
      Parameters:
        `perms` - the permissions.

  - ### Method Detail

    - #### isEmpty

          public boolean isEmpty()

      Indicates whether or not the Permissions object has any permissions set.
      Returns:
        true if this object has no permissions set, false otherwise.

    - #### hasPermission

          public boolean hasPermission(long perm)

      Determine if the given permission is present in these Permissions.
      Parameters:
        `perm` - permissions
      Returns:
        true if given permissions are all present

    - #### setPermission

          public void setPermission(long perm,
                                    boolean grant)

      Set or unset given permissions in this set of permissions.
      Parameters:
        `perm` - permissions
        `grant` - true if permissions should be added to the set, false if they should be removed

    - #### hasInheritedPermission

          public boolean hasInheritedPermission(long perm)

      Determine if the given permission is present in the Inherited Permissions.
      Parameters:
        `perm` - permissions
      Returns:
        true if given permissions are all present

    - #### toString

          public java.lang.String toString()

      Generate a string representation of this Permissions.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of this Permissions.

Copyright © Cloud Software Group, Inc. All rights reserved