|
Liferay 7.0-ce-b4 | |||||||||
| 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 site's
layouts are exported or imported. PortletDataHandlers are
defined by placing a portlet-data-handler-class element in the
portlet section of the liferay-portlet.xml file.
| Method Summary | |
|---|---|
PortletPreferences |
addDefaultData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
Returns the portlet's preferences with default data added. |
PortletPreferences |
deleteData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
Deletes the data created by the portlet. |
String |
exportData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
Returns a string of data to be placed in the <portlet-data> section of the LAR file. |
DataLevel |
getDataLevel()
|
String[] |
getDataPortletPreferences()
Returns an array of the portlet preferences that reference data. |
StagedModelType[] |
getDeletionSystemEventStagedModelTypes()
|
PortletDataHandlerControl[] |
getExportConfigurationControls(long companyId,
long groupId,
Portlet portlet,
boolean privateLayout)
|
PortletDataHandlerControl[] |
getExportConfigurationControls(long companyId,
long groupId,
Portlet portlet,
long plid,
boolean privateLayout)
|
PortletDataHandlerControl[] |
getExportControls()
Returns an array of the controls defined for this data handler. |
PortletDataHandlerControl[] |
getExportMetadataControls()
Returns an array of the metadata controls defined for this data handler. |
long |
getExportModelCount(ManifestSummary manifestSummary)
Returns the number of entities defined for this data handler that are available for export according to the provided manifest summary, or -1 if no entities are included in the manifest summary. |
PortletDataHandlerControl[] |
getImportConfigurationControls(Portlet portlet,
ManifestSummary manifestSummary)
|
PortletDataHandlerControl[] |
getImportConfigurationControls(String[] configurationPortletOptions)
|
PortletDataHandlerControl[] |
getImportControls()
Returns an array of the controls defined for this data handler. |
PortletDataHandlerControl[] |
getImportMetadataControls()
Returns an array of the metadata controls defined for this data handler. |
String |
getPortletId()
|
int |
getRank()
|
String |
getSchemaVersion()
|
String |
getServiceName()
|
PortletPreferences |
importData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences,
String data)
Handles any special processing of the data when the portlet is imported into a new layout. |
boolean |
isDataAlwaysStaged()
|
boolean |
isDataLocalized()
|
boolean |
isDataPortalLevel()
|
boolean |
isDataPortletInstanceLevel()
|
boolean |
isDataSiteLevel()
|
boolean |
isDisplayPortlet()
|
boolean |
isPublishToLiveByDefault()
Returns whether the data exported by this handler should be included by default when publishing to live. |
boolean |
isRollbackOnException()
Returns true if the data handler stops operations and rolls
back their transactions on operations throwing exceptions. |
boolean |
isSupportsDataStrategyCopyAsNew()
|
void |
prepareManifestSummary(PortletDataContext portletDataContext)
|
void |
prepareManifestSummary(PortletDataContext portletDataContext,
PortletPreferences portletPreferences)
|
PortletPreferences |
processExportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
|
PortletPreferences |
processImportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
|
void |
setPortletId(String portletId)
|
void |
setRank(int rank)
|
boolean |
validateSchemaVersion(String schemaVersion)
|
| Method Detail |
|---|
PortletPreferences addDefaultData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
portletDataContext - the context of the data additionportletId - the portlet ID of the portletportletPreferences - the portlet preferences of the portlet
null if the data handler made no changes
to the portlet preferences
PortletDataException - if a portlet data exception occurred
PortletPreferences deleteData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
portletDataContext - the context of the data deletionportletId - the portlet ID of the portletportletPreferences - the portlet preferences of the portlet
null if the data handler made no changes
to the portlet preferences
PortletDataException - if a portlet data exception occurred
String exportData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
data
parameter of importData().
portletDataContext - the context of the data exportportletId - the portlet ID of the portletportletPreferences - the portlet preferences of the portlet
null if no portlet data is to be
written out
PortletDataException - if a portlet data exception occurredDataLevel getDataLevel()
String[] getDataPortletPreferences()
StagedModelType[] getDeletionSystemEventStagedModelTypes()
PortletDataHandlerControl[] getExportConfigurationControls(long companyId,
long groupId,
Portlet portlet,
boolean privateLayout)
throws Exception
Exception
PortletDataHandlerControl[] getExportConfigurationControls(long companyId,
long groupId,
Portlet portlet,
long plid,
boolean privateLayout)
throws Exception
Exception
PortletDataHandlerControl[] getExportControls()
throws PortletDataException
PortletDataException - if a portlet data exception occurred
PortletDataHandlerControl[] getExportMetadataControls()
throws PortletDataException
PortletDataException - if a portlet data exception occurredlong getExportModelCount(ManifestSummary manifestSummary)
-1 if no entities are included in the manifest summary.
manifestSummary - the manifest summary listing the number of
exportable entities
-1 if no entities are
included in the manifest summary
PortletDataHandlerControl[] getImportConfigurationControls(Portlet portlet,
ManifestSummary manifestSummary)
PortletDataHandlerControl[] getImportConfigurationControls(String[] configurationPortletOptions)
PortletDataHandlerControl[] getImportControls()
throws PortletDataException
PortletDataException - if a portlet data exception occurred
PortletDataHandlerControl[] getImportMetadataControls()
throws PortletDataException
PortletDataException - if a portlet data exception occurredString getPortletId()
int getRank()
String getSchemaVersion()
String getServiceName()
PortletPreferences importData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences,
String data)
throws PortletDataException
preferences to be saved in the new portlet.
portletDataContext - the context of the data importportletId - the portlet ID of the portletportletPreferences - the portlet preferences of the portletdata - the string data that was returned by
exportData()
null if the data handler made no changes
to the portlet preferences
PortletDataException - if a portlet data exception occurredboolean isDataAlwaysStaged()
boolean isDataLocalized()
boolean isDataPortalLevel()
boolean isDataPortletInstanceLevel()
boolean isDataSiteLevel()
boolean isDisplayPortlet()
boolean 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 if the data exported by this handler should be
included by default when publishing to live; false
otherwiseboolean isRollbackOnException()
true if the data handler stops operations and rolls
back their transactions on operations throwing exceptions.
true if the data handler stops operations and rolls
back their transactions on operations throwing exceptions;
false otherwiseboolean isSupportsDataStrategyCopyAsNew()
void prepareManifestSummary(PortletDataContext portletDataContext)
throws PortletDataException
PortletDataException
void prepareManifestSummary(PortletDataContext portletDataContext,
PortletPreferences portletPreferences)
throws PortletDataException
PortletDataException
PortletPreferences processExportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
PortletDataException
PortletPreferences processImportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
PortletDataExceptionvoid setPortletId(String portletId)
void setRank(int rank)
boolean validateSchemaVersion(String schemaVersion)
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||