Package wt.notify
Class NotifySubscriptionTarget
java.lang.Object
wt.fc._WTObject
wt.fc.WTObject
wt.notify._NotifySubscriptionTarget
wt.notify.NotifySubscriptionTarget
- All Implemented Interfaces:
Externalizable,Serializable,wt.fc._NetFactor,wt.fc._ObjectMappable,wt.fc._Persistable,NetFactor,ObjectMappable,Persistable,DisplayIdentification
@GenAsPersistable(superClass=WTObject.class,serializable=EXTERNALIZABLE_BASIC,properties={@GeneratedProperty(name="event",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="The event that is subscribed to for the target object. When the event occurs for the target this subscription fires."),@GeneratedProperty(name="targetType",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="The target object type subscribed to. Target object type only applies for subscription targets (the targetRef) that are folder objects or container objects.",constraints=@PropertyConstraints(upperLimit=220)),@GeneratedProperty(name="targetRef",type=ObjectReference.class,supportedAPI=PUBLIC,javaDoc="The reference to the subscription target object. Three different types of references can be stored. If the target object is <code>Iterated</code>, the <code>ObjectReference</code> will reference a <code>ControlBranch</code>. If the object is <code>Versioned</code> and the <code>subscribeAllVersions</code> attribure is true, the <code>ObjectReference</code> will reference the target object\'s <code>Master</code>; if <code>subscribeAllVersions</code> is false the <code>ObjectReference</code> will reference a <code>ControlBranch</code>. Otherwise, the reference will be to the target object itself.",accessors=@PropertyAccessors(getAccess=PRIVATE)),@GeneratedProperty(name="targetRefType",type=int.class,initialValue="NotifySubscriptionTarget.REFTYPE_UNSPECIFIED",accessors=@PropertyAccessors(getAccess=PRIVATE)),@GeneratedProperty(name="attributeValueMap",type=WTStringMap.class,supportedAPI=PUBLIC,javaDoc="If a subscription is to apply only when the target object has one or more of its attributes set to a specific value, the attributeValueMap contains these attributes and their corresponding values. This map maps String attribute names to their corresponding String value. When the subscribed to event occurs for the target object, the subscription won\'t fire unless these attributes and values match the current values for the target object\'s corresponding attributes. For example, a subscription could be created for a State Change where the target object\'s State attribute value has to be Released for the subscription to fire.",constraints=@PropertyConstraints(upperLimit=4000)),@GeneratedProperty(name="includeSubfolders",type=boolean.class,initialValue="false",javaDoc="If the target object is a folder, indicates whether the subscription should also apply its subfolders. True means the subscription should apply to the subfolders. If not specified, the default value is false"),@GeneratedProperty(name="subscribeAllVersions",type=boolean.class,initialValue="false",supportedAPI=PUBLIC,javaDoc="If the target object is a versioned object, indicates whether the subscription should apply to 1) all iterations of all versions or 2) only to iterations of a single version. True means the subscription applies to all iterations of all versions. If notspecified, the default value is false."),@GeneratedProperty(name="applyToLatestIterationOnly",type=boolean.class,initialValue="false",javaDoc="If the target object is an iterated object, indicates whether the subscription should apply only to the latest iterationfor the target object. True means the subscription only applies to the latest iteration. If not specified, the default is false.")},foreignKeys=@GeneratedForeignKey(name="NotifySubscriptionTargetLink",foreignKeyRole=@ForeignKeyRole(name="subscription",type=NotificationSubscription.class,constraints=@PropertyConstraints(required=true)),myRole=@MyRole(name="target",cardinality=ONE_TO_MANY,cascade=true)),tableProperties=@TableProperties(compositeIndex1="subscriptionReference.key.id",compositeIndex2="targetRef.key.id + event",compositeIndex3="event",compositeIndex4="targetRef.key.id + subscriptionReference.key.id"))
public class NotifySubscriptionTarget
extends _NotifySubscriptionTarget
Contains the information specific to a notification
subscription target object. Targets can be objects (e.g.,
parts, documents, plan items, etc.), Types contained in
folders (e.g., the type WTPart for a subscription to a folder
would mean you are subscribing to an event occuring for any
part object in that folder), or, similar to folders, Types
contained in containers. The attributes contained in this
class are the attributes necessary to uniquely identify a
target and any other information that is unique to a
subscription target. In addition, this class contains a
reference to the NotificationSubscription object the target
applies to.
A complete subscription consists of a single NotificationSubscription object, one or more NotifySubscriptionRecipient objects, and one or more NotifySubscriptionTarget objects.
Use the newNotifySubscriptionTarget static factory method(s),
not the NotifySubscriptionTarget 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.
Note that NotifySubscriptionTarget objects are created by Windchill when a subscription is created. Directly creating objects of this class is not supported.
Supported API: true
Extendable: false
-
Field Summary
Fields inherited from class wt.notify._NotifySubscriptionTarget
ATTRIBUTE_VALUE_MAP, EVENT, SUBSCRIBE_ALL_VERSIONS, TARGET_REF, TARGET_TYPE -
Method Summary
Modifier and TypeMethodDescriptionReturns an Enumeration containing the attribute names in the ATTRIBUTE_VALUE_MAP attribute.getAttributeValue(String attributeName) Returns the value associated with the specified attributeName contained in the ATTRIBUTE_VALUE_MAP attribute.Returns a reference to the actual target object represented by the TARGET_REF attribute.Gets the value of the attribute: TARGET_REF.booleanReturns a boolean indicating whether anything has been set for the ATTRIBUTE_VALUE_MAP attribute.toString()Returns a string representation of the NotifySubscriptionTarget object contents.Methods inherited from class wt.notify._NotifySubscriptionTarget
getAttributeValueMap, getEvent, getTargetType, isSubscribeAllVersions, setAttributeValueMap, setEvent, setSubscribeAllVersions, setTargetTypeMethods inherited from class wt.fc.WTObject
getDisplayIdentifier, getDisplayIdentity, getDisplayType
-
Method Details
-
getTargetRef
Gets the value of the attribute: TARGET_REF. This attribute stores the reference to the subscription target object. Three different types of references can be stored. If the target object isIterated, theObjectReferencewill reference aControlBranch. If the object isVersionedand thesubscribeAllVersionsattribure is true, theObjectReferencewill reference the target object'sMaster; ifsubscribeAllVersionsis false theObjectReferencewill reference aControlBranch. Otherwise, the reference will be to the target object itself. Note: If you want to get the reference for the target object rather than a control branch or master reference, use the getTargetObjectReference method.
Supported API: true- Returns:
- ObjectReference
- See Also:
-
getTargetObjectReference
Returns a reference to the actual target object represented by the TARGET_REF attribute. The TARGET_REF attribute can be one of: master reference, control branch reference, or object reference. If it is a master reference, the object reference for the latest iteration of the master is returned. If it is a control branch reference, the object reference for the latest iteration for the branch is returned. If it is an object reference, the object reference is returned. Note: If you want to get the actual reference stored for the TARGET_REF attribute, use the getTargetRef method.
Supported API: true- Returns:
- ObjectReference
- Throws:
WTException- See Also:
-
hasAttributes
public boolean hasAttributes()Returns a boolean indicating whether anything has been set for the ATTRIBUTE_VALUE_MAP attribute. True is returned if the ATTRIBUTE_VALUE_MAP attribute is not null and not an empty map; otherwise, false is returned.
Supported API: true- Returns:
- boolean
-
getAttributeNames
Returns an Enumeration containing the attribute names in the ATTRIBUTE_VALUE_MAP attribute. An empty Enumeration is returned if the ATTRIBUTE_VALUE_MAP attribute is null or an empty map.
Supported API: true- Returns:
- Enumeration
-
getAttributeValue
Returns the value associated with the specified attributeName contained in the ATTRIBUTE_VALUE_MAP attribute. Null is returned if the ATTRIBUTE_VALUE_MAP is null or the attributeName is not a key in the map.
Supported API: true- Parameters:
attributeName- The attribute name whose corresponding value is to be returned.- Returns:
- String
-
toString
Returns a string representation of the NotifySubscriptionTarget object contents.
Supported API: true
-