|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.esi.evt.EventEmitter
Creates an ESI event and sends it to JMS via Info*engine.
Supported API: true
Extendable: true
Constructor Summary | |
EventEmitter()
|
Method Summary | |
protected void |
addParam(String name,
Object value)
Adds a task parameter to the event creation task before it's executed. |
protected void |
addTaskParams()
Allows subclasses to add additional parameters to the task before it's executed. |
private static ArrayList |
buildLcList(String s,
String delimiter)
|
protected String |
encodeUser(String userIn)
|
private void |
eventValidate(ESIEvent a_Event)
|
ESIEvent |
getEvent()
Gets the object for the association that plays role: event. |
protected Locale |
getLocale()
Obtains the locale to use to publish objects. |
protected String |
getUserName()
Obtains the user ID of the individual responsible for publishing objects. |
private void |
initialize()
|
private static void |
initLocaleMaps()
|
private boolean |
inSourceLocaleSet(Locale locale)
|
protected void |
invokeTask(Releasable object,
String action,
WTObject waitingObject,
String userName,
Locale locale)
Invoke an Info*Engine task to write the ESI Event into the appropriate JMS queue.Obtains from ESI properties:the name of the taskthe name of the JMS queueJMS queue authentication informationObtains the current user from the Session Manager.Obtains the SOAP message from the SoapRequestRenderer in the renderer attribute.Passes the obtained information to the task as parametersInvokes the task Supported API: true |
private static boolean |
isSupportedLocale(Locale locale)
|
void |
releasePart(WTPart part,
String action,
WTPart waitingPart)
Validates arguments and then: creates a new transaction creates a new event passes the event to a new EventRenderer creates the task defined in the property "com.ptc.windchill.esi.eventTask" invokes the task Supported API: true |
void |
releasePart(WTPart part,
String action,
WTPart waitingPart,
String userName,
Locale locale)
Validates arguments and then: creates a new transaction creates a new event passes the event to a new EventRenderer creates the task defined in the property "com.ptc.windchill.esi.eventTask" invokes the task Supported API: true |
void |
releaseWTChangeOrder2(WTChangeOrder2 ecn,
String action,
WTObject waitingObject)
Validates arguments and then: creates a new transaction creates a new event passes the event to a new EventRenderer creates the task defined in the property "com.ptc.windchill.esi.eventTask" invokes the task Supported API: true |
void |
releaseWTChangeOrder2(WTChangeOrder2 ecn,
String action,
WTObject waitingObject,
String userName,
Locale locale)
Validates arguments and then: creates a new transaction creates a new event passes the event to a new EventRenderer creates the task defined in the property "com.ptc.windchill.esi.eventTask" invokes the task Supported API: true |
private void |
say(String s)
|
void |
setEvent(ESIEvent a_Event)
Sets the object for the association that plays role: event. |
protected void |
testArgument(Object obj,
String name,
Class cls)
|
protected void |
testStringArgument(String s,
String name)
|
protected void |
updateTask()
Provided as a convenience to extenders of the class. |
protected void |
validate(String className,
WTObject object)
Obtains an instance of ESIValidator and invokes the validate() method on that instance. |
protected void |
validatePart(WTPart part)
Makes sure that the argument is in the correct state to be published by ESI. |
protected void |
validateWTChangeOrder2(WTChangeOrder2 ecn)
Makes sure that the argument is in the correct state to be published by ESI. |
protected void |
validateWTObject(WTObject object)
Convenience for extenders of this class. |
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
private ESIValidator validator
private SoapRequestRenderer renderer
private ESIEvent event
private ESIECNFactory ecnFactory
protected static final String NULL_STRING
protected static final ESIPropertyRequest EVENT_QUEUE_NAME
protected static final ESIPropertyRequest EVENT_QUEUE_USER
protected static final ESIPropertyRequest EVENT_QUEUE_PASSWORD
protected static final ESIPropertyRequest EVENT_QUEUE_TASK
protected static final ESIPropertyRequest EVENT_SOAP_RENDERER
protected static final ESIPropertyRequest EVENT_PART_VALIDATOR
protected static final ESIPropertyRequest EVENT_ECN_VALIDATOR
protected static final ESIPropertyRequest EVENT_WTOBJECT_VALIDATOR
protected static final ESIPropertyRequest ADMIN_USER
protected static final ESIPropertyRequest EVENT_AUTO_GENERATE_ECN
protected static final ESIPropertyRequest EVENT_ECN_FACTORY
protected String jmsQueueName
protected String jmsQueueUser
protected String jmsQueuePassword
protected String jmsQueueTaskName
private Task task
private static String sourceLocales
private static String targetLocales
private static HashMap esiLocaleMap
private static ArrayList sl
private static ArrayList tl
private static Locale esiTargetLocale
Constructor Detail |
public EventEmitter()
Method Detail |
public ESIEvent getEvent()
public void setEvent(ESIEvent a_Event) throws WTPropertyVetoException
a_Event
-
WTPropertyVetoException
private void eventValidate(ESIEvent a_Event) throws WTPropertyVetoException
a_Event
-
WTPropertyVetoException
public final void releasePart(WTPart part, String action, WTPart waitingPart) throws WTException
part
- action
- waitingPart
- optional parameter. If not null, the id of the part is passed in the generated event
WTException
public final void releasePart(WTPart part, String action, WTPart waitingPart, String userName, Locale locale) throws WTException
part
- action
- waitingPart
- optional parameter. If not null, the id of the part is passed in the generated eventuserName
- The user ID of the individual responsible for publishing the object.locale
- The locale to use for publishing the object.
WTException
public final void releaseWTChangeOrder2(WTChangeOrder2 ecn, String action, WTObject waitingObject) throws WTException
ecn
- action
- waitingObject
- optional parameter. If not null, the id of the WTChangeOrder2 is passed in the generated event
WTException
public final void releaseWTChangeOrder2(WTChangeOrder2 ecn, String action, WTObject waitingObject, String userName, Locale locale) throws WTException
ecn
- action
- waitingObject
- optional parameter. If not null, the id of the WTChangeOrder2 is passed in the generated eventuserName
- The user ID of the individual responsible for publishing the object.locale
- The locale to use for publishing the object.
WTException
protected void addTaskParams()
protected void addParam(String name, Object value)
name
- value
- protected void validatePart(WTPart part) throws WTException
part
-
WTException
protected void validateWTChangeOrder2(WTChangeOrder2 ecn) throws WTException
ecn
-
WTException
protected void validateWTObject(WTObject object) throws WTException
object
-
WTException
protected void validate(String className, WTObject object) throws WTException
className
- The name of a class that implements ESIValidator.object
- The object whose state is to be validated.
WTException
protected void updateTask()
protected void invokeTask(Releasable object, String action, WTObject waitingObject, String userName, Locale locale) throws ESIEventException
object
- The object that is to be published by ESI.action
- The type of release.waitingObject
- Optional argument that indicates a workflow is waiting for a Windchill event.userName
- The user ID of the individual responsible for publishing the object.locale
- The locale to use for publishing the object.
ESIEventException
protected String getUserName() throws ESIEventException
ESIEventException
protected Locale getLocale() throws ESIEventException
ESIEventException
protected void testArgument(Object obj, String name, Class cls) throws ESIEventException
ESIEventException
protected void testStringArgument(String s, String name) throws ESIEventException
ESIEventException
protected String encodeUser(String userIn)
private void initialize()
private void say(String s)
private static boolean isSupportedLocale(Locale locale)
private static void initLocaleMaps()
private static ArrayList buildLcList(String s, String delimiter)
private boolean inSourceLocaleSet(Locale locale)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |