|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.projmgmt.monitor.ProjectNotification
Auxiliary class that encapsulates project management notification functionality.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private static String |
DEADLINE_CHANGE_TEMPLATE_NAME
|
private static String |
DEADLINE_TEMPLATE_NAME
|
private static String |
EXECUTION_STATE
|
static long |
EXTERNALIZATION_VERSION_UID
|
private static String |
MANAGER_KEY
|
static String |
MSG_SEPARATOR
|
private static String |
OBJECT_DELETION_TEMPLATE_NAME
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
OWNER_CHANGE_TEMPLATE_NAME
|
private static String |
OWNER_KEY
|
private static String |
RESOURCE
|
private static String |
SENDER_EMAIL
|
(package private) static long |
serialVersionUID
|
private static String |
STATE_CHANGE_TEMPLATE_NAME
|
private static String |
STATUS_CHANGE_TEMPLATE_NAME
|
private static boolean |
USE_TEMPLATE
|
private static boolean |
VERBOSE
|
Constructor Summary | |
ProjectNotification()
|
Method Summary | |
static ExecutionObject |
createDefaultSubscriptions(ExecutionObject exec_obj)
Creates subscriptions to perform notification of events as specified in the execution object's configuration. |
static Notification |
createNotification(ObjectSubscription subscription,
DistributionList recipients)
Creates notification given the template, the object subscription and the recipients. |
static void |
createSubscription(ExecutionObject exec_obj,
ProjectEventType event,
Vector subscribers,
String msg,
String attr_name,
String attr_value,
String key)
Creates subscription to an execution object and event on behalf of the subscribers passed as argument. |
static void |
createSubscriptions(ProjectPlan plan)
Generates subscriptions for all execution objects contained in the plan passed as argument. |
private static void |
encodeObjInfo(ObjectSubscription subscription,
ExecutionObject exec_obj)
Encodes object information in subscription message's body. |
private static Vector |
filterSubscribers(ExecutionObject exec_obj,
String event_key,
Vector subscribers,
String msg,
String attr_name,
String attr_value)
|
private static String |
getEventTypeString(String event_key)
|
private static String |
getExecObjName(ExecutionObject exec_obj)
Returns name of the execution object preceded by its type. |
private static String |
getIdString(Object obj)
|
private static Vector |
getManagers(ExecutionObject exec_obj)
|
static String |
getName(ObjectSubscription subscription)
|
private static ObjectIdentifier |
getOid(Object obj)
|
static ProjectPlan |
getProjectPlan(ObjectSubscription subscription)
|
private static String |
getStateChangeKey(ProjectState new_state)
Returns key represent the transition corresponding to the state change. |
private static String |
getSubject(ProjectEventType event_type,
ExecutionObject exec_obj,
ObjectSubscription subscription)
Generates notification subject. |
private static String |
getTemplateName(ProjectEventType event_type)
Returns template name. |
private static Vector |
getVector(Object obj)
|
private static boolean |
isTheSame(ObjectSubscription subscription,
String msg,
String attr_name,
String attr_value)
|
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(ProjectNotification thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
static void |
transferOwnerSubscriptions(ExecutionObject exec_obj,
WTPrincipal user1,
WTPrincipal user2)
Transfers owner subscriptions on the object passed as argument from one uesr to another. |
static void |
unsubscribe(ExecutionObject exec_obj,
ProjectEventType event,
Vector subscribers,
String msg,
String attr_name,
String attr_value,
String key)
Unsubscribes to events - for use with Owner / PM subscriptions. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final String MSG_SEPARATOR
private static final boolean VERBOSE
private static final boolean USE_TEMPLATE
private static final String SENDER_EMAIL
private static final String EXECUTION_STATE
private static final String DEADLINE_TEMPLATE_NAME
private static final String DEADLINE_CHANGE_TEMPLATE_NAME
private static final String STATE_CHANGE_TEMPLATE_NAME
private static final String STATUS_CHANGE_TEMPLATE_NAME
private static final String OBJECT_DELETION_TEMPLATE_NAME
private static final String OWNER_CHANGE_TEMPLATE_NAME
private static final String MANAGER_KEY
private static final String OWNER_KEY
Constructor Detail |
public ProjectNotification()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(ProjectNotification thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public static Notification createNotification(ObjectSubscription subscription, DistributionList recipients) throws WTException
subscription
- recipients
-
WTException
StandardNotificationManager
,
ObjectSubscription
public static ExecutionObject createDefaultSubscriptions(ExecutionObject exec_obj) throws WTException
exec_obj
-
WTException
ExecutionConfiguration
,
ObjectSubscription
public static void createSubscriptions(ProjectPlan plan) throws WTException
Project2
)
is activated to create subscriptions when state changes are not allowed
(manual mode).
plan
-
WTException
public static void createSubscription(ExecutionObject exec_obj, ProjectEventType event, Vector subscribers, String msg, String attr_name, String attr_value, String key) throws WTException
exec_obj
- event
- subscribers
- msg
- attr_name
- attr_value
- key
-
WTException
ObjectSubscription
public static void transferOwnerSubscriptions(ExecutionObject exec_obj, WTPrincipal user1, WTPrincipal user2) throws WTException
exec_obj
- user1
- user2
-
WTException
ObjectSubscription
public static void unsubscribe(ExecutionObject exec_obj, ProjectEventType event, Vector subscribers, String msg, String attr_name, String attr_value, String key) throws WTException
exec_obj
- event
- subscribers
- msg
- attr_name
- attr_value
- key
-
WTException
private static void encodeObjInfo(ObjectSubscription subscription, ExecutionObject exec_obj) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
public static String getName(ObjectSubscription subscription)
public static ProjectPlan getProjectPlan(ObjectSubscription subscription) throws WTException
WTException
private static String getStateChangeKey(ProjectState new_state)
private static String getExecObjName(ExecutionObject exec_obj)
private static String getEventTypeString(String event_key)
private static String getSubject(ProjectEventType event_type, ExecutionObject exec_obj, ObjectSubscription subscription) throws WTException
WTException
private static String getTemplateName(ProjectEventType event_type)
private static Vector filterSubscribers(ExecutionObject exec_obj, String event_key, Vector subscribers, String msg, String attr_name, String attr_value) throws WTException
WTException
private static Vector getManagers(ExecutionObject exec_obj) throws WTException
WTException
private static boolean isTheSame(ObjectSubscription subscription, String msg, String attr_name, String attr_value)
private static String getIdString(Object obj)
private static ObjectIdentifier getOid(Object obj)
private static Vector getVector(Object obj)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |