RT::Watcher(3)

NAME
  RT::Watcher - RT Watcher object

SYNOPSIS
  use RT::Watcher;

DESCRIPTION
This module should never be called directly by client code. it\'s an internal module which should only be accessed through exported APIs in Ticket, Queue and other similar objects.

METHODS

  Create PARAMHASH
Create a new watcher object with the following Attributes:

Scope: Ticket or Queue Value: Ticket or queue id Type: Requestor, Cc or AdminCc. Requestor is not supported for a scope of \'Queue\' Email: The email address of the watcher. If the email address maps to an RT User, this is resolved to an Owner object instead. Owner: The RT user id of the \'owner\' of this watcher object.

  Load ID
  Loads a watcher by the primary key of the watchers table ($Watcher->id)

  LoadByValue PARAMHASH
LoadByValue takes a parameter hash with the following attributes:

  Email, Owner, Scope, Type, Value

The same rules enforced at create are enforced by Load.

Returns a tuple of (retval, msg). Retval is 1 on success and 0 on failure. msg describes what happened in a human readable form.

  OwnerObj
Return an RT Owner Object for this Watcher, if we have one

  Email
This custom data accessor does the right thing and returns the 'Email' attribute of this Watcher object. If that's undefined, it returns the 'EmailAddress' attribute of its 'Owner' object, which is an RT::User object.

  IsUser
Returns true if this watcher object is tied to a user object. (IE it isn't sending to some other email address). Otherwise, returns undef