@ProviderType
public class DDMStructureServiceUtil
extends java.lang.Object
com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl and is the
primary 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.DDMStructureService,
com.liferay.portlet.dynamicdatamapping.service.base.DDMStructureServiceBaseImpl,
com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl| Constructor and Description |
|---|
DDMStructureServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static DDMStructure |
addStructure(long userId,
long groupId,
long classNameId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String xsd,
ServiceContext serviceContext)
Adds a structure referencing a default parent structure, using the portal
property
dynamic.data.lists.storage.type storage type and
default structure type. |
static DDMStructure |
addStructure(long groupId,
long parentStructureId,
long classNameId,
java.lang.String structureKey,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String xsd,
java.lang.String storageType,
int type,
ServiceContext serviceContext)
Adds a structure referencing its parent structure.
|
static DDMStructure |
addStructure(long userId,
long groupId,
java.lang.String parentStructureKey,
long classNameId,
java.lang.String structureKey,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String xsd,
java.lang.String storageType,
int type,
ServiceContext serviceContext)
Adds a structure referencing the parent structure by its structure key.
|
static DDMStructure |
copyStructure(long structureId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
ServiceContext serviceContext)
Copies a structure, creating a new structure with all the values
extracted from the original one.
|
static DDMStructure |
copyStructure(long structureId,
ServiceContext serviceContext) |
static void |
deleteStructure(long structureId)
Deletes the structure and its resources.
|
static DDMStructure |
fetchStructure(long groupId,
long classNameId,
java.lang.String structureKey)
Returns the structure matching the class name ID, structure key, and
group.
|
static java.lang.String |
getBeanIdentifier()
Returns the Spring bean ID for this bean.
|
static DDMStructureService |
getService() |
static DDMStructure |
getStructure(long structureId)
Returns the structure with the ID.
|
static DDMStructure |
getStructure(long groupId,
long classNameId,
java.lang.String structureKey)
Returns the structure matching the class name ID, structure key, and
group.
|
static DDMStructure |
getStructure(long groupId,
long classNameId,
java.lang.String structureKey,
boolean includeGlobalStructures)
Returns the structure matching the class name ID, structure key, and
group, optionally in the global scope.
|
static java.util.List<DDMStructure> |
getStructures(long groupId)
Returns all the structures in the group that the user has permission to
view.
|
static java.util.List<DDMStructure> |
getStructures(long[] groupIds)
Returns all the structures in the groups that the user has permission to
view.
|
static java.util.List<DDMStructure> |
getStructures(long[] groupIds,
long classNameId) |
static java.util.List<DDMStructure> |
getStructures(long[] groupIds,
long classNameId,
int start,
int end) |
static java.util.List<DDMStructure> |
search(long companyId,
long[] groupIds,
long[] classNameIds,
java.lang.String keywords,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the structures matching the groups and
class name IDs, and matching the keywords in the structure names and
descriptions.
|
static java.util.List<DDMStructure> |
search(long companyId,
long[] groupIds,
long[] classNameIds,
java.lang.String name,
java.lang.String description,
java.lang.String storageType,
int type,
boolean andOperator,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the structures matching the groups, class
name IDs, name keyword, description keyword, storage type, and type.
|
static int |
searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
java.lang.String keywords)
Returns the number of structures matching the groups and class name IDs,
and matching the keywords in the structure names and descriptions.
|
static int |
searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
java.lang.String name,
java.lang.String description,
java.lang.String storageType,
int type,
boolean andOperator)
Returns the number of structures matching the groups, class name IDs,
name keyword, description keyword, storage type, and type
|
static void |
setBeanIdentifier(java.lang.String beanIdentifier)
Sets the Spring bean ID for this bean.
|
void |
setService(DDMStructureService service)
Deprecated.
As of 6.2.0
|
static DDMStructure |
updateStructure(long groupId,
long parentStructureId,
long classNameId,
java.lang.String structureKey,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String xsd,
ServiceContext serviceContext)
Updates the structure matching the class name ID, structure key, and
group, replacing its old parent structure, name map, description map, and
XSD with new ones.
|
static DDMStructure |
updateStructure(long structureId,
long parentStructureId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.lang.String xsd,
ServiceContext serviceContext)
Updates the structure matching the structure ID, replacing the old parent
structure ID, name map, description map, and XSD with the new values.
|
public static java.lang.String getBeanIdentifier()
public static void setBeanIdentifier(java.lang.String beanIdentifier)
beanIdentifier - the Spring bean ID for this beanpublic static DDMStructure addStructure(long userId, long groupId, long classNameId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.lang.String xsd, ServiceContext serviceContext) throws PortalException, SystemException
dynamic.data.lists.storage.type storage type and
default structure type.userId - the primary key of the structure's creator/ownergroupId - the primary key of the groupclassNameId - the primary key of the class name for the structure's
related modelnameMap - the structure's locales and localized namesdescriptionMap - the structure's locales and localized descriptionsxsd - the structure's XML schema definitionserviceContext - the service context to be applied. Can set the
UUID, creation date, modification date, guest permissions, and
group permissions for the structure.PortalException - if a user with the primary key could not be
found, if the user did not have permission to add the structure,
if the XSD was not well-formed, or if a portal exception occurredSystemException - if a system exception occurredpublic static DDMStructure addStructure(long groupId, long parentStructureId, long classNameId, java.lang.String structureKey, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.lang.String xsd, java.lang.String storageType, int type, ServiceContext serviceContext) throws PortalException, SystemException
groupId - the primary key of the groupparentStructureId - the primary key of the parent structure
(optionally DDMStructureConstants.DEFAULT_PARENT_STRUCTURE_ID)classNameId - the primary key of the class name for the structure's
related modelstructureKey - the unique string identifying the structure
(optionally null)nameMap - the structure's locales and localized namesdescriptionMap - the structure's locales and localized descriptionsxsd - the structure's XML schema definitionstorageType - the structure's storage type. It can be "xml" or
"expando". For more information, see StorageType.type - the structure's type. For more information, see DDMStructureConstants.serviceContext - the service context to be applied. Can set the
UUID, creation date, modification date, guest permissions, and
group permissions for the structure.PortalException - if the user did not have permission to add the
structure, if the XSD is not well formed, or if a portal
exception occurredSystemException - if a system exception occurredpublic static DDMStructure addStructure(long userId, long groupId, java.lang.String parentStructureKey, long classNameId, java.lang.String structureKey, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.lang.String xsd, java.lang.String storageType, int type, ServiceContext serviceContext) throws PortalException, SystemException
userId - the primary key of the structure's creator/ownergroupId - the primary key of the groupparentStructureKey - the unique string identifying the structureclassNameId - the primary key of the class name for the structure's
related modelstructureKey - unique string identifying the structure (optionally
null)nameMap - the structure's locales and localized namesdescriptionMap - the structure's locales and localized descriptionsxsd - the XML schema definition of the structurestorageType - the storage type of the structure. It can be XML or
expando. For more information, see StorageType.type - the structure's type. For more information, see DDMStructureConstants.serviceContext - the service context to be applied. Must have the
ddmResource attribute to check permissions. Can set
the UUID, creation date, modification date, guest permissions,
and group permissions for the structure.PortalException - if a user with the primary key could not be
found, if the user did not have permission to add the structure,
if the XSD was not well-formed, or if a portal exception occurredSystemException - if a system exception occurredpublic static DDMStructure copyStructure(long structureId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, ServiceContext serviceContext) throws PortalException, SystemException
structureId - the primary key of the structure to be copiednameMap - the new structure's locales and localized namesdescriptionMap - the new structure's locales and localized
descriptionsserviceContext - the service context to be applied. Can set the
UUID, creation date, modification date, guest permissions, and
group permissions for the structure.PortalException - if the user did not have permission to add the
structure or if a portal exception occurredSystemException - if a system exception occurredpublic static DDMStructure copyStructure(long structureId, ServiceContext serviceContext) throws PortalException, SystemException
PortalExceptionSystemExceptionpublic static void deleteStructure(long structureId)
throws PortalException,
SystemException
Before deleting the structure, the system verifies whether the structure is required by another entity. If it is needed, an exception is thrown.
structureId - the primary key of the structure to be deletedPortalException - if the user did not have permission to delete the
structure or if a portal exception occurredSystemException - if a system exception occurredpublic static DDMStructure fetchStructure(long groupId, long classNameId, java.lang.String structureKey) throws PortalException, SystemException
groupId - the primary key of the groupclassNameId - the primary key of the class name for the structure's
related modelstructureKey - the unique string identifying the structurenull if a matching
structure could not be foundPortalException - if the user did not have permission to view the
structure or if a portal exception occurredSystemException - if a system exception occurredpublic static DDMStructure getStructure(long structureId) throws PortalException, SystemException
structureId - the primary key of the structurePortalException - if the user did not have permission to view the
structure or if a structure with the ID could not be foundSystemException - if a system exception occurredpublic static DDMStructure getStructure(long groupId, long classNameId, java.lang.String structureKey) throws PortalException, SystemException
groupId - the primary key of the structure's groupclassNameId - the primary key of the class name for the structure's
related modelstructureKey - the unique string identifying the structurePortalException - if the user did not have permission to view the
structure or if a matching structure could not be foundSystemException - if a system exception occurredpublic static DDMStructure getStructure(long groupId, long classNameId, java.lang.String structureKey, boolean includeGlobalStructures) throws PortalException, SystemException
This method first searches in the group. If the structure is still not
found and includeGlobalStructures is set to
true, this method searches the global group.
groupId - the primary key of the structure's groupclassNameId - the primary key of the class name for the structure's
related modelstructureKey - the unique string identifying the structureincludeGlobalStructures - whether to include the global scope in
the searchPortalException - if the user did not have permission to view the
structure or if a matching structure could not be foundSystemException - if a system exception occurredpublic static java.util.List<DDMStructure> getStructures(long groupId) throws SystemException
groupId - the primary key of the groupSystemException - if a system exception occurredpublic static java.util.List<DDMStructure> getStructures(long[] groupIds) throws SystemException
groupIds - the primary key of the groupsSystemException - if a system exception occurredpublic static java.util.List<DDMStructure> getStructures(long[] groupIds, long classNameId) throws SystemException
SystemExceptionpublic static java.util.List<DDMStructure> getStructures(long[] groupIds, long classNameId, int start, int end) throws SystemException
SystemExceptionpublic static java.util.List<DDMStructure> search(long companyId, long[] groupIds, long[] classNameIds, java.lang.String keywords, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
companyId - the primary key of the structure's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the class names of the models
the structures are related tokeywords - the keywords (space separated), which may occur in the
structure's name or description (optionally null)start - the lower bound of the range of structures to returnend - the upper bound of the range of structures to return (not
inclusive)orderByComparator - the comparator to order the structures
(optionally null)SystemException - if a system exception occurredpublic static java.util.List<DDMStructure> search(long companyId, long[] groupIds, long[] classNameIds, java.lang.String name, java.lang.String description, java.lang.String storageType, int type, boolean andOperator, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
companyId - the primary key of the structure's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the class names of the models
the structures are related toname - the name keywordsdescription - the description keywordsstorageType - the structure's storage type. It can be "xml" or
"expando". For more information, see StorageType.type - the structure's type. For more information, see DDMStructureConstants.andOperator - whether every field must match its keywords, or just
one fieldstart - the lower bound of the range of structures to returnend - the upper bound of the range of structures to return (not
inclusive)orderByComparator - the comparator to order the structures
(optionally null)SystemException - if a system exception occurredpublic static int searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
java.lang.String keywords)
throws SystemException
companyId - the primary key of the structure's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the class names of the models
the structures are related tokeywords - the keywords (space separated), which may occur in the
structure's name or description (optionally null)SystemException - if a system exception occurredpublic static int searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
java.lang.String name,
java.lang.String description,
java.lang.String storageType,
int type,
boolean andOperator)
throws SystemException
companyId - the primary key of the structure's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the class names of the models
the structure's are related toname - the name keywordsdescription - the description keywordsstorageType - the structure's storage type. It can be "xml" or
"expando". For more information, see StorageType.type - the structure's type. For more information, see DDMStructureConstants.andOperator - whether every field must match its keywords, or just
one fieldSystemException - if a system exception occurredpublic static DDMStructure updateStructure(long groupId, long parentStructureId, long classNameId, java.lang.String structureKey, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.lang.String xsd, ServiceContext serviceContext) throws PortalException, SystemException
groupId - the primary key of the groupparentStructureId - the primary key of the new parent structureclassNameId - the primary key of the class name for the structure's
related modelstructureKey - the unique string identifying the structurenameMap - the structure's new locales and localized namesdescriptionMap - the structure's new locales and localized
descriptionxsd - the structure's new XML schema definitionserviceContext - the service context to be applied. Can set the
modification date.PortalException - if the user did not have permission to update the
structure or if a portal exception occurredSystemException - if a system exception occurredpublic static DDMStructure updateStructure(long structureId, long parentStructureId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.lang.String xsd, ServiceContext serviceContext) throws PortalException, SystemException
structureId - the primary key of the structureparentStructureId - the new parent structure primary keynameMap - the structure's new locales and localized namesdescriptionMap - the structure's new locales and localized
descriptionxsd - the new XML schema definition of the structureserviceContext - the service context to be applied. Can set the
modification date.PortalException - if the user did not have permission to update the
structure or if a portal exception occurredSystemException - if a system exception occurredpublic static DDMStructureService getService()
public void setService(DDMStructureService service)