Class DLFileEntryTypeLocalServiceUtil

Object
com.liferay.document.library.kernel.service.DLFileEntryTypeLocalServiceUtil

public class DLFileEntryTypeLocalServiceUtil extends Object
Provides the local service utility for DLFileEntryType. This utility wraps 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 Details

    • DLFileEntryTypeLocalServiceUtil

      public DLFileEntryTypeLocalServiceUtil()
  • Method Details

    • addDDMStructureLinks

      public static void addDDMStructureLinks(long fileEntryTypeId, Set<Long> ddmStructureIds)
    • addDLFileEntryType

      public static DLFileEntryType addDLFileEntryType(DLFileEntryType dlFileEntryType)
      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

      public static boolean addDLFolderDLFileEntryType(long folderId, DLFileEntryType dlFileEntryType)
    • 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,String> descriptionMap, int scope, ServiceContext serviceContext) throws PortalException
      Throws:
      PortalException
    • addFileEntryType

      @Deprecated public static DLFileEntryType addFileEntryType(String externalReferenceCode, long userId, long groupId, long dataDefinitionId, String fileEntryTypeKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, ServiceContext serviceContext) throws PortalException
      Throws:
      PortalException
    • cascadeFileEntryTypes

      public static void cascadeFileEntryTypes(long userId, DLFolder dlFolder) throws PortalException
      Throws:
      PortalException
    • clearDLFolderDLFileEntryTypes

      public static void clearDLFolderDLFileEntryTypes(long folderId)
    • createBasicDocumentDLFileEntryType

      public static DLFileEntryType createBasicDocumentDLFileEntryType()
    • createDLFileEntryType

      public static DLFileEntryType createDLFileEntryType(long fileEntryTypeId)
      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

      public static DLFileEntryType deleteDLFileEntryType(DLFileEntryType dlFileEntryType)
      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

      public static DLFileEntryType deleteDLFileEntryType(long fileEntryTypeId) throws PortalException
      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

      public static void deleteDLFolderDLFileEntryType(long folderId, DLFileEntryType dlFileEntryType)
    • 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

      public static void deleteFileEntryType(long fileEntryTypeId) throws PortalException
      Throws:
      PortalException
    • deleteFileEntryTypeByExternalReferenceCode

      public static void deleteFileEntryTypeByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException
      Throws:
      PortalException
    • deleteFileEntryTypes

      public static void deleteFileEntryTypes(long groupId) throws PortalException
      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

      public static DynamicQuery dynamicQuery()
    • dynamicQuery

      public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      public 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.

      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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.portlet.documentlibrary.model.impl.DLFileEntryTypeModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - 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 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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.portlet.documentlibrary.model.impl.DLFileEntryTypeModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      public static long dynamicQueryCount(DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      public static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchDataDefinitionFileEntryType

      public static DLFileEntryType fetchDataDefinitionFileEntryType(long groupId, long dataDefinitionId)
    • fetchDLFileEntryType

      public static DLFileEntryType fetchDLFileEntryType(long fileEntryTypeId)
    • fetchDLFileEntryTypeByExternalReferenceCode

      public static DLFileEntryType fetchDLFileEntryTypeByExternalReferenceCode(String externalReferenceCode, long groupId)
    • fetchDLFileEntryTypeByUuidAndGroupId

      public static DLFileEntryType fetchDLFileEntryTypeByUuidAndGroupId(String uuid, long groupId)
      Returns the document library file entry type matching the UUID and group.
      Parameters:
      uuid - the document library file entry type's UUID
      groupId - 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

      public static DLFileEntryType fetchFileEntryType(long fileEntryTypeId)
    • fetchFileEntryType

      public static DLFileEntryType fetchFileEntryType(long groupId, String fileEntryTypeKey)
    • getActionableDynamicQuery

      public static ActionableDynamicQuery getActionableDynamicQuery()
    • getBasicDocumentDLFileEntryType

      public static DLFileEntryType getBasicDocumentDLFileEntryType() throws NoSuchFileEntryTypeException
      Throws:
      NoSuchFileEntryTypeException
    • getDefaultFileEntryTypeId

      public static long getDefaultFileEntryTypeId(long folderId) throws PortalException
      Throws:
      PortalException
    • getDLFileEntryType

      public static DLFileEntryType getDLFileEntryType(long fileEntryTypeId) throws PortalException
      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 UUID
      groupId - 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

      public static List<DLFileEntryType> getDLFileEntryTypes(int start, int end)
      Returns a range of all the document library file entry types.

      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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.portlet.documentlibrary.model.impl.DLFileEntryTypeModelImpl.

      Parameters:
      start - the lower bound of the range of document library file entry types
      end - 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 types
      companyId - 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 types
      companyId - the primary key of the company
      start - the lower bound of the range of document library file entry types
      end - the upper bound of the range of document library file entry types (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      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

      public static List<DLFileEntryType> getDLFolderDLFileEntryTypes(long folderId)
    • getDLFolderDLFileEntryTypes

      public static List<DLFileEntryType> getDLFolderDLFileEntryTypes(long folderId, int start, int end)
    • 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

      public static DLFileEntryType getFileEntryType(long fileEntryTypeId) throws PortalException
      Throws:
      PortalException
    • getFileEntryType

      public static DLFileEntryType getFileEntryType(long groupId, String fileEntryTypeKey) throws PortalException
      Throws:
      PortalException
    • getFileEntryTypes

      public static List<DLFileEntryType> getFileEntryTypes(long[] groupIds)
    • getFileEntryTypesByCompanyId

      public static List<DLFileEntryType> getFileEntryTypesByCompanyId(long companyId)
    • getFolderFileEntryTypes

      public static List<DLFileEntryType> getFolderFileEntryTypes(long[] groupIds, long folderId, boolean inherited) throws PortalException
      Throws:
      PortalException
    • getIndexableActionableDynamicQuery

      public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getOSGiServiceIdentifier

      public static String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      public static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
      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

      public static DLFileEntryType updateDLFileEntryType(DLFileEntryType dlFileEntryType)
      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,String> descriptionMap) throws PortalException
      Throws:
      PortalException
    • updateFolderFileEntryTypes

      public static void updateFolderFileEntryTypes(DLFolder dlFolder, List<Long> fileEntryTypeIds, long defaultFileEntryTypeId, ServiceContext serviceContext)
    • getService

      public static DLFileEntryTypeLocalService getService()
    • setService

      public static void setService(DLFileEntryTypeLocalService service)