Interface KBArticleLocalService
- All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService
,com.liferay.portal.kernel.service.change.tracking.CTService<KBArticle>
,com.liferay.portal.kernel.service.PersistedModelLocalService
,com.liferay.portal.kernel.service.PersistedResourcedModelLocalService
- All Known Implementing Classes:
KBArticleLocalServiceWrapper
- See Also:
- Generated:
-
Method Summary
Modifier and TypeMethodDescriptioncom.liferay.portal.kernel.repository.model.FileEntry
addAttachment
(long userId, long resourcePrimKey, String fileName, InputStream inputStream, String mimeType) addKBArticle
(KBArticle kbArticle) Adds the kb article to the database.addKBArticle
(String externalReferenceCode, long userId, long parentResourceClassNameId, long parentResourcePrimKey, String title, String urlTitle, String content, String description, String[] sections, String sourceURL, Date displayDate, Date expirationDate, Date reviewDate, String[] selectedFileNames, com.liferay.portal.kernel.service.ServiceContext serviceContext) void
addKBArticleResources
(long kbArticleId, boolean addGroupPermissions, boolean addGuestPermissions) void
addKBArticleResources
(KBArticle kbArticle, boolean addGroupPermissions, boolean addGuestPermissions) void
addKBArticleResources
(KBArticle kbArticle, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) int
addKBArticlesMarkdown
(long userId, long groupId, long parentKbFolderId, String fileName, boolean prioritizeByNumericalPrefix, InputStream inputStream, com.liferay.portal.kernel.service.ServiceContext serviceContext) void
addTempAttachment
(long groupId, long userId, String fileName, String tempFolderName, InputStream inputStream, String mimeType) void
checkKBArticles
(long companyId) createKBArticle
(long kbArticleId) Creates a new kb article with the primary key.com.liferay.portal.kernel.model.PersistedModel
createPersistedModel
(Serializable primaryKeyObj) void
deleteGroupKBArticles
(long groupId) deleteKBArticle
(long kbArticleId) Deletes the kb article with the primary key from the database.deleteKBArticle
(long userId, long resourcePrimKey, int version) deleteKBArticle
(KBArticle kbArticle) Deletes the kb article from the database.void
deleteKBArticles
(long[] resourcePrimKeys) void
deleteKBArticles
(long groupId, long parentResourcePrimKey) void
deleteKBArticles
(long groupId, long parentResourcePrimKey, boolean includeTrashedEntries) com.liferay.portal.kernel.model.PersistedModel
deletePersistedModel
(com.liferay.portal.kernel.model.PersistedModel persistedModel) void
deleteTempAttachment
(long groupId, long userId, String fileName, String tempFolderName) <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) com.liferay.portal.kernel.dao.orm.DynamicQuery
<T> List<T>
dynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<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.<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.long
dynamicQueryCount
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.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.expireKBArticle
(long userId, long resourcePrimKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) fetchFirstChildKBArticle
(long groupId, long parentResourcePrimKey) fetchKBArticle
(long kbArticleId) fetchKBArticle
(long resourcePrimKey, long groupId, int version) fetchKBArticleByUrlTitle
(long groupId, long kbFolderId, String urlTitle) fetchKBArticleByUrlTitle
(long groupId, String kbFolderUrlTitle, String urlTitle) fetchKBArticleByUuidAndGroupId
(String uuid, long groupId) Returns the kb article matching the UUID and group.fetchLatestKBArticle
(long resourcePrimKey, int status) fetchLatestKBArticle
(long resourcePrimKey, long groupId) fetchLatestKBArticleByExternalReferenceCode
(long groupId, String externalReferenceCode) fetchLatestKBArticleByUrlTitle
(long groupId, long kbFolderId, String urlTitle, int status) com.liferay.portal.kernel.model.PersistedModel
fetchPersistedModel
(Serializable primaryKeyObj) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
getAllDescendantKBArticles
(long resourcePrimKey, int status, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) getCompanyKBArticles
(long companyId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) int
getCompanyKBArticlesCount
(long companyId, int status) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<KBArticle>
com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
getExportActionableDynamicQuery
(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) getGroupKBArticles
(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) int
getGroupKBArticlesCount
(long groupId, int status) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
getKBArticle
(long kbArticleId) Returns the kb article with the primary key.getKBArticle
(long resourcePrimKey, int version) getKBArticleAndAllDescendantKBArticles
(long resourcePrimKey, int status, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) getKBArticleByUrlTitle
(long groupId, long kbFolderId, String urlTitle) getKBArticleByUrlTitle
(long groupId, String kbFolderUrlTitle, String urlTitle) getKBArticleByUuidAndGroupId
(String uuid, long groupId) Returns the kb article matching the UUID and group.getKBArticles
(int start, int end) Returns a range of all the kb articles.getKBArticles
(long[] resourcePrimKeys, int status, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) getKBArticles
(long groupId, long parentResourcePrimKey, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) getKBArticlesByUuidAndCompanyId
(String uuid, long companyId) Returns all the kb articles matching the UUID and company.getKBArticlesByUuidAndCompanyId
(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) Returns a range of kb articles matching the UUID and company.int
Returns the number of kb articles.int
getKBArticlesCount
(long groupId, long parentResourcePrimKey, int status) getKBArticleVersions
(long resourcePrimKey, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) int
getKBArticleVersionsCount
(long resourcePrimKey, int status) getKBFolderKBArticles
(long groupId, long kbFolderId) int
getKBFolderKBArticlesCount
(long groupId, long kbFolderId, int status) getLatestKBArticle
(long resourcePrimKey) getLatestKBArticle
(long resourcePrimKey, int status) getLatestKBArticle
(long resourcePrimKey, int[] statuses) getLatestKBArticleByExternalReferenceCode
(long groupId, String externalReferenceCode) getLatestKBArticleByUrlTitle
(long groupId, long kbFolderId, String urlTitle, int status) Returns the OSGi service identifier.List<? extends com.liferay.portal.kernel.model.PersistedModel>
getPersistedModel
(long resourcePrimKey) com.liferay.portal.kernel.model.PersistedModel
getPersistedModel
(Serializable primaryKeyObj) getPreviousAndNextKBArticles
(long kbArticleId) getSectionsKBArticles
(long groupId, String[] sections, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) int
getSectionsKBArticlesCount
(long groupId, String[] sections, int status) String[]
getTempAttachmentNames
(long groupId, long userId, String tempFolderName) boolean
hasKBArticleLock
(long userId, long resourcePrimKey) void
incrementViewCount
(long userId, long resourcePrimKey, int increment) com.liferay.portal.kernel.lock.Lock
lockKBArticle
(long userId, long resourcePrimKey) void
moveDependentKBArticlesToTrash
(long parentResourcePrimKey, long trashEntryId) void
moveDependentKBArticleToTrash
(KBArticle kbArticle, long trashEntryId) void
moveKBArticle
(long userId, long resourcePrimKey, long parentResourceClassNameId, long parentResourcePrimKey, double priority) void
moveKBArticleFromTrash
(long userId, long resourcePrimKey, long parentResourceClassNameId, long parentResourcePrimKey) moveKBArticleToTrash
(long userId, long resourcePrimKey) void
restoreDependentKBArticleFromTrash
(KBArticle kbArticle) void
restoreDependentKBArticlesFromTrash
(long parentResourcePrimKey) void
restoreKBArticleFromTrash
(long userId, long resourcePrimKey) revertKBArticle
(long userId, long resourcePrimKey, int version, com.liferay.portal.kernel.service.ServiceContext serviceContext) search
(long groupId, String title, String content, int status, Date startDate, Date endDate, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) void
subscribeGroupKBArticles
(long userId, long groupId) void
subscribeKBArticle
(long userId, long groupId, long resourcePrimKey) void
unlockKBArticle
(long userId, long resourcePrimKey) void
unlockKBArticle
(long userId, long resourcePrimKey, boolean force) void
unsubscribeGroupKBArticles
(long userId, long groupId) void
unsubscribeKBArticle
(long userId, long resourcePrimKey) updateAndUnlockKBArticle
(long userId, long resourcePrimKey, String title, String content, String description, String[] sections, String sourceURL, Date displayDate, Date expirationDate, Date reviewDate, String[] selectedFileNames, long[] removeFileEntryIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) updateKBArticle
(long userId, long resourcePrimKey, String title, String content, String description, String[] sections, String sourceURL, Date displayDate, Date expirationDate, Date reviewDate, String[] selectedFileNames, long[] removeFileEntryIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) updateKBArticle
(KBArticle kbArticle) Updates the kb article in the database or adds it if it does not yet exist.void
updateKBArticleAsset
(long userId, KBArticle kbArticle, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds) void
updateKBArticleResources
(KBArticle kbArticle, String[] groupPermissions, String[] guestPermissions) void
updateKBArticlesPriorities
(Map<Long, Double> resourcePrimKeyToPriorityMap) void
updatePriority
(long resourcePrimKey, double priority) updateStatus
(long userId, long resourcePrimKey, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) <R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<KBArticle>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
getBasePersistence
-
Method Details
-
addAttachment
com.liferay.portal.kernel.repository.model.FileEntry addAttachment(long userId, long resourcePrimKey, String fileName, InputStream inputStream, String mimeType) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addKBArticle
Adds the kb article to the database. Also notifies the appropriate model listeners.Important: Inspect KBArticleLocalServiceImpl 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:
kbArticle
- the kb article- Returns:
- the kb article that was added
-
addKBArticle
KBArticle addKBArticle(String externalReferenceCode, long userId, long parentResourceClassNameId, long parentResourcePrimKey, String title, String urlTitle, String content, String description, String[] sections, String sourceURL, Date displayDate, Date expirationDate, Date reviewDate, String[] selectedFileNames, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addKBArticleResources
void addKBArticleResources(KBArticle kbArticle, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addKBArticleResources
void addKBArticleResources(KBArticle kbArticle, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addKBArticleResources
void addKBArticleResources(long kbArticleId, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addKBArticlesMarkdown
int addKBArticlesMarkdown(long userId, long groupId, long parentKbFolderId, String fileName, boolean prioritizeByNumericalPrefix, InputStream inputStream, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addTempAttachment
void addTempAttachment(long groupId, long userId, String fileName, String tempFolderName, InputStream inputStream, String mimeType) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkKBArticles
void checkKBArticles(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
createKBArticle
Creates a new kb article with the primary key. Does not add the kb article to the database.- Parameters:
kbArticleId
- the primary key for the new kb article- Returns:
- the new kb article
-
createPersistedModel
com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
createPersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteGroupKBArticles
void deleteGroupKBArticles(long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBArticle
@Indexable(type=DELETE) @SystemEvent(action=1, type=1) KBArticle deleteKBArticle(KBArticle kbArticle) throws com.liferay.portal.kernel.exception.PortalException Deletes the kb article from the database. Also notifies the appropriate model listeners.Important: Inspect KBArticleLocalServiceImpl 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:
kbArticle
- the kb article- Returns:
- the kb article that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBArticle
@Indexable(type=DELETE) @SystemEvent(action=1, type=1) KBArticle deleteKBArticle(long kbArticleId) throws com.liferay.portal.kernel.exception.PortalException Deletes the kb article with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect KBArticleLocalServiceImpl 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:
kbArticleId
- the primary key of the kb article- Returns:
- the kb article that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a kb article with the primary key could not be found
-
deleteKBArticle
@SystemEvent(action=1, type=1) KBArticle deleteKBArticle(long userId, long resourcePrimKey, int version) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBArticles
void deleteKBArticles(long groupId, long parentResourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBArticles
void deleteKBArticles(long groupId, long parentResourcePrimKey, boolean includeTrashedEntries) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteKBArticles
void deleteKBArticles(long[] resourcePrimKeys) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deletePersistedModel
com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
deletePersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteTempAttachment
void deleteTempAttachment(long groupId, long userId, String fileName, String tempFolderName) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() -
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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.KBArticleModelImpl
.- 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
@Transactional(propagation=SUPPORTS, readOnly=true) <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.KBArticleModelImpl
.- 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
-
expireKBArticle
KBArticle expireKBArticle(long userId, long resourcePrimKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchFirstChildKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle fetchFirstChildKBArticle(long groupId, long parentResourcePrimKey) -
fetchKBArticle
-
fetchKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle fetchKBArticle(long resourcePrimKey, long groupId, int version) -
fetchKBArticleByUrlTitle
-
fetchKBArticleByUrlTitle
-
fetchKBArticleByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle fetchKBArticleByUuidAndGroupId(String uuid, long groupId) Returns the kb article matching the UUID and group.- Parameters:
uuid
- the kb article's UUIDgroupId
- the primary key of the group- Returns:
- the matching kb article, or
null
if a matching kb article could not be found
-
fetchLatestKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle fetchLatestKBArticle(long resourcePrimKey, int status) -
fetchLatestKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle fetchLatestKBArticle(long resourcePrimKey, long groupId) -
fetchLatestKBArticleByExternalReferenceCode
-
fetchLatestKBArticleByUrlTitle
-
fetchPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel fetchPersistedModel(Serializable primaryKeyObj) - Specified by:
fetchPersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
-
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() -
getAllDescendantKBArticles
-
getCompanyKBArticles
-
getCompanyKBArticlesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getCompanyKBArticlesCount(long companyId, int status) -
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) -
getGroupKBArticles
-
getGroupKBArticlesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getGroupKBArticlesCount(long groupId, int status) -
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getKBArticle(long kbArticleId) throws com.liferay.portal.kernel.exception.PortalException Returns the kb article with the primary key.- Parameters:
kbArticleId
- the primary key of the kb article- Returns:
- the kb article
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a kb article with the primary key could not be found
-
getKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getKBArticle(long resourcePrimKey, int version) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getKBArticleAndAllDescendantKBArticles
-
getKBArticleByUrlTitle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getKBArticleByUrlTitle(long groupId, long kbFolderId, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getKBArticleByUrlTitle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getKBArticleByUrlTitle(long groupId, String kbFolderUrlTitle, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getKBArticleByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getKBArticleByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException Returns the kb article matching the UUID and group.- Parameters:
uuid
- the kb article's UUIDgroupId
- the primary key of the group- Returns:
- the matching kb article
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a matching kb article could not be found
-
getKBArticles
@Transactional(propagation=SUPPORTS, readOnly=true) List<KBArticle> getKBArticles(int start, int end) Returns a range of all the kb articles.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.KBArticleModelImpl
.- Parameters:
start
- the lower bound of the range of kb articlesend
- the upper bound of the range of kb articles (not inclusive)- Returns:
- the range of kb articles
-
getKBArticles
-
getKBArticles
-
getKBArticlesByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<KBArticle> getKBArticlesByUuidAndCompanyId(String uuid, long companyId) Returns all the kb articles matching the UUID and company.- Parameters:
uuid
- the UUID of the kb articlescompanyId
- the primary key of the company- Returns:
- the matching kb articles, or an empty list if no matches were found
-
getKBArticlesByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<KBArticle> getKBArticlesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<KBArticle> orderByComparator) Returns a range of kb articles matching the UUID and company.- Parameters:
uuid
- the UUID of the kb articlescompanyId
- the primary key of the companystart
- the lower bound of the range of kb articlesend
- the upper bound of the range of kb articles (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the range of matching kb articles, or an empty list if no matches were found
-
getKBArticlesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getKBArticlesCount()Returns the number of kb articles.- Returns:
- the number of kb articles
-
getKBArticlesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getKBArticlesCount(long groupId, long parentResourcePrimKey, int status) -
getKBArticleVersions
-
getKBArticleVersionsCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getKBArticleVersionsCount(long resourcePrimKey, int status) -
getKBFolderKBArticles
-
getKBFolderKBArticlesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getKBFolderKBArticlesCount(long groupId, long kbFolderId, int status) -
getLatestKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getLatestKBArticle(long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getLatestKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getLatestKBArticle(long resourcePrimKey, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getLatestKBArticle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getLatestKBArticle(long resourcePrimKey, int[] statuses) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getLatestKBArticleByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getLatestKBArticleByExternalReferenceCode(long groupId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getLatestKBArticleByUrlTitle
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle getLatestKBArticleByUrlTitle(long groupId, long kbFolderId, String urlTitle, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) List<? extends com.liferay.portal.kernel.model.PersistedModel> getPersistedModel(long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
getPersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedResourcedModelLocalService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
getPersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getPreviousAndNextKBArticles
@Transactional(propagation=SUPPORTS, readOnly=true) KBArticle[] getPreviousAndNextKBArticles(long kbArticleId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSectionsKBArticles
-
getSectionsKBArticlesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getSectionsKBArticlesCount(long groupId, String[] sections, int status) -
getTempAttachmentNames
@Transactional(propagation=SUPPORTS, readOnly=true) String[] getTempAttachmentNames(long groupId, long userId, String tempFolderName) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
hasKBArticleLock
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasKBArticleLock(long userId, long resourcePrimKey) -
incrementViewCount
@Transactional(propagation=SUPPORTS, readOnly=true) void incrementViewCount(long userId, long resourcePrimKey, int increment) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
lockKBArticle
com.liferay.portal.kernel.lock.Lock lockKBArticle(long userId, long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveDependentKBArticlesToTrash
void moveDependentKBArticlesToTrash(long parentResourcePrimKey, long trashEntryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveDependentKBArticleToTrash
void moveDependentKBArticleToTrash(KBArticle kbArticle, long trashEntryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveKBArticle
void moveKBArticle(long userId, long resourcePrimKey, long parentResourceClassNameId, long parentResourcePrimKey, double priority) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveKBArticleFromTrash
void moveKBArticleFromTrash(long userId, long resourcePrimKey, long parentResourceClassNameId, long parentResourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveKBArticleToTrash
KBArticle moveKBArticleToTrash(long userId, long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
restoreDependentKBArticleFromTrash
void restoreDependentKBArticleFromTrash(KBArticle kbArticle) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
restoreDependentKBArticlesFromTrash
void restoreDependentKBArticlesFromTrash(long parentResourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
restoreKBArticleFromTrash
void restoreKBArticleFromTrash(long userId, long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
revertKBArticle
KBArticle revertKBArticle(long userId, long resourcePrimKey, int version, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
-
subscribeGroupKBArticles
void subscribeGroupKBArticles(long userId, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
subscribeKBArticle
void subscribeKBArticle(long userId, long groupId, long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
unlockKBArticle
void unlockKBArticle(long userId, long resourcePrimKey) -
unlockKBArticle
void unlockKBArticle(long userId, long resourcePrimKey, boolean force) -
unsubscribeGroupKBArticles
void unsubscribeGroupKBArticles(long userId, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsubscribeKBArticle
void unsubscribeKBArticle(long userId, long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateAndUnlockKBArticle
KBArticle updateAndUnlockKBArticle(long userId, long resourcePrimKey, String title, String content, String description, String[] sections, String sourceURL, Date displayDate, Date expirationDate, Date reviewDate, String[] selectedFileNames, long[] removeFileEntryIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateKBArticle
Updates the kb article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect KBArticleLocalServiceImpl 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:
kbArticle
- the kb article- Returns:
- the kb article that was updated
-
updateKBArticle
KBArticle updateKBArticle(long userId, long resourcePrimKey, String title, String content, String description, String[] sections, String sourceURL, Date displayDate, Date expirationDate, Date reviewDate, String[] selectedFileNames, long[] removeFileEntryIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateKBArticleAsset
void updateKBArticleAsset(long userId, KBArticle kbArticle, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateKBArticleResources
void updateKBArticleResources(KBArticle kbArticle, String[] groupPermissions, String[] guestPermissions) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateKBArticlesPriorities
void updateKBArticlesPriorities(Map<Long, Double> resourcePrimKeyToPriorityMap) throws com.liferay.portal.kernel.exception.PortalException- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePriority
void updatePriority(long resourcePrimKey, double priority) -
updateStatus
KBArticle updateStatus(long userId, long resourcePrimKey, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCTPersistence
@Transactional(enabled=false) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<KBArticle> getCTPersistence()- Specified by:
getCTPersistence
in interfacecom.liferay.portal.kernel.service.change.tracking.CTService<KBArticle>
-
getModelClass
- Specified by:
getModelClass
in interfacecom.liferay.portal.kernel.service.change.tracking.CTService<KBArticle>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<KBArticle>, R, throws EE> updateUnsafeFunction)
-