Message Boards

How to find if any portlet is deleted

avasek atok, modified 8 Years ago.

How to find if any portlet is deleted

Junior Member Posts: 41 Join Date: 1/9/15 Recent Posts
Is there any API to check if a portlet exists in liferay system. We are storing portlet instance id's using service builder into a custom table, hence while iterating through the portlet instance id's I just want to know if there can be any liferay API, using which will I be able to identify if the portlet exists in the system or delete from the system.

Please suggest/share your experiences.
thumbnail
Meera Prince, modified 8 Years ago.

RE: How to find if any portlet is deleted

Liferay Legend Posts: 1111 Join Date: 2/8/11 Recent Posts
Hi
We have table called portlet_ there you can see column acetive this may be help you and also we can have layout table there you can have typeSettings column where you can see available portlets for each page. from these i think we can do some logic so that it will full fill your need,

example type settings columns

layout-template-id=2_columns_iii
column-2=148_INSTANCE_mO1jLXZhY251,114,
column-1=33,

Regards,
Meera Prince
thumbnail
Jitendra Rajput, modified 8 Years ago.

RE: How to find if any portlet is deleted

Liferay Master Posts: 875 Join Date: 1/7/11 Recent Posts
Meera Prince:
Hi
We have table called portlet_ there you can see column acetive this may be help you and also we can have layout table there you can have typeSettings column



Little correction table name is layout_ not portlet_
avasek atok, modified 8 Years ago.

RE: How to find if any portlet is deleted

Junior Member Posts: 41 Join Date: 1/9/15 Recent Posts
I tried with some API's in liferay, but couldn't fine any the correct one to check if the portlet really exists in the liferay system (Demoticon.

I have written a layout listener and i am storing the type settings in a table.
This table data got corrupted. I am reading the type settings data stored from this table and want to check if those instances really exists in liferay system.
If not i want to delete the stale data from the table based on the portlet instance existence.

So want to know if there is any Liferay API to find out the existence of portlet instance

Thanks,