Foros de discusión

how to reindex after addPermission

Dariusz Sawicki, modificado hace 12 años.

how to reindex after addPermission

Regular Member Mensajes: 165 Fecha de incorporación: 27/03/09 Mensajes recientes
Hello
I add permision by


ResourcePermissionLocalServiceUtil.setResourcePermissions(themeDisplay.getCompanyId(), name,  ResourceConstants.SCOPE_COMPANY, primKey, getViewRole(themeDisplay,portletName).getRoleId(),actionIds );


or


ResourcePermissionLocalServiceUtil.addResourcePermission(themeDisplay.getCompanyId(), name,  ResourceConstants.SCOPE_COMPANY, primKey, getViewRole(themeDisplay,portletName).getRoleId(),ActionKeys.ACCESS_IN_CONTROL_PANEL );


And I want to reindex

Indexer indexer = IndexerRegistryUtil.getIndexer(ResourcePermissionModel.class);
or
Indexer indexer = IndexerRegistryUtil.getIndexer(ResourcePermission.class);

but indexer is null

Regards

Darek
thumbnail
Javier Lora, modificado hace 3 años.

RE: how to reindex after addPermission

New Member Mensajes: 9 Fecha de incorporación: 27/01/10 Mensajes recientes
Hi,

Is null because there is no indexer declared for ResourcePermission.
Observed in liferay-portlet.xml, setting an example for Calendar
<indexer-class> com.liferay.portlet.calendar.util.CalIndexer </ indexer-class>

Javier Lora Peribáñez
B2B2000
thumbnail
Hitoshi Ozawa, modificado hace 12 años.

RE: how to reindex after addPermission

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Following up on Javier, why do you need to reindex resource permission? It's currently not indexed.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set.


"index" used here is the resultset of the query.