Class DLFileEntryTypeLocalServiceUtil
com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl
and
is an 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.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addDDMStructureLinks
(long fileEntryTypeId, Set<Long> ddmStructureIds) static DLFileEntryType
addDLFileEntryType
(DLFileEntryType dlFileEntryType) Adds the document library file entry type to the database.static boolean
addDLFolderDLFileEntryType
(long folderId, long fileEntryTypeId) static boolean
addDLFolderDLFileEntryType
(long folderId, DLFileEntryType dlFileEntryType) static boolean
addDLFolderDLFileEntryTypes
(long folderId, long[] fileEntryTypeIds) static boolean
addDLFolderDLFileEntryTypes
(long folderId, List<DLFileEntryType> dlFileEntryTypes) static DLFileEntryType
addFileEntryType
(String externalReferenceCode, long userId, long groupId, long dataDefinitionId, String fileEntryTypeKey, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, int scope, ServiceContext serviceContext) static DLFileEntryType
addFileEntryType
(String externalReferenceCode, long userId, long groupId, long dataDefinitionId, String fileEntryTypeKey, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, ServiceContext serviceContext) Deprecated.static void
cascadeFileEntryTypes
(long userId, DLFolder dlFolder) static void
clearDLFolderDLFileEntryTypes
(long folderId) static DLFileEntryType
static DLFileEntryType
createDLFileEntryType
(long fileEntryTypeId) Creates a new document library file entry type with the primary key.static PersistedModel
createPersistedModel
(Serializable primaryKeyObj) static DLFileEntryType
deleteDLFileEntryType
(long fileEntryTypeId) Deletes the document library file entry type with the primary key from the database.static DLFileEntryType
deleteDLFileEntryType
(DLFileEntryType dlFileEntryType) Deletes the document library file entry type from the database.static void
deleteDLFolderDLFileEntryType
(long folderId, long fileEntryTypeId) static void
deleteDLFolderDLFileEntryType
(long folderId, DLFileEntryType dlFileEntryType) static void
deleteDLFolderDLFileEntryTypes
(long folderId, long[] fileEntryTypeIds) static void
deleteDLFolderDLFileEntryTypes
(long folderId, List<DLFileEntryType> dlFileEntryTypes) static void
deleteFileEntryType
(long fileEntryTypeId) static DLFileEntryType
deleteFileEntryType
(DLFileEntryType dlFileEntryType) static void
deleteFileEntryTypeByExternalReferenceCode
(String externalReferenceCode, long groupId) static void
deleteFileEntryTypes
(long groupId) static PersistedModel
deletePersistedModel
(PersistedModel persistedModel) static <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static DynamicQuery
static <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.static <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> 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 matching the dynamic query.static long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.static DLFileEntryType
fetchDataDefinitionFileEntryType
(long groupId, long dataDefinitionId) static DLFileEntryType
fetchDLFileEntryType
(long fileEntryTypeId) static DLFileEntryType
fetchDLFileEntryTypeByExternalReferenceCode
(String externalReferenceCode, long groupId) static DLFileEntryType
fetchDLFileEntryTypeByUuidAndGroupId
(String uuid, long groupId) Returns the document library file entry type matching the UUID and group.static DLFileEntryType
fetchFileEntryType
(long fileEntryTypeId) static DLFileEntryType
fetchFileEntryType
(long groupId, String fileEntryTypeKey) static ActionableDynamicQuery
static DLFileEntryType
static long
getDefaultFileEntryTypeId
(long folderId) static DLFileEntryType
getDLFileEntryType
(long fileEntryTypeId) Returns the document library file entry type with the primary key.static DLFileEntryType
getDLFileEntryTypeByExternalReferenceCode
(String externalReferenceCode, long groupId) static DLFileEntryType
getDLFileEntryTypeByUuidAndGroupId
(String uuid, long groupId) Returns the document library file entry type matching the UUID and group.static List<DLFileEntryType>
getDLFileEntryTypes
(int start, int end) Returns a range of all the document library file entry types.static List<DLFileEntryType>
getDLFileEntryTypesByUuidAndCompanyId
(String uuid, long companyId) Returns all the document library file entry types matching the UUID and company.static List<DLFileEntryType>
getDLFileEntryTypesByUuidAndCompanyId
(String uuid, long companyId, int start, int end, OrderByComparator<DLFileEntryType> orderByComparator) Returns a range of document library file entry types matching the UUID and company.static int
Returns the number of document library file entry types.static List<DLFileEntryType>
getDLFolderDLFileEntryTypes
(long folderId) static List<DLFileEntryType>
getDLFolderDLFileEntryTypes
(long folderId, int start, int end) static List<DLFileEntryType>
getDLFolderDLFileEntryTypes
(long folderId, int start, int end, OrderByComparator<DLFileEntryType> orderByComparator) static int
getDLFolderDLFileEntryTypesCount
(long folderId) static long[]
getDLFolderPrimaryKeys
(long fileEntryTypeId) Returns the folderIds of the document library folders associated with the document library file entry type.static ExportActionableDynamicQuery
getExportActionableDynamicQuery
(PortletDataContext portletDataContext) static DLFileEntryType
getFileEntryType
(long fileEntryTypeId) static DLFileEntryType
getFileEntryType
(long groupId, String fileEntryTypeKey) static List<DLFileEntryType>
getFileEntryTypes
(long[] groupIds) static List<DLFileEntryType>
getFileEntryTypesByCompanyId
(long companyId) static List<DLFileEntryType>
getFolderFileEntryTypes
(long[] groupIds, long folderId, boolean inherited) static String
Returns the OSGi service identifier.static PersistedModel
getPersistedModel
(Serializable primaryKeyObj) static DLFileEntryTypeLocalService
static boolean
hasDLFolderDLFileEntryType
(long folderId, long fileEntryTypeId) static boolean
hasDLFolderDLFileEntryTypes
(long folderId) static List<DLFileEntryType>
search
(long companyId, long[] groupIds, String keywords, boolean includeBasicFileEntryType, int start, int end, OrderByComparator<DLFileEntryType> orderByComparator) static int
searchCount
(long companyId, long[] groupIds, String keywords, boolean includeBasicFileEntryType) static void
setDLFolderDLFileEntryTypes
(long folderId, long[] fileEntryTypeIds) static void
setService
(DLFileEntryTypeLocalService service) static void
unsetFolderFileEntryTypes
(long folderId) static void
updateDDMStructureLinks
(long fileEntryTypeId, Set<Long> ddmStructureIds) static DLFileEntryType
updateDLFileEntryType
(DLFileEntryType dlFileEntryType) Updates the document library file entry type in the database or adds it if it does not yet exist.static DLFileEntry
updateFileEntryFileEntryType
(DLFileEntry dlFileEntry, ServiceContext serviceContext) static DLFileEntryType
updateFileEntryType
(long fileEntryTypeId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap) static void
updateFolderFileEntryTypes
(DLFolder dlFolder, List<Long> fileEntryTypeIds, long defaultFileEntryTypeId, ServiceContext serviceContext)
-
Constructor Details
-
DLFileEntryTypeLocalServiceUtil
public DLFileEntryTypeLocalServiceUtil()
-
-
Method Details
-
addDDMStructureLinks
-
addDLFileEntryType
Adds the document library file entry type to the database. Also notifies the appropriate model listeners.Important: Inspect DLFileEntryTypeLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
dlFileEntryType
- the document library file entry type- Returns:
- the document library file entry type that was added
-
addDLFolderDLFileEntryType
-
addDLFolderDLFileEntryType
public static boolean addDLFolderDLFileEntryType(long folderId, long fileEntryTypeId) -
addDLFolderDLFileEntryTypes
public static boolean addDLFolderDLFileEntryTypes(long folderId, List<DLFileEntryType> dlFileEntryTypes) -
addDLFolderDLFileEntryTypes
public static boolean addDLFolderDLFileEntryTypes(long folderId, long[] fileEntryTypeIds) -
addFileEntryType
public static DLFileEntryType addFileEntryType(String externalReferenceCode, long userId, long groupId, long dataDefinitionId, String fileEntryTypeKey, Map<Locale, String> nameMap, Map<Locale, throws PortalExceptionString> descriptionMap, int scope, ServiceContext serviceContext) - Throws:
PortalException
-
addFileEntryType
@Deprecated public static DLFileEntryType addFileEntryType(String externalReferenceCode, long userId, long groupId, long dataDefinitionId, String fileEntryTypeKey, Map<Locale, String> nameMap, Map<Locale, throws PortalExceptionString> descriptionMap, ServiceContext serviceContext) Deprecated.As of Cavanaugh (7.4.x), replaced byaddFileEntryType(String, long, long, long, String, Map, Map, int, ServiceContext)
- Throws:
PortalException
-
cascadeFileEntryTypes
- Throws:
PortalException
-
clearDLFolderDLFileEntryTypes
public static void clearDLFolderDLFileEntryTypes(long folderId) -
createBasicDocumentDLFileEntryType
-
createDLFileEntryType
Creates a new document library file entry type with the primary key. Does not add the document library file entry type to the database.- Parameters:
fileEntryTypeId
- the primary key for the new document library file entry type- Returns:
- the new document library file entry type
-
createPersistedModel
public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException - Throws:
PortalException
-
deleteDLFileEntryType
Deletes the document library file entry type from the database. Also notifies the appropriate model listeners.Important: Inspect DLFileEntryTypeLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
dlFileEntryType
- the document library file entry type- Returns:
- the document library file entry type that was removed
-
deleteDLFileEntryType
Deletes the document library file entry type with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect DLFileEntryTypeLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
fileEntryTypeId
- the primary key of the document library file entry type- Returns:
- the document library file entry type that was removed
- Throws:
PortalException
- if a document library file entry type with the primary key could not be found
-
deleteDLFolderDLFileEntryType
-
deleteDLFolderDLFileEntryType
public static void deleteDLFolderDLFileEntryType(long folderId, long fileEntryTypeId) -
deleteDLFolderDLFileEntryTypes
public static void deleteDLFolderDLFileEntryTypes(long folderId, List<DLFileEntryType> dlFileEntryTypes) -
deleteDLFolderDLFileEntryTypes
public static void deleteDLFolderDLFileEntryTypes(long folderId, long[] fileEntryTypeIds) -
deleteFileEntryType
public static DLFileEntryType deleteFileEntryType(DLFileEntryType dlFileEntryType) throws PortalException - Throws:
PortalException
-
deleteFileEntryType
- Throws:
PortalException
-
deleteFileEntryTypeByExternalReferenceCode
public static void deleteFileEntryTypeByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Throws:
PortalException
-
deleteFileEntryTypes
- Throws:
PortalException
-
deletePersistedModel
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException - Throws:
PortalException
-
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.documentlibrary.model.impl.DLFileEntryTypeModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.documentlibrary.model.impl.DLFileEntryTypeModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchDataDefinitionFileEntryType
-
fetchDLFileEntryType
-
fetchDLFileEntryTypeByExternalReferenceCode
public static DLFileEntryType fetchDLFileEntryTypeByExternalReferenceCode(String externalReferenceCode, long groupId) -
fetchDLFileEntryTypeByUuidAndGroupId
Returns the document library file entry type matching the UUID and group.- Parameters:
uuid
- the document library file entry type's UUIDgroupId
- the primary key of the group- Returns:
- the matching document library file entry type, or
null
if a matching document library file entry type could not be found
-
fetchFileEntryType
-
fetchFileEntryType
-
getActionableDynamicQuery
-
getBasicDocumentDLFileEntryType
- Throws:
NoSuchFileEntryTypeException
-
getDefaultFileEntryTypeId
- Throws:
PortalException
-
getDLFileEntryType
Returns the document library file entry type with the primary key.- Parameters:
fileEntryTypeId
- the primary key of the document library file entry type- Returns:
- the document library file entry type
- Throws:
PortalException
- if a document library file entry type with the primary key could not be found
-
getDLFileEntryTypeByExternalReferenceCode
public static DLFileEntryType getDLFileEntryTypeByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Throws:
PortalException
-
getDLFileEntryTypeByUuidAndGroupId
public static DLFileEntryType getDLFileEntryTypeByUuidAndGroupId(String uuid, long groupId) throws PortalException Returns the document library file entry type matching the UUID and group.- Parameters:
uuid
- the document library file entry type's UUIDgroupId
- the primary key of the group- Returns:
- the matching document library file entry type
- Throws:
PortalException
- if a matching document library file entry type could not be found
-
getDLFileEntryTypes
Returns a range of all the document library file entry types.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.documentlibrary.model.impl.DLFileEntryTypeModelImpl
.- Parameters:
start
- the lower bound of the range of document library file entry typesend
- the upper bound of the range of document library file entry types (not inclusive)- Returns:
- the range of document library file entry types
-
getDLFileEntryTypesByUuidAndCompanyId
public static List<DLFileEntryType> getDLFileEntryTypesByUuidAndCompanyId(String uuid, long companyId) Returns all the document library file entry types matching the UUID and company.- Parameters:
uuid
- the UUID of the document library file entry typescompanyId
- the primary key of the company- Returns:
- the matching document library file entry types, or an empty list if no matches were found
-
getDLFileEntryTypesByUuidAndCompanyId
public static List<DLFileEntryType> getDLFileEntryTypesByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<DLFileEntryType> orderByComparator) Returns a range of document library file entry types matching the UUID and company.- Parameters:
uuid
- the UUID of the document library file entry typescompanyId
- the primary key of the companystart
- the lower bound of the range of document library file entry typesend
- the upper bound of the range of document library file entry types (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the range of matching document library file entry types, or an empty list if no matches were found
-
getDLFileEntryTypesCount
public static int getDLFileEntryTypesCount()Returns the number of document library file entry types.- Returns:
- the number of document library file entry types
-
getDLFolderDLFileEntryTypes
-
getDLFolderDLFileEntryTypes
-
getDLFolderDLFileEntryTypes
public static List<DLFileEntryType> getDLFolderDLFileEntryTypes(long folderId, int start, int end, OrderByComparator<DLFileEntryType> orderByComparator) -
getDLFolderDLFileEntryTypesCount
public static int getDLFolderDLFileEntryTypesCount(long folderId) -
getDLFolderPrimaryKeys
public static long[] getDLFolderPrimaryKeys(long fileEntryTypeId) Returns the folderIds of the document library folders associated with the document library file entry type.- Parameters:
fileEntryTypeId
- the fileEntryTypeId of the document library file entry type- Returns:
- long[] the folderIds of document library folders associated with the document library file entry type
-
getExportActionableDynamicQuery
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getFileEntryType
- Throws:
PortalException
-
getFileEntryType
public static DLFileEntryType getFileEntryType(long groupId, String fileEntryTypeKey) throws PortalException - Throws:
PortalException
-
getFileEntryTypes
-
getFileEntryTypesByCompanyId
-
getFolderFileEntryTypes
public static List<DLFileEntryType> getFolderFileEntryTypes(long[] groupIds, long folderId, boolean inherited) throws PortalException - Throws:
PortalException
-
getIndexableActionableDynamicQuery
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
- Throws:
PortalException
-
hasDLFolderDLFileEntryType
public static boolean hasDLFolderDLFileEntryType(long folderId, long fileEntryTypeId) -
hasDLFolderDLFileEntryTypes
public static boolean hasDLFolderDLFileEntryTypes(long folderId) -
search
public static List<DLFileEntryType> search(long companyId, long[] groupIds, String keywords, boolean includeBasicFileEntryType, int start, int end, OrderByComparator<DLFileEntryType> orderByComparator) -
searchCount
public static int searchCount(long companyId, long[] groupIds, String keywords, boolean includeBasicFileEntryType) -
setDLFolderDLFileEntryTypes
public static void setDLFolderDLFileEntryTypes(long folderId, long[] fileEntryTypeIds) -
unsetFolderFileEntryTypes
public static void unsetFolderFileEntryTypes(long folderId) -
updateDDMStructureLinks
public static void updateDDMStructureLinks(long fileEntryTypeId, Set<Long> ddmStructureIds) throws PortalException - Throws:
PortalException
-
updateDLFileEntryType
Updates the document library file entry type in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect DLFileEntryTypeLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
dlFileEntryType
- the document library file entry type- Returns:
- the document library file entry type that was updated
-
updateFileEntryFileEntryType
public static DLFileEntry updateFileEntryFileEntryType(DLFileEntry dlFileEntry, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
updateFileEntryType
public static DLFileEntryType updateFileEntryType(long fileEntryTypeId, Map<Locale, String> nameMap, Map<Locale, throws PortalExceptionString> descriptionMap) - Throws:
PortalException
-
updateFolderFileEntryTypes
public static void updateFolderFileEntryTypes(DLFolder dlFolder, List<Long> fileEntryTypeIds, long defaultFileEntryTypeId, ServiceContext serviceContext) -
getService
-
setService
-
addFileEntryType(String, long, long, long, String, Map, Map, int, ServiceContext)