Interface DSPermission

All Superinterfaces:
DSData, DSPacket, DSSerializable, Iterable<DSField>
All Known Subinterfaces:
TransformerPermission
All Known Implementing Classes:
TransformerPermissionImpl

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.
  • 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 permission key
    • 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()

      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.