|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portlet.exportimport.lar.BasePortletDataHandler
public abstract class BasePortletDataHandler
| Constructor Summary | |
|---|---|
BasePortletDataHandler()
|
|
| Method Summary | |
|---|---|
PortletPreferences |
addDefaultData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
Returns the portlet's preferences with default data added. |
protected Element |
addExportDataRootElement(PortletDataContext portletDataContext)
|
protected Element |
addImportDataRootElement(PortletDataContext portletDataContext,
String data)
|
protected void |
addUncheckedModelAdditionCount(PortletDataContext portletDataContext,
PortletDataHandlerControl portletDataHandlerControl)
|
PortletPreferences |
deleteData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
Deletes the data created by the portlet. |
protected PortletPreferences |
doAddDefaultData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
|
protected PortletPreferences |
doDeleteData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
|
protected String |
doExportData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
|
protected PortletPreferences |
doImportData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences,
String data)
|
protected void |
doPrepareManifestSummary(PortletDataContext portletDataContext,
PortletPreferences portletPreferences)
|
protected PortletPreferences |
doProcessExportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
|
protected PortletPreferences |
doProcessImportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
|
protected boolean |
doValidateSchemaVersion(String schemaVersion)
|
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. |
protected String |
getExportDataRootElementString(Element rootElement)
|
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. |
protected long |
getExportModelCount(ManifestSummary manifestSummary,
PortletDataHandlerControl[] portletDataHandlerControls)
|
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)
|
protected void |
setAlwaysExportable(boolean alwaysExportable)
Deprecated. As of 6.2.0 |
protected void |
setAlwaysStaged(boolean alwaysStaged)
Deprecated. As of 6.2.0 |
protected void |
setDataAlwaysStaged(boolean dataAlwaysStaged)
|
protected void |
setDataLevel(DataLevel dataLevel)
|
protected void |
setDataLocalized(boolean dataLocalized)
|
protected void |
setDataPortletPreferences(String... dataPortletPreferences)
|
protected void |
setDeletionSystemEventStagedModelTypes(StagedModelType... deletionSystemEventStagedModelTypes)
|
protected void |
setExportControls(PortletDataHandlerControl... exportControls)
|
protected void |
setExportMetadataControls(PortletDataHandlerControl... exportMetadataControls)
|
protected void |
setImportControls(PortletDataHandlerControl... importControls)
|
protected void |
setImportMetadataControls(PortletDataHandlerControl... importMetadataControls)
|
void |
setPortletId(String portletId)
|
protected void |
setPublishToLiveByDefault(boolean publishToLiveByDefault)
|
void |
setRank(int rank)
|
protected void |
setSupportsDataStrategyCopyAsNew(boolean supportsDataStrategyCopyAsNew)
|
boolean |
validateSchemaVersion(String schemaVersion)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasePortletDataHandler()
| Method Detail |
|---|
public PortletPreferences addDefaultData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
PortletDataHandler
addDefaultData in interface PortletDataHandlerportletDataContext - 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
public PortletPreferences deleteData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
PortletDataHandler
deleteData in interface PortletDataHandlerportletDataContext - 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
public String exportData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
PortletDataHandlerdata
parameter of importData().
exportData in interface PortletDataHandlerportletDataContext - 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 occurredpublic DataLevel getDataLevel()
getDataLevel in interface PortletDataHandlerpublic String[] getDataPortletPreferences()
PortletDataHandler
getDataPortletPreferences in interface PortletDataHandlerpublic StagedModelType[] getDeletionSystemEventStagedModelTypes()
getDeletionSystemEventStagedModelTypes in interface PortletDataHandler
public PortletDataHandlerControl[] getExportConfigurationControls(long companyId,
long groupId,
Portlet portlet,
boolean privateLayout)
throws Exception
getExportConfigurationControls in interface PortletDataHandlerException
public PortletDataHandlerControl[] getExportConfigurationControls(long companyId,
long groupId,
Portlet portlet,
long plid,
boolean privateLayout)
throws Exception
getExportConfigurationControls in interface PortletDataHandlerExceptionpublic PortletDataHandlerControl[] getExportControls()
PortletDataHandler
getExportControls in interface PortletDataHandlerpublic PortletDataHandlerControl[] getExportMetadataControls()
PortletDataHandler
getExportMetadataControls in interface PortletDataHandlerpublic long getExportModelCount(ManifestSummary manifestSummary)
PortletDataHandler-1 if no entities are included in the manifest summary.
getExportModelCount in interface PortletDataHandlermanifestSummary - the manifest summary listing the number of
exportable entities
-1 if no entities are
included in the manifest summary
public PortletDataHandlerControl[] getImportConfigurationControls(Portlet portlet,
ManifestSummary manifestSummary)
getImportConfigurationControls in interface PortletDataHandlerpublic PortletDataHandlerControl[] getImportConfigurationControls(String[] configurationPortletOptions)
getImportConfigurationControls in interface PortletDataHandlerpublic PortletDataHandlerControl[] getImportControls()
PortletDataHandler
getImportControls in interface PortletDataHandlerpublic PortletDataHandlerControl[] getImportMetadataControls()
PortletDataHandler
getImportMetadataControls in interface PortletDataHandlerpublic String getPortletId()
getPortletId in interface PortletDataHandlerpublic int getRank()
getRank in interface PortletDataHandlerpublic String getSchemaVersion()
getSchemaVersion in interface PortletDataHandlerpublic String getServiceName()
getServiceName in interface PortletDataHandler
public PortletPreferences importData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences,
String data)
throws PortletDataException
PortletDataHandlerpreferences to be saved in the new portlet.
importData in interface PortletDataHandlerportletDataContext - 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 occurredpublic boolean isDataAlwaysStaged()
isDataAlwaysStaged in interface PortletDataHandlerpublic boolean isDataLocalized()
isDataLocalized in interface PortletDataHandlerpublic boolean isDataPortalLevel()
isDataPortalLevel in interface PortletDataHandlerpublic boolean isDataPortletInstanceLevel()
isDataPortletInstanceLevel in interface PortletDataHandlerpublic boolean isDataSiteLevel()
isDataSiteLevel in interface PortletDataHandlerpublic boolean isDisplayPortlet()
isDisplayPortlet in interface PortletDataHandlerpublic boolean isPublishToLiveByDefault()
PortletDataHandlertrue
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.
isPublishToLiveByDefault in interface PortletDataHandlertrue if the data exported by this handler should be
included by default when publishing to live; false
otherwisepublic boolean isRollbackOnException()
PortletDataHandlertrue if the data handler stops operations and rolls
back their transactions on operations throwing exceptions.
isRollbackOnException in interface PortletDataHandlertrue if the data handler stops operations and rolls
back their transactions on operations throwing exceptions;
false otherwisepublic boolean isSupportsDataStrategyCopyAsNew()
isSupportsDataStrategyCopyAsNew in interface PortletDataHandler
public void prepareManifestSummary(PortletDataContext portletDataContext)
throws PortletDataException
prepareManifestSummary in interface PortletDataHandlerPortletDataException
public void prepareManifestSummary(PortletDataContext portletDataContext,
PortletPreferences portletPreferences)
throws PortletDataException
prepareManifestSummary in interface PortletDataHandlerPortletDataException
public PortletPreferences processExportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
processExportPortletPreferences in interface PortletDataHandlerPortletDataException
public PortletPreferences processImportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws PortletDataException
processImportPortletPreferences in interface PortletDataHandlerPortletDataExceptionpublic void setPortletId(String portletId)
setPortletId in interface PortletDataHandlerpublic void setRank(int rank)
setRank in interface PortletDataHandlerpublic boolean validateSchemaVersion(String schemaVersion)
validateSchemaVersion in interface PortletDataHandlerprotected Element addExportDataRootElement(PortletDataContext portletDataContext)
protected Element addImportDataRootElement(PortletDataContext portletDataContext,
String data)
throws DocumentException
DocumentException
protected void addUncheckedModelAdditionCount(PortletDataContext portletDataContext,
PortletDataHandlerControl portletDataHandlerControl)
protected PortletPreferences doAddDefaultData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws Exception
Exception
protected PortletPreferences doDeleteData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws Exception
Exception
protected String doExportData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws Exception
Exception
protected PortletPreferences doImportData(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences,
String data)
throws Exception
Exception
protected void doPrepareManifestSummary(PortletDataContext portletDataContext,
PortletPreferences portletPreferences)
throws Exception
Exception
protected PortletPreferences doProcessExportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws Exception
Exception
protected PortletPreferences doProcessImportPortletPreferences(PortletDataContext portletDataContext,
String portletId,
PortletPreferences portletPreferences)
throws Exception
Exception
protected boolean doValidateSchemaVersion(String schemaVersion)
throws Exception
Exceptionprotected String getExportDataRootElementString(Element rootElement)
protected long getExportModelCount(ManifestSummary manifestSummary,
PortletDataHandlerControl[] portletDataHandlerControls)
@Deprecated protected void setAlwaysExportable(boolean alwaysExportable)
@Deprecated protected void setAlwaysStaged(boolean alwaysStaged)
protected void setDataAlwaysStaged(boolean dataAlwaysStaged)
protected void setDataLevel(DataLevel dataLevel)
protected void setDataLocalized(boolean dataLocalized)
protected void setDataPortletPreferences(String... dataPortletPreferences)
protected void setDeletionSystemEventStagedModelTypes(StagedModelType... deletionSystemEventStagedModelTypes)
protected void setExportControls(PortletDataHandlerControl... exportControls)
protected void setExportMetadataControls(PortletDataHandlerControl... exportMetadataControls)
protected void setImportControls(PortletDataHandlerControl... importControls)
protected void setImportMetadataControls(PortletDataHandlerControl... importMetadataControls)
protected void setPublishToLiveByDefault(boolean publishToLiveByDefault)
protected void setSupportsDataStrategyCopyAsNew(boolean supportsDataStrategyCopyAsNew)
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||