Back Forum Reply New

'new' command with enums and @Service

hi all..
  am I able to generate a class that has the @Service annotation?  using the 'new' command, i don't see a path that has this capability.  
  also, same question for enums.  is there a way to generate enums?

thx

At this stage we do not have Roo commands to create @Service types nor enums. You can create an empty Java source file, though, with quot;new java filequot; and quot;new test filequot;, depending whether you prefer the created file to be in the src_MAIN_JAVA or src_TEST_JAVA directories respectively.

You're invited to add new enhancement requests to our Jira issue tracker if you'd like inbuilt support for creating @Service classes and enums. You can add issues at browse/ROO.

One of the considerations with a quot;new java enumquot; command is the likelihood of an associated request for an quot;add enum constantquot; command so that people can build their enums via Roo scripts. In this case there will also likely need to be an quot;add field enum jpaquot; so you end up with an @Enumerated(EnumType.ORDINAL) or @Enumerated(EnumType.ORDINAL) or @Enumerated(EnumType.STRING) annotated on that field.

There are fewer considerations for the quot;new java servicequot; command. We have recently added JMS and email support and these seem logical commands to be used in combination with quot;new java servicequot;.

thanks Ben...
  great work on the jms and email.  looking forward to those feature.  i like your thinking in regards to enum support.   right now, i'd prefer web flow support before service/emum.  i noticed there's a jira for that.
i'll add the enum and service features to jira...mainly for tracking purposes..

appreciate the hard work..looking forward to the next release...

thanks

Thanks for the suggestions.

Personally I would create an @Service by hand and wouldn't see much value unless there were value adds like JMS.

I see more value in Enums because they are so verbose.

In general, a consideration is whether Roo should be duplicating functionality that exists satisfactorily in the IDE, like one-way generation of Java constructs.
¥
Back Forum Reply New