[ http://jira.jboss.com/jira/browse/JBSEAM-1117?page=comments#action_12357528 ]
Bradley Smith commented on JBSEAM-1117:
---------------------------------------
oh yes - would it be possible to allow for a single @RaiseEvent annotation to raise multiple events - i.e. an array of event values, types?
> support enum types in @RaiseEvent or a new @RaiseEventType annotation
> ---------------------------------------------------------------------
>> Key: JBSEAM-1117
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1117> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Reporter: Bradley Smith
>> RaiseEvent:
> @Target(METHOD)
> @Retention(RUNTIME)
> @Documented
> public @interface RaiseEvent
> {
>> /**
> * The event name, defaults to the name
> * of the method.
> *
> * @return the event name
> */
> String value() default "";
>> //TODO: String[] ifOutcome() default {};
>> }
> Is it possible to make the value be based on an enum type? I currently have all my application event types enumerated in enum called EventType.
> I've tried doing:
> @RaiseEvent(EventType.ApplicationSaved.name())
> however, this doesn't count as a constant String and is invalid syntax. It seems more 'elegant' to be able to enumerate the event types of an application in something like an enum than to sprinkle strings throughout the code with the specific event String values.
> Maybe an alternate annotation is called for - say, @RaiseEventType(MyEnum.MyEventType)?
> I'm not sure - I don't have a solid grasp of the syntax used to define an annotation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira