Foros de discusión

How to simply persist simple parameters?

thumbnail
Kravchenko Dmitry, modificado hace 12 años.

How to simply persist simple parameters?

Regular Member Mensajes: 139 Fecha de incorporación: 4/10/10 Mensajes recientes
Hi! I wan't to persist few simple parameters of my portlet. I want parameters to be application-wide, i.e. I want to set paramaters in Control Panel portlet but use them in main portlet and other classes, including some servlets.

Also I don't want to use heavy Service Builder for this.

Since I am using all of portlets, servlets and hooks, I can't rely on Liferay's session handling which does not work same way in all cases. I have already implemented my own application-wide storage.

So my question is only how to STORE my own serializable (?) POJO or just simple String instance in Liferay database in application-associated (not portlet-associated) place and READ it again later?

Thanks.
thumbnail
Sagar A Vyas, modificado hace 12 años.

RE: How to simply persist simple parameters?

Liferay Master Mensajes: 679 Fecha de incorporación: 17/04/09 Mensajes recientes
Hi ,

Hi! I wan't to persist few simple parameters of my portlet. I want parameters to be application-wide, i.e. I want to set paramaters in Control Panel portlet but use them in main portlet and other classes, including some servlets.


By looking at your requirement this point of time two thing pop up in mind

1) Global level attribute
2) Set Preferences

Thanks,
Sagar Vyas
thumbnail
Kravchenko Dmitry, modificado hace 12 años.

RE: How to simply persist simple parameters?

Regular Member Mensajes: 139 Fecha de incorporación: 4/10/10 Mensajes recientes
Sorry can you give some more precise links to Liferay API or Wiki?
thumbnail
Sagar A Vyas, modificado hace 12 años.

RE: How to simply persist simple parameters?

Liferay Master Mensajes: 679 Fecha de incorporación: 17/04/09 Mensajes recientes
Kravchenko Dmitry:
Sorry can you give some more precise links to Liferay API or Wiki?


Hi Dmitry,

What I am think is you should create your own portlet which accessible from Control panel only.

In that ask for key and value and store those into preferences so you can get value of that key all over.

Thanks,
Sagar Vyas