Interface DSPermission

All Superinterfaces:
DSData, DSPacket, DSSerializable, Iterable<DSField>

public interface DSPermission extends DSData

Extends DSData to provide helper methods for sending Permissions.

An instance of DSPermission should define the Key field for the permission. Any number of field/value pairs can then be defined after the key field. The DSPermission will be passed whole to the authentication module when it reaches the liberator.

Creating one of these with the DSData.F_FILTER_TYPE2 flag will create a Permission update that will cause the specified Permission Key to be cleared.
  • Field Details

    • DS_FIELDS_SEPARATOR

      static final int DS_FIELDS_SEPARATOR

      Field number that is used by DataSource to separate multiple updates within the same packet.

      See Also:
  • Method Details

    • addKeyField

      void addKeyField(String key)

      Adds the String key as the Keyfield for this packet.

      This should only be called as the first call to a DSPermission or after a call to addPermissionSeperator()
      Parameters:
      key - the Keyfield for this packet
    • addPermissionData

      void addPermissionData(String fieldName, String value)

      Adds the String value for the specified field name.

      Parameters:
      fieldName - The field name.
      value - The value to be stored in the field.
    • addPermissionData

      void addPermissionData(String fieldName, char value)

      Adds the String representation of the character value for the specified field name.

      Parameters:
      fieldName - The field name.
      value - The value to be stored in the field.
    • addPermissionData

      void addPermissionData(String fieldName, char[] value)

      Adds the String representation of the character array for the specified field name.

      Parameters:
      fieldName - The field name.
      value - The value to be stored in the field.
    • addPermissionData

      void addPermissionData(String fieldName, double value)

      Adds the String representation of the double value for the specified field name.

      Parameters:
      fieldName - The field name.
      value - The value to be stored in the field.
    • addPermissionData

      void addPermissionData(String fieldName, float value)

      Adds the String representation of the float value for the specified field name.

      Parameters:
      fieldName - The field name.
      value - The value to be stored in the field.
    • addPermissionData

      void addPermissionData(String fieldName, int value)

      Adds the String representation of the integer value for the specified field name.

      Parameters:
      fieldName - The field name.
      value - The value to be stored in the field.
    • addPermissionData

      void addPermissionData(String fieldName, long value)

      Adds the String representation of the long value for the specified field name.

      Parameters:
      fieldName - The field name.
      value - The value to be stored in the field.
    • addPermissionSeparator

      void addPermissionSeparator()

      Adds a separator allowing the cojoining of multiple permission updates into a single packet.

      After this method is invoked, the user should invoke the addKeyField method.
    • addPermissionSeperator

      void addPermissionSeperator()
      Deprecated.

      Adds a seperator allowing the cojoining of multiple permission updates into a single packet.

      After this method is invoked, the user should invoke the addKeyField method.