Foros de discusión

Use PrefsPropsUtil inside hook

thumbnail
Raymond Gardner, modificado hace 7 años.

Use PrefsPropsUtil inside hook

Regular Member Mensajes: 118 Fecha de incorporación: 15/07/11 Mensajes recientes
How do I reference PrefsPropsUtil within a hook plugin?

This class is found in portal-impl which is not supposed to be packaged with the hook.

My hook is already using the portal-service.jar file. But, this .jar file does not contain the PrefsPropsUtil class.
Am I supposed to use a different class from within the hook? If so, which class might that be?
thumbnail
Raymond Gardner, modificado hace 7 años.

RE: Use PrefsPropsUtil inside hook

Regular Member Mensajes: 118 Fecha de incorporación: 15/07/11 Mensajes recientes
Nevermind!

I found it in the Liferay source under portal-service at: com.liferay.portal.kernel.util.PrefsParamUtil.

Previously, I was using it in the ext plugin as package: com.liferay.portal.util.PrefsPropsUtil.
This is where it is defined in portal-impl.jar. It is ok for an ext plugin to reference the portal-impl.jar file but it is not ok for a hook plugin to reference the portal-impl.jar file.

I suspect there is no difference in behavior between these two implementations.
thumbnail
Raymond Gardner, modificado hace 7 años.

RE: Use PrefsPropsUtil inside hook

Regular Member Mensajes: 118 Fecha de incorporación: 15/07/11 Mensajes recientes
Raymond Gardner:

I found it in the Liferay source under portal-service at: com.liferay.portal.kernel.util.PrefsParamUtil.

Correction: I found it at com.liferay.portal.kernel.util.PrefsPropsUtil