Package wt.notify

Class NotificationSubscription

java.lang.Object
wt.fc._WTObject
wt.fc.WTObject
wt.notify._NotificationSubscription
wt.notify.NotificationSubscription
All Implemented Interfaces:
Externalizable, Serializable, wt.access._AccessControlled, wt.access._AccessControlList, wt.access._AdHocControlled, wt.access._PolicyAccessControlled, wt.access._SecurityLabeled, AccessControlled, wt.access.AccessControlList, AdHocControlled, wt.access.PolicyAccessControlled, SecurityLabeled, wt.admin._DomainAdministered, DomainAdministered, wt.fc._NetFactor, wt.fc._ObjectMappable, wt.fc._Persistable, wt.fc.adminlock._AdministrativelyLockable, AdministrativelyLockable, NetFactor, ObjectMappable, Persistable, DisplayIdentification, wt.ownership._Ownable, wt.ownership.Ownable, wt.type._TypeManaged, wt.type.TypeManaged

@GenAsPersistable(superClass=WTObject.class,interfaces={AdHocControlled.class,wt.ownership.Ownable.class,wt.access.PolicyAccessControlled.class,SecurityLabeled.class,wt.type.TypeManaged.class},serializable=EXTERNALIZABLE_BASIC,properties={@GeneratedProperty(name="name",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="The subscription name. Subscriptions are not required to have names. This optional attribute is provided in case users want to specify a meaningful name for a subscription."),@GeneratedProperty(name="fromUser",type=int.class,initialValue="NotificationSubscription.INITIATOR_FROM_USER",supportedAPI=PUBLIC,javaDoc="An integer constant to indicate what should be used for the email From user when sending a notification email for this subscription. Possible values are: <ul><li>NotificationSubscription.INITIATOR_FROM_USER, <li>NotificationSubscription.OWNER_FROM_USER, or <li>NotificationSubscription.SYSTEM_FROM_USER</ul> See the class constants javadoc for a description of each. This attribute is optional. If not specified, it defaults to NotificationSubscription.OWNER_FROM_USER."),@GeneratedProperty(name="subject",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="The email subject to include in any notification emails sent for this subscription. This attribute is optional; if not specified, default text is generated for the subject whenever an email is sent for this subscription."),@GeneratedProperty(name="message",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="Additional message text to include in any notification emails sent for this subscription. This attribute is optitonal; if not specified, no additional message text is included in the email body",constraints=@PropertyConstraints(upperLimit=4000)),@GeneratedProperty(name="expirationTime",type=java.sql.Timestamp.class,supportedAPI=PUBLIC,javaDoc="The expiration time for this subscription. When the expiration time is reached the subscription is deleted. This attribute is optional; if not specified, the subscription never expires."),@GeneratedProperty(name="sendImmediate",type=boolean.class,initialValue="false",supportedAPI=PUBLIC,javaDoc="Notification subscription emails can be sent at the time an event satisfying the subscription occurs or at a scheduled time in digest email format containing all notifications that have occured since the last digest email was sent. This attribute indicates whether notification emails for this subscription should be sent immediately or sent in a scheduled notification digest email. True means emails should be sent immediately for this subscription. This attribute is optitonal; IF NOT SPECIFIED, IT DEFAULTS TO FALSE."),@GeneratedProperty(name="subscriptionKey",type=java.lang.String.class),@GeneratedProperty(name="mutable",type=boolean.class,initialValue="true"),@GeneratedProperty(name="preX10Subscription",type=boolean.class,initialValue="false")},tableProperties=@TableProperties(compositeIndex1="ownership.owner.key.id",compositeIndex2="ownership.owner.key.id + thePersistInfo.theObjectIdentifier.id",compositeIndex3="name"),iconProperties=@IconProperties(standardIcon="netmarkets/images/iconSubscribe.gif",openIcon="netmarkets/images/iconSubscribe.gif")) public class NotificationSubscription extends _NotificationSubscription
Contains the common attributes for a Notification subscription. Attributes include: name, fromUser, subject, message, expirationTime, and sendImmediate. See the javadoc for the class fields for a description of each attribute.

A complete subscription consists of a single NotificationSubscription object, one or more NotifySubscriptionRecipient objects, and one or more NotifySubscriptionTarget objects.

Use the newNotificationSubscription static factory method(s), not the NotificationSubscription constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
  • Field Details

    • INITIATOR_FROM_USER

      public static final int INITIATOR_FROM_USER
      fromUser attribute constant. If fromUser is set to INITIATOR_FROM_USER, the email from user for notification emails sent for this subscription is the Windchill user that caused the event for this subscription.



      Supported API: true

      See Also:
    • OWNER_FROM_USER

      public static final int OWNER_FROM_USER
      fromUser attribute constant. If fromUser is set to OWNER_FROM_USER, the email from user for notification emails sent for this subscription is the subscription owner; this will usually be the subscription creator.



      Supported API: true

      See Also:
    • SYSTEM_FROM_USER

      public static final int SYSTEM_FROM_USER
      fromUser attribute constant. If fromUser is set to SYSTEM_FROM_USER, the email from user for notification emails sent for this subscription is the Windchill system email address.



      Supported API: true

      See Also:
  • Method Details

    • setFromUser

      public void setFromUser(int a_FromUser) throws WTPropertyVetoException
      Sets the value of the attribute: FROM_USER. An integer constant to indicate what should be used for the email From user when sending a notification email for this subscription. Possible values are:
      • NotificationSubscription.INITIATOR_FROM_USER,
      • NotificationSubscription.OWNER_FROM_USER, or
      • NotificationSubscription.SYSTEM_FROM_USER
      This attribute is optional. If not specified, it defaults to NotificationSubscription.OWNER_FROM_USER.

      Supported API: true
      Overrides:
      setFromUser in class _NotificationSubscription
      Parameters:
      a_FromUser -
      Throws:
      WTPropertyVetoException
      See Also:
    • newNotificationSubscription

      public static NotificationSubscription newNotificationSubscription(NotificationSubscription subscription) throws WTException
      Creates a new Notification Subscription object. The input NotificationSubscription object attributes are copied to the newly created object.

      Supported API: true
      Parameters:
      subscription - The subscription object used to initialize the newly created object.
      Returns:
      NotificationSubscription
      Throws:
      WTException
    • newNotificationSubscription

      public static NotificationSubscription newNotificationSubscription() throws WTException
      Default factory for the class.

      Supported API: true
      Returns:
      NotificationSubscription
      Throws:
      WTException
    • toString

      public String toString()
      Returns a string representation of the NotificationSubscription object contents.

      Supported API: true
      Overrides:
      toString in class WTObject
      Returns:
      String