|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletDataHandler
A PortletDataHandler
is a special class capable of exporting and
importing portlet specific data to a Liferay Archive file (LAR) when a
community's layouts are exported or imported.
PortletDataHandler
s are defined by placing a
portlet-data-handler-class
element in the portlet
section of the liferay-portlet.xml file.
Method Summary | |
---|---|
PortletPreferences |
deleteData(PortletDataContext context,
String portletId,
PortletPreferences preferences)
Deletes the data created by the portlet. |
String |
exportData(PortletDataContext context,
String portletId,
PortletPreferences preferences)
Returns a string of data to be placed in the <portlet-data> section of the LAR file. |
PortletDataHandlerControl[] |
getExportControls()
Returns an array of the controls defined for this data handler. |
PortletDataHandlerControl[] |
getImportControls()
Returns an array of the controls defined for this data handler. |
PortletPreferences |
importData(PortletDataContext context,
String portletId,
PortletPreferences preferences,
String data)
Handles any special processing of the data when the portlet is imported into a new layout. |
boolean |
isAlwaysExportable()
Returns true to allow the user to export data for this
portlet even though it may not belong to any pages. |
boolean |
isPublishToLiveByDefault()
Returns whether the data exported by this handler should be included by default when publishing to live. |
Method Detail |
---|
PortletPreferences deleteData(PortletDataContext context, String portletId, PortletPreferences preferences) throws PortletDataException
preferences
if it contains reference to data that
does not exist anymore.
context
- the context of the data deletionportletId
- the portlet id of the portletpreferences
- the portlet preferences of the portlet
Null
if the preferences were unmodified by this data
handler.
PortletDataException
String exportData(PortletDataContext context, String portletId, PortletPreferences preferences) throws PortletDataException
data
parameter of importData()
.
context
- the context of the data exportportletId
- the portlet id of the portletpreferences
- the portlet preferences of the portlet
Null
should be returned if no portlet
data is to be written out.
PortletDataException
PortletDataHandlerControl[] getExportControls() throws PortletDataException
PortletDataException
PortletDataHandlerControl[] getImportControls() throws PortletDataException
PortletDataException
PortletPreferences importData(PortletDataContext context, String portletId, PortletPreferences preferences, String data) throws PortletDataException
preferences
to be saved in the new portlet.
context
- the context of the data importportletId
- the portlet id of the portletpreferences
- the portlet preferences of the portletdata
- the string data that was returned by
exportData()
Null
if the preferences were unmodified by this data
handler.
PortletDataException
boolean isAlwaysExportable()
true
to allow the user to export data for this
portlet even though it may not belong to any pages. See LPS-1624.
true
to allow the user to export data for this
portlet even though it may not belong to any pagesboolean isPublishToLiveByDefault()
true
for data that is meant to be managed in an staging environment such as
CMS content, but not for data meant to be input by users such as wiki
pages or message board posts.
true
to publish to live by default
|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |