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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Supported API: truestatic enum
Supported API: truestatic enum
Supported API: truestatic enum
Supported API: truestatic enum
Supported API: truestatic enum
Supported API: truestatic enum
Supported API: true -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intfromUser attribute constant.static final intfromUser attribute constant.static final intfromUser attribute constant.Fields inherited from class wt.notify._NotificationSubscription
EXPIRATION_TIME, EXTERNALIZATION_VERSION_UID, FROM_USER, MESSAGE, MUTABLE, NAME, PRE_X10_SUBSCRIPTION, SEND_IMMEDIATE, SUBJECT, SUBSCRIPTION_KEYFields inherited from class wt.fc._WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMPFields inherited from interface wt.access._AdHocControlled
ENTRY_SETFields inherited from interface wt.fc.adminlock._AdministrativelyLockable
ADMINISTRATIVE_LOCKFields inherited from interface wt.admin._DomainAdministered
DOMAIN_REF, INHERITED_DOMAINFields inherited from interface wt.ownership._Ownable
OWNERSHIPFields inherited from interface wt.fc._Persistable
PERSIST_INFOFields inherited from interface wt.access._SecurityLabeled
SECURITY_LABELSFields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPEFields inherited from interface wt.fc.Persistable
IDENTITY, TYPEFields inherited from interface wt.access.SecurityLabeled
SECURITY_LABELS_INTERNAL_VALUE -
Method Summary
Modifier and TypeMethodDescriptionstatic NotificationSubscriptionDefault factory for the class.static NotificationSubscriptionnewNotificationSubscription(NotificationSubscription subscription) Creates a new Notification Subscription object.voidsetFromUser(int a_FromUser) Sets the value of the attribute: FROM_USER.toString()Returns a string representation of the NotificationSubscription object contents.Methods inherited from class wt.notify._NotificationSubscription
getAdministrativeLock, getClassInfo, getConceptualClassname, getDomainRef, getEntrySet, getExpirationTime, getFromUser, getMessage, getName, getOwnership, getSecurityLabels, getSubject, getSubscriptionKey, getType, isInheritedDomain, isMutable, isPreX10Subscription, isSendImmediate, readExternal, readExternal, readVersion, setAdministrativeLock, setDomainRef, setEntrySet, setExpirationTime, setInheritedDomain, setMessage, setMutable, setName, setOwnership, setPreX10Subscription, setSecurityLabels, setSendImmediate, setSubject, setSubscriptionKey, super_readExternal_NotificationSubscription, super_readVersion_NotificationSubscription, super_writeExternal_NotificationSubscription, writeExternal, writeExternalMethods inherited from class wt.fc.WTObject
checkAttributes, duplicate, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentityMethods inherited from class wt.fc._WTObject
equals, getCreateTimestamp, getModifyTimestamp, getPersistInfo, hashCode, readVersion, setPersistInfoMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface wt.fc._Persistable
getPersistInfo, setPersistInfoMethods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity
-
Field Details
-
INITIATOR_FROM_USER
public static final int INITIATOR_FROM_USERfromUser 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_USERfromUser 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_USERfromUser 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
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
Supported API: true- Overrides:
setFromUserin 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
Default factory for the class.
Supported API: true- Returns:
- NotificationSubscription
- Throws:
WTException
-
toString
Returns a string representation of the NotificationSubscription object contents.
Supported API: true
-