Class SendTo

java.lang.Object
com.i2group.disco.alerts.SendTo
All Implemented Interfaces:
ISendTo

public class SendTo extends Object implements ISendTo
Implements ISendTo.
  • Constructor Details

    • SendTo

      public SendTo(Set<String> users, Set<String> groups, Set<String> commandPermissions)
      Create a SendTo from the specified criteria.
      Parameters:
      users - The user principal names. May be null.
      groups - The user groups. May be null.
      commandPermissions - The command access control permissions. May be null.
  • Method Details

    • createWithUsers

      public static ISendTo createWithUsers(String... users)
      Create an ISendTo that will match the specified user principal names.
      Parameters:
      users - See above.
      Returns:
      See above.
    • createWithGroups

      public static ISendTo createWithGroups(String... groups)
      Create an ISendTo that will match the specified user groups.
      Parameters:
      groups - See above.
      Returns:
      See above.
    • createWithCommandPermissions

      public static ISendTo createWithCommandPermissions(String... commandPermissions)
      Create an ISendTo that will match the specified command access control permissions.
      Parameters:
      commandPermissions - See above.
      Returns:
      See above.
    • sendToAll

      public static ISendTo sendToAll()
      Create an ISendTo that matches all users in the system.
      Returns:
      See above.
    • getUsers

      public Set<String> getUsers()
      Description copied from interface: ISendTo
      Gets the principal names of specific users to receive the alert.
      Specified by:
      getUsers in interface ISendTo
      Returns:
      See above, or null if this criterion is not used.
    • getGroups

      public Set<String> getGroups()
      Description copied from interface: ISendTo
      Gets the names of specific groups of users to receive the alert.
      Specified by:
      getGroups in interface ISendTo
      Returns:
      See above, or null if this criterion is not used.
    • getCommandPermissions

      public Set<String> getCommandPermissions()
      Description copied from interface: ISendTo
      Gets the names of command access control permissions whose owners are to receive the alert.
      Specified by:
      getCommandPermissions in interface ISendTo
      Returns:
      See above, or null if this criterion is not used.
    • isSendToAll

      public boolean isSendToAll()
      Description copied from interface: ISendTo
      Indicates whether all users are to receive the alert.
      Specified by:
      isSendToAll in interface ISendTo
      Returns:
      true if the alert is to go to all users, overriding any other criteria. false if the other criteria take precedence.