|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil
@ProviderType public class DDMStructureLocalServiceUtil
Provides the local service utility for DDMStructure. This utility wraps
com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl
and is the
primary access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.
DDMStructureLocalService
,
com.liferay.portlet.dynamicdatamapping.service.base.DDMStructureLocalServiceBaseImpl
,
com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl
Constructor Summary | |
---|---|
DDMStructureLocalServiceUtil()
|
Method Summary | |
---|---|
static DDMStructure |
addDDMStructure(DDMStructure ddmStructure)
Adds the d d m structure to the database. |
static void |
addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
DDMStructure ddmStructure)
|
static void |
addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
long structureId)
|
static void |
addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
List<DDMStructure> DDMStructures)
|
static void |
addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
long[] structureIds)
|
static DDMStructure |
addStructure(long userId,
long groupId,
long parentStructureId,
long classNameId,
String structureKey,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String xsd,
String storageType,
int type,
ServiceContext serviceContext)
Adds a structure referencing its parent structure. |
static DDMStructure |
addStructure(long userId,
long groupId,
long classNameId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
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 userId,
long groupId,
String parentStructureKey,
long classNameId,
String structureKey,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String xsd,
String storageType,
int type,
ServiceContext serviceContext)
Adds a structure referencing a default parent structure if the parent structure is not found. |
static void |
addStructureResources(DDMStructure structure,
boolean addGroupPermissions,
boolean addGuestPermissions)
Adds the resources to the structure. |
static void |
addStructureResources(DDMStructure structure,
String[] groupPermissions,
String[] guestPermissions)
Adds the model resources with the permissions to the structure. |
static void |
clearDLFileEntryTypeDDMStructures(long fileEntryTypeId)
|
static DDMStructure |
copyStructure(long userId,
long structureId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
ServiceContext serviceContext)
Copies a structure, creating a new structure with all the values extracted from the original one. |
static DDMStructure |
copyStructure(long userId,
long structureId,
ServiceContext serviceContext)
|
static DDMStructure |
createDDMStructure(long structureId)
Creates a new d d m structure with the primary key. |
static DDMStructure |
deleteDDMStructure(DDMStructure ddmStructure)
Deletes the d d m structure from the database. |
static DDMStructure |
deleteDDMStructure(long structureId)
Deletes the d d m structure with the primary key from the database. |
static void |
deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
DDMStructure ddmStructure)
|
static void |
deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
long structureId)
|
static void |
deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
List<DDMStructure> DDMStructures)
|
static void |
deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
long[] structureIds)
|
static void |
deleteStructure(DDMStructure structure)
Deletes the structure and its resources. |
static void |
deleteStructure(long structureId)
Deletes the structure and its resources. |
static void |
deleteStructure(long groupId,
long classNameId,
String structureKey)
Deletes the matching structure and its resources. |
static void |
deleteStructures(long groupId)
Deletes all the structures of the group. |
static void |
deleteStructures(long groupId,
long classNameId)
|
static DynamicQuery |
dynamicQuery()
|
static List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows. |
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows. |
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows. |
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows that match the dynamic query. |
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows that match the dynamic query. |
static DDMStructure |
fetchDDMStructure(long structureId)
|
static DDMStructure |
fetchDDMStructureByUuidAndCompanyId(String uuid,
long companyId)
Returns the d d m structure with the matching UUID and company. |
static DDMStructure |
fetchDDMStructureByUuidAndGroupId(String uuid,
long groupId)
Returns the d d m structure matching the UUID and group. |
static DDMStructure |
fetchStructure(long structureId)
Returns the structure with the ID. |
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 includeGlobalStructures)
Returns the structure matching the class name ID, structure key, and group, optionally in the global scope. |
static String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
static List<DDMStructure> |
getClassStructures(long classNameId)
Deprecated. As of 6.2.0, replaced by getClassStructures(long,
long) |
static List<DDMStructure> |
getClassStructures(long classNameId,
int start,
int end)
Deprecated. As of 6.2.0, replaced by getClassStructures(long,
long, int, int) |
static List<DDMStructure> |
getClassStructures(long companyId,
long classNameId)
Returns all the structures matching the class name ID. |
static List<DDMStructure> |
getClassStructures(long companyId,
long classNameId,
int start,
int end)
Returns a range of all the structures matching the class name ID. |
static List<DDMStructure> |
getClassStructures(long companyId,
long classNameId,
OrderByComparator orderByComparator)
Returns all the structures matching the class name ID ordered by the comparator. |
static List<DDMStructure> |
getClassStructures(long classNameId,
OrderByComparator orderByComparator)
Deprecated. As of 6.2.0, replaced by getClassStructures(long,
long, OrderByComparator) |
static DDMStructure |
getDDMStructure(long structureId)
Returns the d d m structure with the primary key. |
static DDMStructure |
getDDMStructureByUuidAndCompanyId(String uuid,
long companyId)
Returns the d d m structure with the matching UUID and company. |
static DDMStructure |
getDDMStructureByUuidAndGroupId(String uuid,
long groupId)
Returns the d d m structure matching the UUID and group. |
static List<DDMStructure> |
getDDMStructures(int start,
int end)
Returns a range of all the d d m structures. |
static int |
getDDMStructuresCount()
Returns the number of d d m structures. |
static List<DDMStructure> |
getDLFileEntryTypeDDMStructures(long fileEntryTypeId)
|
static List<DDMStructure> |
getDLFileEntryTypeDDMStructures(long fileEntryTypeId,
int start,
int end)
|
static List<DDMStructure> |
getDLFileEntryTypeDDMStructures(long fileEntryTypeId,
int start,
int end,
OrderByComparator orderByComparator)
|
static int |
getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId)
|
static List<DDMStructure> |
getDLFileEntryTypeStructures(long dlFileEntryTypeId)
Returns all the structures for the document library file entry type. |
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj)
|
static DDMStructureLocalService |
getService()
|
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 includeGlobalStructures)
Returns the structure matching the class name ID, structure key, and group, optionally in the global scope. |
static List<DDMStructure> |
getStructure(long groupId,
String name,
String description)
Returns all the structures matching the group, name, and description. |
static List<DDMStructure> |
getStructureEntries()
Deprecated. As of 6.2.0, replaced by getStructures() |
static List<DDMStructure> |
getStructureEntries(long groupId)
Deprecated. As of 6.2.0, replaced by getStructures(long) |
static List<DDMStructure> |
getStructureEntries(long groupId,
int start,
int end)
Deprecated. As of 6.2.0, replaced by getStructures(long, int,
int) |
static List<DDMStructure> |
getStructures()
Returns all the structures present in the system. |
static List<DDMStructure> |
getStructures(long groupId)
Returns all the structures present in the group. |
static List<DDMStructure> |
getStructures(long[] groupIds)
Returns all the structures belonging to the groups. |
static List<DDMStructure> |
getStructures(long[] groupIds,
long classNameId)
Returns all the structures matching the class name ID and belonging to the groups. |
static List<DDMStructure> |
getStructures(long[] groupIds,
long classNameId,
int start,
int end)
Returns a range of all the structures matching the class name ID and belonging to the groups. |
static List<DDMStructure> |
getStructures(long groupId,
int start,
int end)
Returns a range of all the structures belonging to the group. |
static List<DDMStructure> |
getStructures(long groupId,
long classNameId)
Returns all the structures matching class name ID and group. |
static List<DDMStructure> |
getStructures(long groupId,
long classNameId,
int start,
int end)
Returns a range of all the structures that match the class name ID and group. |
static List<DDMStructure> |
getStructures(long groupId,
long classNameId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the structures matching the class name ID and group. |
static List<DDMStructure> |
getStructures(long groupId,
String name,
String description)
|
static int |
getStructuresCount(long groupId)
Returns the number of structures belonging to the group. |
static int |
getStructuresCount(long[] groupIds,
long classNameId)
Returns the number of structures matching the class name ID and belonging to the groups. |
static int |
getStructuresCount(long groupId,
long classNameId)
Returns the number of structures matching the class name ID and group. |
static boolean |
hasDLFileEntryTypeDDMStructure(long fileEntryTypeId,
long structureId)
|
static boolean |
hasDLFileEntryTypeDDMStructures(long fileEntryTypeId)
|
static List<DDMStructure> |
search(long companyId,
long[] groupIds,
long[] classNameIds,
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 List<DDMStructure> |
search(long companyId,
long[] groupIds,
long[] classNameIds,
String name,
String description,
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,
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,
String name,
String description,
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(String beanIdentifier)
Sets the Spring bean ID for this bean. |
static void |
setDLFileEntryTypeDDMStructures(long fileEntryTypeId,
long[] structureIds)
|
void |
setService(DDMStructureLocalService service)
Deprecated. As of 6.2.0 |
static DDMStructure |
updateDDMStructure(DDMStructure ddmStructure)
Updates the d d m structure in the database or adds it if it does not yet exist. |
static DDMStructure |
updateStructure(long groupId,
long parentStructureId,
long classNameId,
String structureKey,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
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,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String xsd,
ServiceContext serviceContext)
Updates the structure matching the structure ID, replacing its old parent structure, name map, description map, and XSD with new ones. |
static DDMStructure |
updateXSD(long structureId,
String xsd,
ServiceContext serviceContext)
Updates the structure matching the structure ID, replacing its XSD with a new one. |
static void |
updateXSDFieldMetadata(long structureId,
String fieldName,
String metadataEntryName,
String metadataEntryValue,
ServiceContext serviceContext)
Deprecated. As of 6.2.0, with no direct replacement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DDMStructureLocalServiceUtil()
Method Detail |
---|
public static DDMStructure addDDMStructure(DDMStructure ddmStructure) throws SystemException
ddmStructure
- the d d m structure
SystemException
- if a system exception occurredpublic static DDMStructure createDDMStructure(long structureId)
structureId
- the primary key for the new d d m structure
public static DDMStructure deleteDDMStructure(long structureId) throws PortalException, SystemException
structureId
- the primary key of the d d m structure
PortalException
- if a d d m structure with the primary key could not be found
SystemException
- if a system exception occurredpublic static DDMStructure deleteDDMStructure(DDMStructure ddmStructure) throws SystemException
ddmStructure
- the d d m structure
SystemException
- if a system exception occurredpublic static DynamicQuery dynamicQuery()
public static List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) 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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from DDMStructureModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)
SystemException
- if a system exception occurredpublic static List dynamicQuery(DynamicQuery dynamicQuery, 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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from DDMStructureModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) throws SystemException
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query
SystemException
- if a system exception occurredpublic static DDMStructure fetchDDMStructure(long structureId) throws SystemException
SystemException
public static DDMStructure fetchDDMStructureByUuidAndCompanyId(String uuid, long companyId) throws SystemException
uuid
- the d d m structure's UUIDcompanyId
- the primary key of the company
null
if a matching d d m structure could not be found
SystemException
- if a system exception occurredpublic static DDMStructure fetchDDMStructureByUuidAndGroupId(String uuid, long groupId) throws SystemException
uuid
- the d d m structure's UUIDgroupId
- the primary key of the group
null
if a matching d d m structure could not be found
SystemException
- if a system exception occurredpublic static DDMStructure getDDMStructure(long structureId) throws PortalException, SystemException
structureId
- the primary key of the d d m structure
PortalException
- if a d d m structure with the primary key could not be found
SystemException
- if a system exception occurredpublic static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException, SystemException
PortalException
SystemException
public static DDMStructure getDDMStructureByUuidAndCompanyId(String uuid, long companyId) throws PortalException, SystemException
uuid
- the d d m structure's UUIDcompanyId
- the primary key of the company
PortalException
- if a matching d d m structure could not be found
SystemException
- if a system exception occurredpublic static DDMStructure getDDMStructureByUuidAndGroupId(String uuid, long groupId) throws PortalException, SystemException
uuid
- the d d m structure's UUIDgroupId
- the primary key of the group
PortalException
- if a matching d d m structure could not be found
SystemException
- if a system exception occurredpublic static List<DDMStructure> getDDMStructures(int start, int end) 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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from DDMStructureModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of d d m structuresend
- the upper bound of the range of d d m structures (not inclusive)
SystemException
- if a system exception occurredpublic static int getDDMStructuresCount() throws SystemException
SystemException
- if a system exception occurredpublic static DDMStructure updateDDMStructure(DDMStructure ddmStructure) throws SystemException
ddmStructure
- the d d m structure
SystemException
- if a system exception occurredpublic static void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, long structureId) throws SystemException
SystemException
- if a system exception occurredpublic static void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, DDMStructure ddmStructure) throws SystemException
SystemException
- if a system exception occurredpublic static void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, long[] structureIds) throws SystemException
SystemException
- if a system exception occurredpublic static void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, List<DDMStructure> DDMStructures) throws SystemException
SystemException
- if a system exception occurredpublic static void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, long structureId) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, DDMStructure ddmStructure) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, long[] structureIds) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, List<DDMStructure> DDMStructures) throws SystemException
SystemException
- if a system exception occurredpublic static List<DDMStructure> getDLFileEntryTypeDDMStructures(long fileEntryTypeId) throws SystemException
SystemException
- if a system exception occurredpublic static List<DDMStructure> getDLFileEntryTypeDDMStructures(long fileEntryTypeId, int start, int end) throws SystemException
SystemException
- if a system exception occurredpublic static List<DDMStructure> getDLFileEntryTypeDDMStructures(long fileEntryTypeId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
- if a system exception occurredpublic static int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId) throws SystemException
SystemException
- if a system exception occurredpublic static boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId, long structureId) throws SystemException
SystemException
- if a system exception occurredpublic static boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId) throws SystemException
SystemException
- if a system exception occurredpublic static void setDLFileEntryTypeDDMStructures(long fileEntryTypeId, long[] structureIds) throws SystemException
SystemException
- if a system exception occurredpublic static String getBeanIdentifier()
public static void setBeanIdentifier(String beanIdentifier)
beanIdentifier
- the Spring bean ID for this beanpublic static DDMStructure addStructure(long userId, long groupId, long parentStructureId, long classNameId, String structureKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String xsd, String storageType, int type, ServiceContext serviceContext) throws PortalException, SystemException
userId
- the primary key of the structure's creator/ownergroupId
- 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 a user with the primary key could not be
found, if the XSD was not well-formed, or if a portal exception
occurred
SystemException
- if a system exception occurredpublic static DDMStructure addStructure(long userId, long groupId, long classNameId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, 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 XSD was not well-formed, or if a portal exception
occurred
SystemException
- if a system exception occurredpublic static DDMStructure addStructure(long userId, long groupId, String parentStructureKey, long classNameId, String structureKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String xsd, 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 parent
structure (optionally null
)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 a user with the primary key could not be
found, if the XSD was not well-formed, or if a portal exception
occurred
SystemException
- if a system exception occurredpublic static void addStructureResources(DDMStructure structure, boolean addGroupPermissions, boolean addGuestPermissions) throws PortalException, SystemException
structure
- the structure to add resources toaddGroupPermissions
- whether to add group permissionsaddGuestPermissions
- whether to add guest permissions
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static void addStructureResources(DDMStructure structure, String[] groupPermissions, String[] guestPermissions) throws PortalException, SystemException
structure
- the structure to add resources togroupPermissions
- the group permissions to be addedguestPermissions
- the guest permissions to be added
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static DDMStructure copyStructure(long userId, long structureId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, ServiceContext serviceContext) throws PortalException, SystemException
userId
- the primary key of the structure's creator/ownerstructureId
- 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 a portal exception occurred
SystemException
- if a system exception occurredpublic static DDMStructure copyStructure(long userId, long structureId, ServiceContext serviceContext) throws PortalException, SystemException
PortalException
SystemException
public static void deleteStructure(DDMStructure structure) throws PortalException, SystemException
Before deleting the structure, this method verifies whether the structure is required by another entity. If it is needed, an exception is thrown.
structure
- the structure to be deleted
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic 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 deleted
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static void deleteStructure(long groupId, long classNameId, String structureKey) 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.
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
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static void deleteStructures(long groupId) throws PortalException, SystemException
Before deleting the structures, the system verifies whether each structure is required by another entity. If any of the structures are needed, an exception is thrown.
groupId
- the primary key of the group
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static void deleteStructures(long groupId, long classNameId) throws PortalException, SystemException
PortalException
SystemException
public static DDMStructure fetchStructure(long structureId) throws SystemException
structureId
- the primary key of the structure
null
if a
matching structure could not be found
SystemException
- if a system exception occurredpublic static DDMStructure fetchStructure(long groupId, long classNameId, String structureKey) throws 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 structure
null
if a matching
structure could not be found
SystemException
- if a system exception occurredpublic static DDMStructure fetchStructure(long groupId, long classNameId, 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 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 search
null
if a matching
structure could not be found
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static List<DDMStructure> getClassStructures(long classNameId) throws SystemException
getClassStructures(long,
long)
SystemException
public static List<DDMStructure> getClassStructures(long classNameId, int start, int end) throws SystemException
getClassStructures(long,
long, int, int)
SystemException
public static List<DDMStructure> getClassStructures(long companyId, long classNameId) throws SystemException
companyId
- the primary key of the structure's companyclassNameId
- the primary key of the class name for the structure's
related model
SystemException
- if a system exception occurredpublic static List<DDMStructure> getClassStructures(long companyId, long classNameId, int start, int end) 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 companyclassNameId
- the primary key of the class name for the structure's
related modelstart
- the lower bound of the range of structures to returnend
- the upper bound of the range of structures to return (not
inclusive)
SystemException
- if a system exception occurredpublic static List<DDMStructure> getClassStructures(long companyId, long classNameId, OrderByComparator orderByComparator) throws SystemException
companyId
- the primary key of the structure's companyclassNameId
- the primary key of the class name for the structure's
related modelorderByComparator
- the comparator to order the structures
(optionally null
)
SystemException
- if a system exception occurredpublic static List<DDMStructure> getClassStructures(long classNameId, OrderByComparator orderByComparator) throws SystemException
getClassStructures(long,
long, OrderByComparator)
SystemException
public static List<DDMStructure> getDLFileEntryTypeStructures(long dlFileEntryTypeId) throws SystemException
dlFileEntryTypeId
- the primary key of the document library file
entry type
SystemException
- if a system exception occurredpublic static DDMStructure getStructure(long structureId) throws PortalException, SystemException
structureId
- the primary key of the structure
PortalException
- if a structure with the ID could not be found
SystemException
- if a system exception occurredpublic static DDMStructure getStructure(long groupId, long classNameId, 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 structure
PortalException
- if a matching structure could not be found
SystemException
- if a system exception occurredpublic static DDMStructure getStructure(long groupId, long classNameId, 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 search
PortalException
- if a matching structure could not be found
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructure(long groupId, String name, String description) throws SystemException
groupId
- the primary key of the structure's groupname
- the structure's namedescription
- the structure's description
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructureEntries() throws SystemException
getStructures()
SystemException
public static List<DDMStructure> getStructureEntries(long groupId) throws SystemException
getStructures(long)
SystemException
public static List<DDMStructure> getStructureEntries(long groupId, int start, int end) throws SystemException
getStructures(long, int,
int)
SystemException
public static List<DDMStructure> getStructures() throws SystemException
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructures(long groupId) throws SystemException
groupId
- the primary key of the group
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructures(long groupId, int start, int end) 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.
groupId
- the primary key of the groupstart
- the lower bound of the range of structures to returnend
- the upper bound of the range of structures to return (not
inclusive)
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructures(long groupId, long classNameId) throws SystemException
groupId
- the primary key of the groupclassNameId
- the primary key of the class name for the structure's
related model
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructures(long groupId, long classNameId, int start, int end) 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.
groupId
- the primary key of the groupclassNameId
- the primary key of the class name for the structure's
related modelstart
- the lower bound of the range of structures to returnend
- the upper bound of the range of structures to return (not
inclusive)
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructures(long groupId, long classNameId, 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.
groupId
- the primary key of the groupclassNameId
- the primary key of the class name for the structure's
related modelstart
- 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 List<DDMStructure> getStructures(long groupId, String name, String description) throws SystemException
SystemException
public static List<DDMStructure> getStructures(long[] groupIds) throws SystemException
groupIds
- the primary keys of the groups
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructures(long[] groupIds, long classNameId) throws SystemException
groupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name for the structure's
related model
SystemException
- if a system exception occurredpublic static List<DDMStructure> getStructures(long[] groupIds, long classNameId, int start, int end) 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.
groupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name for the structure's
related modelstart
- the lower bound of the range of structures to returnend
- the upper bound of the range of structures to return (not
inclusive)
SystemException
- if a system exception occurredpublic static int getStructuresCount(long groupId) throws SystemException
groupId
- the primary key of the group
SystemException
- if a system exception occurredpublic static int getStructuresCount(long groupId, long classNameId) throws SystemException
groupId
- the primary key of the groupclassNameId
- the primary key of the class name for the structure's
related model
SystemException
- if a system exception occurredpublic static int getStructuresCount(long[] groupIds, long classNameId) throws SystemException
groupIds
- the primary keys of the groupsclassNameId
- the primary key of the class name for the structure's
related model
SystemException
- if a system exception occurredpublic static List<DDMStructure> search(long companyId, long[] groupIds, long[] classNameIds, 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 List<DDMStructure> search(long companyId, long[] groupIds, long[] classNameIds, String name, String description, 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, 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, String name, String description, 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 field
SystemException
- if a system exception occurredpublic static DDMStructure updateStructure(long groupId, long parentStructureId, long classNameId, String structureKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, 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
structure's modification date.
PortalException
- if a matching structure could not be found, if
the XSD was not well-formed, or if a portal exception occurred
SystemException
- if a system exception occurredpublic static DDMStructure updateStructure(long structureId, long parentStructureId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String xsd, ServiceContext serviceContext) throws PortalException, SystemException
structureId
- the primary key of the structureparentStructureId
- the primary key of the new parent structurenameMap
- the structure's new locales and localized namesdescriptionMap
- the structure's new locales and localized
descriptionsxsd
- the structure's new XML schema definitionserviceContext
- the service context to be applied. Can set the
structure's modification date.
PortalException
- if a matching structure could not be found, if
the XSD was not well-formed, or if a portal exception occurred
SystemException
- if a system exception occurredpublic static DDMStructure updateXSD(long structureId, String xsd, ServiceContext serviceContext) throws PortalException, SystemException
structureId
- the primary key of the structurexsd
- the structure's new XML schema definitionserviceContext
- the service context to be applied. Can set the
structure's modification date.
PortalException
- if a matching structure could not be found, if
the XSD was not well-formed, or if a portal exception occurred
SystemException
- if a system exception occurredpublic static void updateXSDFieldMetadata(long structureId, String fieldName, String metadataEntryName, String metadataEntryValue, ServiceContext serviceContext) throws PortalException, SystemException
structureId
- the primary key of the structurefieldName
- the name of the field whose metadata to updatemetadataEntryName
- the metadata entry's namemetadataEntryValue
- the metadata entry's valueserviceContext
- the service context to be applied. Can set the
structure's modification date.
PortalException
- if a matching structure could not be found,
if the XSD was not well-formed, or if a portal exception
occurred
SystemException
- if a system exception occurredpublic static DDMStructureLocalService getService()
public void setService(DDMStructureLocalService service)
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |