public abstract class BasePortletDataHandler extends Object implements PortletDataHandler
Constructor and Description |
---|
BasePortletDataHandler() |
Modifier and Type | Method and Description |
---|---|
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() |
PortletDataHandlerControl[] |
getStagingControls()
Returns an array of the controls defined for this data handler.
|
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. |
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 |
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 |
setStagingControls(PortletDataHandlerControl... stagingControls) |
protected void |
setSupportsDataStrategyCopyAsNew(boolean supportsDataStrategyCopyAsNew)
Deprecated.
As of Judson (7.1.x)
|
boolean |
validateSchemaVersion(String schemaVersion) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNamespace, isSupportsDataStrategyCopyAsNew, isSupportsDataStrategyMirrorWithOverwriting
public PortletPreferences addDefaultData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws PortletDataException
PortletDataHandler
addDefaultData
in interface PortletDataHandler
portletDataContext
- the context of the data additionportletId
- the portlet ID of the portletportletPreferences
- the portlet preferences of the portletnull
if the data handler made no changes
to the portlet preferencesPortletDataException
- if a portlet data exception occurredpublic PortletPreferences deleteData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws PortletDataException
PortletDataHandler
deleteData
in interface PortletDataHandler
portletDataContext
- the context of the data deletionportletId
- the portlet ID of the portletportletPreferences
- the portlet preferences of the portletnull
if the data handler made no changes
to the portlet preferencesPortletDataException
- if a portlet data exception occurredpublic String exportData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws PortletDataException
PortletDataHandler
data
parameter of importData()
.exportData
in interface PortletDataHandler
portletDataContext
- the context of the data exportportletId
- the portlet ID of the portletportletPreferences
- the portlet preferences of the portletnull
if no portlet data is to be
written outPortletDataException
- if a portlet data exception occurredpublic DataLevel getDataLevel()
getDataLevel
in interface PortletDataHandler
public String[] getDataPortletPreferences()
PortletDataHandler
getDataPortletPreferences
in interface PortletDataHandler
public StagedModelType[] getDeletionSystemEventStagedModelTypes()
getDeletionSystemEventStagedModelTypes
in interface PortletDataHandler
public PortletDataHandlerControl[] getExportConfigurationControls(long companyId, long groupId, Portlet portlet, boolean privateLayout) throws Exception
getExportConfigurationControls
in interface PortletDataHandler
Exception
public PortletDataHandlerControl[] getExportConfigurationControls(long companyId, long groupId, Portlet portlet, long plid, boolean privateLayout) throws Exception
getExportConfigurationControls
in interface PortletDataHandler
Exception
public PortletDataHandlerControl[] getExportControls()
PortletDataHandler
getExportControls
in interface PortletDataHandler
public PortletDataHandlerControl[] getExportMetadataControls()
PortletDataHandler
getExportMetadataControls
in interface PortletDataHandler
public long getExportModelCount(ManifestSummary manifestSummary)
PortletDataHandler
-1
if no entities are included in the manifest summary.getExportModelCount
in interface PortletDataHandler
manifestSummary
- the manifest summary listing the number of
exportable entities-1
if no entities are
included in the manifest summarypublic PortletDataHandlerControl[] getImportConfigurationControls(Portlet portlet, ManifestSummary manifestSummary)
getImportConfigurationControls
in interface PortletDataHandler
public PortletDataHandlerControl[] getImportConfigurationControls(String[] configurationPortletOptions)
getImportConfigurationControls
in interface PortletDataHandler
public PortletDataHandlerControl[] getImportControls()
PortletDataHandler
getImportControls
in interface PortletDataHandler
public PortletDataHandlerControl[] getImportMetadataControls()
PortletDataHandler
getImportMetadataControls
in interface PortletDataHandler
public String getPortletId()
getPortletId
in interface PortletDataHandler
public int getRank()
getRank
in interface PortletDataHandler
public String getSchemaVersion()
getSchemaVersion
in interface PortletDataHandler
public String getServiceName()
getServiceName
in interface PortletDataHandler
public PortletDataHandlerControl[] getStagingControls()
PortletDataHandler
getStagingControls
in interface PortletDataHandler
public PortletPreferences importData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences, String data) throws PortletDataException
PortletDataHandler
preferences
to be saved in the new portlet.importData
in interface PortletDataHandler
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 preferencesPortletDataException
- if a portlet data exception occurredpublic boolean isDataAlwaysStaged()
isDataAlwaysStaged
in interface PortletDataHandler
public boolean isDataLocalized()
isDataLocalized
in interface PortletDataHandler
public boolean isDataPortalLevel()
isDataPortalLevel
in interface PortletDataHandler
public boolean isDataPortletInstanceLevel()
isDataPortletInstanceLevel
in interface PortletDataHandler
public boolean isDataSiteLevel()
isDataSiteLevel
in interface PortletDataHandler
public boolean isDisplayPortlet()
isDisplayPortlet
in interface PortletDataHandler
public boolean isPublishToLiveByDefault()
PortletDataHandler
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.isPublishToLiveByDefault
in interface PortletDataHandler
true
if the data exported by this handler should be
included by default when publishing to live; false
otherwisepublic boolean isRollbackOnException()
PortletDataHandler
true
if the data handler stops operations and rolls
back their transactions on operations throwing exceptions.isRollbackOnException
in interface PortletDataHandler
true
if the data handler stops operations and rolls
back their transactions on operations throwing exceptions;
false
otherwisepublic void prepareManifestSummary(PortletDataContext portletDataContext) throws PortletDataException
prepareManifestSummary
in interface PortletDataHandler
PortletDataException
public void prepareManifestSummary(PortletDataContext portletDataContext, PortletPreferences portletPreferences) throws PortletDataException
prepareManifestSummary
in interface PortletDataHandler
PortletDataException
public PortletPreferences processExportPortletPreferences(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws PortletDataException
processExportPortletPreferences
in interface PortletDataHandler
PortletDataException
public PortletPreferences processImportPortletPreferences(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws PortletDataException
processImportPortletPreferences
in interface PortletDataHandler
PortletDataException
public void setPortletId(String portletId)
setPortletId
in interface PortletDataHandler
public void setRank(int rank)
setRank
in interface PortletDataHandler
public boolean validateSchemaVersion(String schemaVersion)
validateSchemaVersion
in interface PortletDataHandler
protected 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
Exception
protected String getExportDataRootElementString(Element rootElement)
protected long getExportModelCount(ManifestSummary manifestSummary, PortletDataHandlerControl[] portletDataHandlerControls)
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 setStagingControls(PortletDataHandlerControl... stagingControls)
@Deprecated protected void setSupportsDataStrategyCopyAsNew(boolean supportsDataStrategyCopyAsNew)