Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jesper W
ServiceBuilder entities required to start with Capital letter from 4.3.6?
December 6, 2007 10:08 AM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

LEP-4397 highlights a change in the naming requirements for entities. (See my last comment there)

For some external developers this will mean renaming entities and modifing large amounts of code, patching database content and also in some instances having external links to certain servlet paramters no longer resolve.

Again, I believe since it was not previously a requirement it should not be made so all of a sudden.

Removing the if() in line 84 of portal-kernel\src\com\liferay\portal\kernel\util\ClassUtil.java would fix this, but I won't check that in without discussion/approval here.

/jesper
Brian Chan
RE: ServiceBuilder entities required to start with Capital letter from 4.3.
December 6, 2007 4:02 PM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 746

Join Date: August 4, 2004

Recent Posts

Hi Jesper,

LEP-4397 should have been a change only in 4.4.x. It also wasn't supposed to make it so that the generated code is any different, just that the pattern for the generated code is now in a freemarker template instead of in a java class.

I don't think we need to change ClassUtil ? It should just be a change in the FTL no?
Jesper W
RE: ServiceBuilder entities required to start with Capital letter from 4.3.
December 6, 2007 9:30 PM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

The FTL's are OK.

The issue is that ServiceBuilder uses formatter which uses ClassUtil to find out which class imports can be removed.
getClasses() doesn't count classes that doesn't begin with a capital letter as classes, and thus the imports get removed, which causes the generated code not to compile.

/j
Brian Chan
RE: ServiceBuilder entities required to start with Capital letter from 4.3.
December 6, 2007 11:55 PM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 746

Join Date: August 4, 2004

Recent Posts

Ahh... the import stripper emoticon

Yes. I think it'll be fine for you to check in your fix. That class is just used for source formatting. Thanks for noticing that Jesper.
Brian Chan
RE: ServiceBuilder entities required to start with Capital letter from 4.3.
December 6, 2007 11:56 PM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 746

Join Date: August 4, 2004

Recent Posts

Btw.. you should put up your avatar. Cause I just think of a "question" mark when I think of your name. emoticon
Jesper W
RE: ServiceBuilder entities required to start with Capital letter from 4.3.
December 7, 2007 8:34 AM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

emoticon Oops will have to get myself a haircut then....
Jesper W
RE: ServiceBuilder entities required to start with Capital letter from 4.3.
December 14, 2007 2:20 PM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

There you go.... Look! No hair!
Brian Chan
RE: ServiceBuilder entities required to start with Capital letter from 4.3.
December 14, 2007 6:33 PM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 746

Join Date: August 4, 2004

Recent Posts

emoticon