Class KBFolderLocalServiceUtil
com.liferay.knowledge.base.service.impl.KBFolderLocalServiceImpl
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.- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KBFolder
addKBFolder
(KBFolder kbFolder) Adds the kb folder to the database.static KBFolder
addKBFolder
(String externalReferenceCode, long userId, long groupId, long parentResourceClassNameId, long parentResourcePrimKey, String name, String description, com.liferay.portal.kernel.service.ServiceContext serviceContext) static KBFolder
createKBFolder
(long kbFolderId) Creates a new kb folder with the primary key.static com.liferay.portal.kernel.model.PersistedModel
createPersistedModel
(Serializable primaryKeyObj) static KBFolder
deleteKBFolder
(long kbFolderId) Deletes the kb folder with the primary key from the database.static KBFolder
deleteKBFolder
(long kbFolderId, boolean includeTrashedEntries) static KBFolder
deleteKBFolder
(KBFolder kbFolder) Deletes the kb folder from the database.static KBFolder
deleteKBFolder
(KBFolder kbFolder, boolean includeTrashedEntries) static void
deleteKBFolders
(long groupId) static com.liferay.portal.kernel.model.PersistedModel
deletePersistedModel
(com.liferay.portal.kernel.model.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 com.liferay.portal.kernel.dao.orm.DynamicQuery
static <T> List<T>
dynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <T> List<T>
dynamicQuery
(com.liferay.portal.kernel.dao.orm.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
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.static long
dynamicQueryCount
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static long
dynamicQueryCount
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection) Returns the number of rows matching the dynamic query.static KBFolder
fetchFirstChildKBFolder
(long groupId, long kbFolderId) static KBFolder
fetchFirstChildKBFolder
(long groupId, long kbFolderId, com.liferay.portal.kernel.util.OrderByComparator<KBFolder> orderByComparator) static KBFolder
fetchKBFolder
(long kbFolderId) static KBFolder
fetchKBFolder
(String uuid, long groupId) static KBFolder
fetchKBFolderByExternalReferenceCode
(String externalReferenceCode, long groupId) static KBFolder
fetchKBFolderByUrlTitle
(long groupId, long parentKbFolderId, String urlTitle) static KBFolder
fetchKBFolderByUuidAndGroupId
(String uuid, long groupId) Returns the kb folder matching the UUID and group.static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
getExportActionableDynamicQuery
(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
static KBFolder
getKBFolder
(long kbFolderId) Returns the kb folder with the primary key.static KBFolder
getKBFolderByExternalReferenceCode
(String externalReferenceCode, long groupId) static KBFolder
getKBFolderByUrlTitle
(long groupId, long parentKbFolderId, String urlTitle) static KBFolder
getKBFolderByUuidAndGroupId
(String uuid, long groupId) Returns the kb folder matching the UUID and group.getKBFolders
(int start, int end) Returns a range of all the kb folders.getKBFolders
(long groupId, long parentKBFolderId, int start, int end) getKBFoldersAndKBArticles
(long groupId, long parentResourcePrimKey) getKBFoldersAndKBArticles
(long groupId, long parentResourcePrimKey, int status) getKBFoldersAndKBArticles
(long groupId, long parentResourcePrimKey, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<?> orderByComparator) static int
getKBFoldersAndKBArticlesCount
(long groupId, long parentResourcePrimKey, int status) getKBFoldersByUuidAndCompanyId
(String uuid, long companyId) Returns all the kb folders matching the UUID and company.getKBFoldersByUuidAndCompanyId
(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBFolder> orderByComparator) Returns a range of kb folders matching the UUID and company.static int
Returns the number of kb folders.static int
getKBFoldersCount
(long groupId, long parentKBFolderId) static int
getKBFoldersCount
(long groupId, long parentKBFolderId, int status) static String
Returns the OSGi service identifier.static com.liferay.portal.kernel.model.PersistedModel
getPersistedModel
(Serializable primaryKeyObj) static KBFolderLocalService
static KBFolder
moveKBFolder
(long kbFolderId, long parentKBFolderId) static KBFolder
moveKBFolderFromTrash
(long userId, long kbFolderId, long parentKBFolderId) static KBFolder
moveKBFolderToTrash
(long userId, long kbFolderId) static KBFolder
restoreKBFolderFromTrash
(long userId, long kbFolderId) static KBFolder
updateKBFolder
(long parentResourceClassNameId, long parentResourcePrimKey, long kbFolderId, String name, String description, com.liferay.portal.kernel.service.ServiceContext serviceContext) static KBFolder
updateKBFolder
(KBFolder kbFolder) Updates the kb folder in the database or adds it if it does not yet exist.static KBFolder
updateStatus
(long userId, KBFolder kbFolder, int status)
-
Constructor Details
-
KBFolderLocalServiceUtil
public KBFolderLocalServiceUtil()
-
-
Method Details
-
addKBFolder
Adds the kb folder to the database. Also notifies the appropriate model listeners.Important: Inspect KBFolderLocalServiceImpl 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:
kbFolder
- the kb folder- Returns:
- the kb folder that was added
-
addKBFolder
public static KBFolder addKBFolder(String externalReferenceCode, long userId, long groupId, long parentResourceClassNameId, long parentResourcePrimKey, String name, String description, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
createKBFolder
Creates a new kb folder with the primary key. Does not add the kb folder to the database.- Parameters:
kbFolderId
- the primary key for the new kb folder- Returns:
- the new kb folder
-
createPersistedModel
public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBFolder
public static KBFolder deleteKBFolder(KBFolder kbFolder) throws com.liferay.portal.kernel.exception.PortalException Deletes the kb folder from the database. Also notifies the appropriate model listeners.Important: Inspect KBFolderLocalServiceImpl 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:
kbFolder
- the kb folder- Returns:
- the kb folder that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBFolder
public static KBFolder deleteKBFolder(KBFolder kbFolder, boolean includeTrashedEntries) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBFolder
public static KBFolder deleteKBFolder(long kbFolderId) throws com.liferay.portal.kernel.exception.PortalException Deletes the kb folder with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect KBFolderLocalServiceImpl 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:
kbFolderId
- the primary key of the kb folder- Returns:
- the kb folder that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a kb folder with the primary key could not be found
-
deleteKBFolder
public static KBFolder deleteKBFolder(long kbFolderId, boolean includeTrashedEntries) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBFolders
public static void deleteKBFolders(long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deletePersistedModel
public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.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
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.knowledge.base.model.impl.KBFolderModelImpl
.- 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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.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.knowledge.base.model.impl.KBFolderModelImpl
.- 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
public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection) 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
-
fetchFirstChildKBFolder
public static KBFolder fetchFirstChildKBFolder(long groupId, long kbFolderId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchFirstChildKBFolder
public static KBFolder fetchFirstChildKBFolder(long groupId, long kbFolderId, com.liferay.portal.kernel.util.OrderByComparator<KBFolder> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchKBFolder
-
fetchKBFolder
-
fetchKBFolderByExternalReferenceCode
-
fetchKBFolderByUrlTitle
public static KBFolder fetchKBFolderByUrlTitle(long groupId, long parentKbFolderId, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchKBFolderByUuidAndGroupId
Returns the kb folder matching the UUID and group.- Parameters:
uuid
- the kb folder's UUIDgroupId
- the primary key of the group- Returns:
- the matching kb folder, or
null
if a matching kb folder could not be found
-
getActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() -
getExportActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getKBFolder
public static KBFolder getKBFolder(long kbFolderId) throws com.liferay.portal.kernel.exception.PortalException Returns the kb folder with the primary key.- Parameters:
kbFolderId
- the primary key of the kb folder- Returns:
- the kb folder
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a kb folder with the primary key could not be found
-
getKBFolderByExternalReferenceCode
public static KBFolder getKBFolderByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getKBFolderByUrlTitle
public static KBFolder getKBFolderByUrlTitle(long groupId, long parentKbFolderId, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getKBFolderByUuidAndGroupId
public static KBFolder getKBFolderByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException Returns the kb folder matching the UUID and group.- Parameters:
uuid
- the kb folder's UUIDgroupId
- the primary key of the group- Returns:
- the matching kb folder
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a matching kb folder could not be found
-
getKBFolders
Returns a range of all the kb folders.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.knowledge.base.model.impl.KBFolderModelImpl
.- Parameters:
start
- the lower bound of the range of kb foldersend
- the upper bound of the range of kb folders (not inclusive)- Returns:
- the range of kb folders
-
getKBFolders
public static List<KBFolder> getKBFolders(long groupId, long parentKBFolderId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getKBFoldersAndKBArticles
-
getKBFoldersAndKBArticles
-
getKBFoldersAndKBArticles
-
getKBFoldersAndKBArticlesCount
public static int getKBFoldersAndKBArticlesCount(long groupId, long parentResourcePrimKey, int status) -
getKBFoldersByUuidAndCompanyId
Returns all the kb folders matching the UUID and company.- Parameters:
uuid
- the UUID of the kb folderscompanyId
- the primary key of the company- Returns:
- the matching kb folders, or an empty list if no matches were found
-
getKBFoldersByUuidAndCompanyId
public static List<KBFolder> getKBFoldersByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBFolder> orderByComparator) Returns a range of kb folders matching the UUID and company.- Parameters:
uuid
- the UUID of the kb folderscompanyId
- the primary key of the companystart
- the lower bound of the range of kb foldersend
- the upper bound of the range of kb folders (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the range of matching kb folders, or an empty list if no matches were found
-
getKBFoldersCount
public static int getKBFoldersCount()Returns the number of kb folders.- Returns:
- the number of kb folders
-
getKBFoldersCount
public static int getKBFoldersCount(long groupId, long parentKBFolderId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getKBFoldersCount
public static int getKBFoldersCount(long groupId, long parentKBFolderId, int status) 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
-
getPersistedModel
public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveKBFolder
public static KBFolder moveKBFolder(long kbFolderId, long parentKBFolderId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveKBFolderFromTrash
public static KBFolder moveKBFolderFromTrash(long userId, long kbFolderId, long parentKBFolderId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveKBFolderToTrash
public static KBFolder moveKBFolderToTrash(long userId, long kbFolderId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
restoreKBFolderFromTrash
public static KBFolder restoreKBFolderFromTrash(long userId, long kbFolderId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateKBFolder
Updates the kb folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect KBFolderLocalServiceImpl 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:
kbFolder
- the kb folder- Returns:
- the kb folder that was updated
-
updateKBFolder
public static KBFolder updateKBFolder(long parentResourceClassNameId, long parentResourcePrimKey, long kbFolderId, String name, String description, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateStatus
public static KBFolder updateStatus(long userId, KBFolder kbFolder, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getService
-