public class DDLRecordServiceUtil
extends java.lang.Object
com.liferay.dynamic.data.lists.service.impl.DDLRecordServiceImpl
and is an
access point for service operations in application layer code running on a
remote server. Methods of this service are expected to have security checks
based on the propagated JAAS credentials because this service can be
accessed remotely.DDLRecordService
Constructor and Description |
---|
DDLRecordServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static DDLRecord |
addRecord(long groupId,
long recordSetId,
int displayIndex,
com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a record referencing the record set.
|
static void |
deleteRecord(long recordId)
Deletes the record and its resources.
|
static java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static DDLRecord |
getRecord(long recordId)
Returns the record with the ID.
|
static java.util.List<DDLRecord> |
getRecords(long recordSetId)
Returns all the records matching the record set ID
|
static DDLRecordService |
getService() |
static void |
revertRecord(long recordId,
java.lang.String version,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Reverts the record to a given version.
|
static DDLRecord |
updateRecord(long recordId,
boolean majorVersion,
int displayIndex,
com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates a record, replacing its display index and values.
|
public static DDLRecord addRecord(long groupId, long recordSetId, int displayIndex, com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the record's grouprecordSetId
- the primary key of the record setdisplayIndex
- the index position in which the record is displayed
in the spreadsheet viewddmFormValues
- the record values. See DDMFormValues
in the dynamic.data.mapping.api
module.serviceContext
- the service context to be applied. This can set
the UUID, guest permissions, and group permissions for the
record.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic static void deleteRecord(long recordId) throws com.liferay.portal.kernel.exception.PortalException
recordId
- the primary key of the record to be deletedcom.liferay.portal.kernel.exception.PortalException
public static java.lang.String getOSGiServiceIdentifier()
public static DDLRecord getRecord(long recordId) throws com.liferay.portal.kernel.exception.PortalException
recordId
- the primary key of the recordcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic static java.util.List<DDLRecord> getRecords(long recordSetId) throws com.liferay.portal.kernel.exception.PortalException
recordSetId
- the record's record set IDcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic static void revertRecord(long recordId, java.lang.String version, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
recordId
- the primary key of the recordversion
- the version to be revertedserviceContext
- the service context to be applied. This can set
the record modified date.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic static DDLRecord updateRecord(long recordId, boolean majorVersion, int displayIndex, com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
recordId
- the primary key of the recordmajorVersion
- whether this update is a major change. A major
change increments the record's major version number.displayIndex
- the index position in which the record is displayed
in the spreadsheet viewddmFormValues
- the record values. See DDMFormValues
in the dynamic.data.mapping.api
module.serviceContext
- the service context to be applied. This can set
the record modified date.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic static DDLRecordService getService()