Class DDMStructureServiceUtil
com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl
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.- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DDMStructure
addStructure
(long groupId, long parentStructureId, long classNameId, String structureKey, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType, int type, com.liferay.portal.kernel.service.ServiceContext serviceContext) static DDMStructure
addStructure
(long groupId, long classNameId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType, com.liferay.portal.kernel.service.ServiceContext serviceContext) static DDMStructure
addStructure
(long groupId, String parentStructureKey, long classNameId, String structureKey, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType, int type, com.liferay.portal.kernel.service.ServiceContext serviceContext) static DDMStructure
copyStructure
(long sourceStructureId, com.liferay.portal.kernel.service.ServiceContext serviceContext) static DDMStructure
copyStructure
(long sourceStructureId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) Copies a structure, creating a new structure with all the values extracted from the original one.static void
deleteStructure
(long structureId) Deletes the structure and its resources.static DDMStructure
fetchStructure
(long groupId, long classNameId, String structureKey) Returns the structure matching the class name ID, structure key, and group.static DDMStructure
fetchStructure
(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures) static DDMStructure
fetchStructureByExternalReferenceCode
(String externalReferenceCode, long groupId, long classNameId) static String
Returns the OSGi service identifier.static DDMStructureService
static DDMStructure
getStructure
(long structureId) Returns the structure with the ID.static DDMStructure
getStructure
(long groupId, long classNameId, String structureKey) Returns the structure matching the class name ID, structure key, and group.static DDMStructure
getStructure
(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures) Returns the structure matching the class name ID, structure key, and group, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.static DDMStructure
getStructureByExternalReferenceCode
(String externalReferenceCode, long groupId, long classNameId) static List<DDMStructure>
getStructures
(long companyId, long[] groupIds, long classNameId, int status) static List<DDMStructure>
getStructures
(long companyId, long[] groupIds, long classNameId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) static List<DDMStructure>
getStructures
(long companyId, long[] groupIds, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) static List<DDMStructure>
getStructures
(long companyId, long[] groupIds, long classNameId, String keywords, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) static int
getStructuresCount
(long companyId, long[] groupIds, long classNameId) static int
getStructuresCount
(long companyId, long[] groupIds, long classNameId, String keywords, int status) static void
revertStructure
(long structureId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext) static List<DDMStructure>
search
(long companyId, long[] groupIds, long classNameId, long classPK, String keywords, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) static List<DDMStructure>
search
(long companyId, long[] groupIds, long classNameId, String keywords, int type, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> 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 List<DDMStructure>
search
(long companyId, long[] groupIds, long classNameId, String keywords, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> 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 List<DDMStructure>
search
(long companyId, long[] groupIds, long classNameId, String name, String description, String storageType, int type, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> 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 classNameId, long classPK, String keywords, int status) static int
searchCount
(long companyId, long[] groupIds, long classNameId, String keywords, int status) 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 classNameId, String keywords, int type, int status) 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 classNameId, String name, String description, String storageType, int type, int status, boolean andOperator) Returns the number of structures matching the groups, class name IDs, name keyword, description keyword, storage type, and typestatic DDMStructure
updateStructure
(long groupId, long parentStructureId, long classNameId, String structureKey, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, com.liferay.portal.kernel.service.ServiceContext serviceContext) static DDMStructure
updateStructure
(long structureId, long parentStructureId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, com.liferay.portal.kernel.service.ServiceContext serviceContext)
-
Constructor Details
-
DDMStructureServiceUtil
public DDMStructureServiceUtil()
-
-
Method Details
-
addStructure
public static DDMStructure addStructure(long groupId, long parentStructureId, long classNameId, String structureKey, Map<Locale, String> nameMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType, int type, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addStructure
public static DDMStructure addStructure(long groupId, long classNameId, Map<Locale, String> nameMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addStructure
public static DDMStructure addStructure(long groupId, String parentStructureKey, long classNameId, String structureKey, Map<Locale, String> nameMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType, int type, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
copyStructure
public static DDMStructure copyStructure(long sourceStructureId, Map<Locale, String> nameMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) Copies a structure, creating a new structure with all the values extracted from the original one. The new structure supports a new name and description.- Parameters:
sourceStructureId
- 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.- Returns:
- the new structure
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
copyStructure
public static DDMStructure copyStructure(long sourceStructureId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteStructure
public static void deleteStructure(long structureId) throws com.liferay.portal.kernel.exception.PortalException Deletes the structure and its resources.Before deleting the structure, the system verifies whether the structure is required by another entity. If it is needed, an exception is thrown.
- Parameters:
structureId
- the primary key of the structure to be deleted- Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchStructure
public static DDMStructure fetchStructure(long groupId, long classNameId, String structureKey) throws com.liferay.portal.kernel.exception.PortalException Returns the structure matching the class name ID, structure key, and group.- Parameters:
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 structure- Returns:
- the matching structure, or
null
if a matching structure could not be found - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchStructure
public static DDMStructure fetchStructure(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchStructureByExternalReferenceCode
public static DDMStructure fetchStructureByExternalReferenceCode(String externalReferenceCode, long groupId, long classNameId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getStructure
public static DDMStructure getStructure(long structureId) throws com.liferay.portal.kernel.exception.PortalException Returns the structure with the ID.- Parameters:
structureId
- the primary key of the structure- Returns:
- the structure with the ID
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getStructure
public static DDMStructure getStructure(long groupId, long classNameId, String structureKey) throws com.liferay.portal.kernel.exception.PortalException Returns the structure matching the class name ID, structure key, and group.- Parameters:
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 structure- Returns:
- the matching structure
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getStructure
public static DDMStructure getStructure(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures) throws com.liferay.portal.kernel.exception.PortalException Returns the structure matching the class name ID, structure key, and group, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.This method first searches in the group. If the structure is still not found and
includeAncestorStructures
is set totrue
, this method searches the group's ancestor sites (that have sharing enabled) and lastly searches global scoped sites.- Parameters:
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 structureincludeAncestorStructures
- whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search- Returns:
- the matching structure
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getStructureByExternalReferenceCode
public static DDMStructure getStructureByExternalReferenceCode(String externalReferenceCode, long groupId, long classNameId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getStructures
public static List<DDMStructure> getStructures(long companyId, long[] groupIds, long classNameId, int status) -
getStructures
public static List<DDMStructure> getStructures(long companyId, long[] groupIds, long classNameId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) -
getStructures
public static List<DDMStructure> getStructures(long companyId, long[] groupIds, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) -
getStructures
public static List<DDMStructure> getStructures(long companyId, long[] groupIds, long classNameId, String keywords, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) -
getStructuresCount
public static int getStructuresCount(long companyId, long[] groupIds, long classNameId) -
getStructuresCount
public static int getStructuresCount(long companyId, long[] groupIds, long classNameId, String keywords, int status) -
revertStructure
public static void revertStructure(long structureId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
public static List<DDMStructure> search(long companyId, long[] groupIds, long classNameId, long classPK, String keywords, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
public static List<DDMStructure> search(long companyId, long[] groupIds, long classNameId, String keywords, int type, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Parameters:
companyId
- the primary key of the structure's companygroupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name of the model the structure is related tokeywords
- the keywords (space separated), which may occur in the structure's name or description (optionallynull
)type
- the structure's type. For more information, seeDDMStructureConstants
.status
- the workflow's status.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 (optionallynull
)- Returns:
- the range of matching structures ordered by the comparator
-
search
public static List<DDMStructure> search(long companyId, long[] groupIds, long classNameId, String keywords, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Parameters:
companyId
- the primary key of the structure's companygroupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name of the model the structure is related tokeywords
- the keywords (space separated), which may occur in the structure's name or description (optionallynull
)status
- the workflow's status.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 (optionallynull
)- Returns:
- the range of matching structures ordered by the comparator
-
search
public static List<DDMStructure> search(long companyId, long[] groupIds, long classNameId, String name, String description, String storageType, int type, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMStructure> orderByComparator) Returns an ordered range of all the structures matching the groups, class name IDs, name keyword, description keyword, storage type, and type.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Parameters:
companyId
- the primary key of the structure's companygroupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name of the model the structure is related toname
- the name keywordsdescription
- the description keywordsstorageType
- the structure's storage type. It can be "xml" or "expando". For more information, seeStorageType
.type
- the structure's type. For more information, seeDDMStructureConstants
.status
- the workflow's status.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 (optionallynull
)- Returns:
- the range of matching structures ordered by the comparator
-
searchCount
public static int searchCount(long companyId, long[] groupIds, long classNameId, long classPK, String keywords, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCount
public static int searchCount(long companyId, long[] groupIds, long classNameId, String keywords, int status) Returns the number of structures matching the groups and class name IDs, and matching the keywords in the structure names and descriptions.- Parameters:
companyId
- the primary key of the structure's companygroupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name of the model the structure is related tokeywords
- the keywords (space separated), which may occur in the structure's name or description (optionallynull
)status
- the workflow's status.- Returns:
- the number of matching structures
-
searchCount
public static int searchCount(long companyId, long[] groupIds, long classNameId, String keywords, int type, int status) Returns the number of structures matching the groups and class name IDs, and matching the keywords in the structure names and descriptions.- Parameters:
companyId
- the primary key of the structure's companygroupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name of the model the structure is related tokeywords
- the keywords (space separated), which may occur in the structure's name or description (optionallynull
)type
- the structure's type. For more information, seeDDMStructureConstants
.status
- the workflow's status.- Returns:
- the number of matching structures
-
searchCount
public static int searchCount(long companyId, long[] groupIds, long classNameId, String name, String description, String storageType, int type, int status, boolean andOperator) Returns the number of structures matching the groups, class name IDs, name keyword, description keyword, storage type, and type- Parameters:
companyId
- the primary key of the structure's companygroupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name of the model the structure is related toname
- the name keywordsdescription
- the description keywordsstorageType
- the structure's storage type. It can be "xml" or "expando". For more information, seeStorageType
.type
- the structure's type. For more information, seeDDMStructureConstants
.andOperator
- whether every field must match its keywords, or just one field- Returns:
- the number of matching structures
-
updateStructure
public static DDMStructure updateStructure(long groupId, long parentStructureId, long classNameId, String structureKey, Map<Locale, String> nameMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateStructure
public static DDMStructure updateStructure(long structureId, long parentStructureId, Map<Locale, String> nameMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getService
-