Interface AssetCategoryLocalService
- All Superinterfaces:
BaseLocalService,CTService<AssetCategory>,PersistedModelLocalService
- All Known Implementing Classes:
AssetCategoryLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddAssetCategory(AssetCategory assetCategory) Adds the asset category to the database.addCategory(long userId, long groupId, String title, long vocabularyId, ServiceContext serviceContext) addCategory(String externalReferenceCode, long userId, long groupId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, long vocabularyId, String[] categoryProperties, ServiceContext serviceContext) voidaddCategoryResources(AssetCategory category, boolean addGroupPermissions, boolean addGuestPermissions) voidaddCategoryResources(AssetCategory category, ModelPermissions modelPermissions) createAssetCategory(long categoryId) Creates a new asset category with the primary key.createPersistedModel(Serializable primaryKeyObj) deleteAssetCategory(long categoryId) Deletes the asset category with the primary key from the database.deleteAssetCategory(AssetCategory assetCategory) Deletes the asset category from the database.voiddeleteCategories(long[] categoryIds) voiddeleteCategories(List<AssetCategory> categories) deleteCategory(long categoryId) deleteCategory(AssetCategory category) deleteCategory(AssetCategory category, boolean skipRebuildTree) deletePersistedModel(PersistedModel persistedModel) voiddeleteVocabularyCategories(long vocabularyId) <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<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.<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.longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchAssetCategory(long categoryId) fetchAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) fetchAssetCategoryByUuidAndGroupId(String uuid, long groupId) Returns the asset category matching the UUID and group.fetchCategory(long categoryId) fetchCategory(long groupId, long parentCategoryId, String name, long vocabularyId) getAssetCategories(int start, int end) Returns a range of all the asset categories.getAssetCategoriesByUuidAndCompanyId(String uuid, long companyId) Returns all the asset categories matching the UUID and company.getAssetCategoriesByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) Returns a range of asset categories matching the UUID and company.intReturns the number of asset categories.getAssetCategory(long categoryId) Returns the asset category with the primary key.getAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) getAssetCategoryByUuidAndGroupId(String uuid, long groupId) Returns the asset category matching the UUID and group.getCategories(long classNameId, long classPK) getCategories(long classNameId, long classPK, int start, int end) getCategories(Hits hits) getCategories(String className, long classPK) intgetCategoriesCount(long classNameId, long classPK) getCategory(long categoryId) getCategory(String uuid, long groupId) long[]getCategoryIds(String className, long classPK) String[]String[]getCategoryNames(long classNameId, long classPK) String[]getCategoryNames(String className, long classPK) getChildCategories(long parentCategoryId) getChildCategories(long parentCategoryId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) intgetChildCategoriesCount(long parentCategoryId) getDescendantCategories(AssetCategory category) getEntryCategories(long entryId) getExportActionableDynamicQuery(PortletDataContext portletDataContext) Returns the OSGi service identifier.getPersistedModel(Serializable primaryKeyObj) getSubcategoryIds(long parentCategoryId) long[]getViewableCategoryIds(String className, long classPK, long[] categoryIds) getVocabularyCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) getVocabularyCategories(long parentCategoryId, long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) intgetVocabularyCategoriesCount(long vocabularyId) getVocabularyRootCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) intgetVocabularyRootCategoriesCount(long vocabularyId) mergeCategories(long fromCategoryId, long toCategoryId) moveCategory(long categoryId, long parentCategoryId, long vocabularyId, ServiceContext serviceContext) searchCategories(long companyId, long[] groupIds, String title, long[] vocabularyIds, int start, int end) searchCategories(long companyId, long[] groupIds, String title, long[] parentCategoryIds, long[] vocabularyIds, int start, int end) searchCategories(long companyId, long[] groupIds, String title, long[] vocabularyIds, long[] parentCategoryIds, int start, int end, Sort sort) searchCategories(long companyId, long groupIds, String title, long vocabularyId, int start, int end) updateAssetCategory(AssetCategory assetCategory) Updates the asset category in the database or adds it if it does not yet exist.updateCategory(long userId, long categoryId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, long vocabularyId, String[] categoryProperties, ServiceContext serviceContext) <R,E extends Throwable>
RupdateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<AssetCategory>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addAssetCategory
Adds the asset category to the database. Also notifies the appropriate model listeners.Important: Inspect AssetCategoryLocalServiceImpl 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:
assetCategory- the asset category- Returns:
- the asset category that was added
-
addCategory
AssetCategory addCategory(long userId, long groupId, String title, long vocabularyId, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
addCategory
@Indexable(type=REINDEX) AssetCategory addCategory(String externalReferenceCode, long userId, long groupId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, throws PortalExceptionString> descriptionMap, long vocabularyId, String[] categoryProperties, ServiceContext serviceContext) - Throws:
PortalException
-
addCategoryResources
void addCategoryResources(AssetCategory category, boolean addGroupPermissions, boolean addGuestPermissions) throws PortalException - Throws:
PortalException
-
addCategoryResources
void addCategoryResources(AssetCategory category, ModelPermissions modelPermissions) throws PortalException - Throws:
PortalException
-
createAssetCategory
Creates a new asset category with the primary key. Does not add the asset category to the database.- Parameters:
categoryId- the primary key for the new asset category- Returns:
- the new asset category
-
createPersistedModel
- Specified by:
createPersistedModelin interfacePersistedModelLocalService- Throws:
PortalException
-
deleteAssetCategory
Deletes the asset category from the database. Also notifies the appropriate model listeners.Important: Inspect AssetCategoryLocalServiceImpl 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:
assetCategory- the asset category- Returns:
- the asset category that was removed
-
deleteAssetCategory
Deletes the asset category with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect AssetCategoryLocalServiceImpl 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:
categoryId- the primary key of the asset category- Returns:
- the asset category that was removed
- Throws:
PortalException- if a asset category with the primary key could not be found
-
deleteCategories
- Throws:
PortalException
-
deleteCategories
- Throws:
PortalException
-
deleteCategory
- Throws:
PortalException
-
deleteCategory
@Indexable(type=DELETE) @SystemEvent(type=1) AssetCategory deleteCategory(AssetCategory category, boolean skipRebuildTree) throws PortalException - Throws:
PortalException
-
deleteCategory
- Throws:
PortalException
-
deletePersistedModel
- Specified by:
deletePersistedModelin interfacePersistedModelLocalService- Throws:
PortalException
-
deleteVocabularyCategories
- Throws:
PortalException
-
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryin interfacePersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCountin interfacePersistedModelLocalService
-
dynamicQuery
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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
@Transactional(propagation=SUPPORTS, readOnly=true) <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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.asset.model.impl.AssetCategoryModelImpl.- 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(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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.asset.model.impl.AssetCategoryModelImpl.- 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(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(DynamicQuery dynamicQuery, 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
-
fetchAssetCategory
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory fetchAssetCategory(long categoryId) -
fetchAssetCategoryByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory fetchAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) -
fetchAssetCategoryByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory fetchAssetCategoryByUuidAndGroupId(String uuid, long groupId) Returns the asset category matching the UUID and group.- Parameters:
uuid- the asset category's UUIDgroupId- the primary key of the group- Returns:
- the matching asset category, or
nullif a matching asset category could not be found
-
fetchCategory
-
fetchCategory
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory fetchCategory(long groupId, long parentCategoryId, String name, long vocabularyId) -
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getAssetCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getAssetCategories(int start, int end) Returns a range of all the asset categories.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.asset.model.impl.AssetCategoryModelImpl.- Parameters:
start- the lower bound of the range of asset categoriesend- the upper bound of the range of asset categories (not inclusive)- Returns:
- the range of asset categories
-
getAssetCategoriesByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(String uuid, long companyId) Returns all the asset categories matching the UUID and company.- Parameters:
uuid- the UUID of the asset categoriescompanyId- the primary key of the company- Returns:
- the matching asset categories, or an empty list if no matches were found
-
getAssetCategoriesByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) Returns a range of asset categories matching the UUID and company.- Parameters:
uuid- the UUID of the asset categoriescompanyId- the primary key of the companystart- the lower bound of the range of asset categoriesend- the upper bound of the range of asset categories (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the range of matching asset categories, or an empty list if no matches were found
-
getAssetCategoriesCount
Returns the number of asset categories.- Returns:
- the number of asset categories
-
getAssetCategory
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory getAssetCategory(long categoryId) throws PortalException Returns the asset category with the primary key.- Parameters:
categoryId- the primary key of the asset category- Returns:
- the asset category
- Throws:
PortalException- if a asset category with the primary key could not be found
-
getAssetCategoryByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory getAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Throws:
PortalException
-
getAssetCategoryByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory getAssetCategoryByUuidAndGroupId(String uuid, long groupId) throws PortalException Returns the asset category matching the UUID and group.- Parameters:
uuid- the asset category's UUIDgroupId- the primary key of the group- Returns:
- the matching asset category
- Throws:
PortalException- if a matching asset category could not be found
-
getCategories
-
getCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getCategories(Hits hits) throws PortalException - Throws:
PortalException
-
getCategories
@ThreadLocalCachable @Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getCategories(long classNameId, long classPK) -
getCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getCategories(long classNameId, long classPK, int start, int end) -
getCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getCategories(String className, long classPK) -
getCategoriesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getCategoriesCount(long classNameId, long classPK) -
getCategory
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory getCategory(long categoryId) throws PortalException - Throws:
PortalException
-
getCategory
@Transactional(propagation=SUPPORTS, readOnly=true) AssetCategory getCategory(String uuid, long groupId) throws PortalException - Throws:
PortalException
-
getCategoryIds
@Transactional(propagation=SUPPORTS, readOnly=true) long[] getCategoryIds(String className, long classPK) -
getCategoryNames
-
getCategoryNames
@Transactional(propagation=SUPPORTS, readOnly=true) String[] getCategoryNames(long classNameId, long classPK) -
getCategoryNames
@Transactional(propagation=SUPPORTS, readOnly=true) String[] getCategoryNames(String className, long classPK) -
getChildCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getChildCategories(long parentCategoryId) -
getChildCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getChildCategories(long parentCategoryId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getChildCategoriesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getChildCategoriesCount(long parentCategoryId) -
getDescendantCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getDescendantCategories(AssetCategory category) -
getEntryCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getEntryCategories(long entryId) -
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException - Specified by:
getPersistedModelin interfacePersistedModelLocalService- Throws:
PortalException
-
getSubcategoryIds
@Transactional(propagation=SUPPORTS, readOnly=true) List<Long> getSubcategoryIds(long parentCategoryId) -
getViewableCategoryIds
@Transactional(propagation=SUPPORTS, readOnly=true) long[] getViewableCategoryIds(String className, long classPK, long[] categoryIds) throws PortalException - Throws:
PortalException
-
getVocabularyCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getVocabularyCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getVocabularyCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getVocabularyCategories(long parentCategoryId, long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getVocabularyCategoriesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getVocabularyCategoriesCount(long vocabularyId) -
getVocabularyRootCategories
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> getVocabularyRootCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getVocabularyRootCategoriesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getVocabularyRootCategoriesCount(long vocabularyId) -
mergeCategories
@Indexable(type=REINDEX) AssetCategory mergeCategories(long fromCategoryId, long toCategoryId) throws PortalException - Throws:
PortalException
-
moveCategory
@Indexable(type=REINDEX) AssetCategory moveCategory(long categoryId, long parentCategoryId, long vocabularyId, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
search
@Transactional(propagation=SUPPORTS, readOnly=true) List<AssetCategory> search(long groupId, String name, String[] categoryProperties, int start, int end) -
searchCategories
@Transactional(propagation=SUPPORTS, readOnly=true) BaseModelSearchResult<AssetCategory> searchCategories(long companyId, long groupIds, String title, long vocabularyId, int start, int end) throws PortalException - Throws:
PortalException
-
searchCategories
@Transactional(propagation=SUPPORTS, readOnly=true) BaseModelSearchResult<AssetCategory> searchCategories(long companyId, long[] groupIds, String title, long[] vocabularyIds, int start, int end) throws PortalException - Throws:
PortalException
-
searchCategories
@Transactional(propagation=SUPPORTS, readOnly=true) BaseModelSearchResult<AssetCategory> searchCategories(long companyId, long[] groupIds, String title, long[] parentCategoryIds, long[] vocabularyIds, int start, int end) throws PortalException - Throws:
PortalException
-
searchCategories
@Transactional(propagation=SUPPORTS, readOnly=true) BaseModelSearchResult<AssetCategory> searchCategories(long companyId, long[] groupIds, String title, long[] vocabularyIds, long[] parentCategoryIds, int start, int end, Sort sort) throws PortalException - Throws:
PortalException
-
updateAssetCategory
Updates the asset category in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect AssetCategoryLocalServiceImpl 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:
assetCategory- the asset category- Returns:
- the asset category that was updated
-
updateCategory
@Indexable(type=REINDEX) AssetCategory updateCategory(long userId, long categoryId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, throws PortalExceptionString> descriptionMap, long vocabularyId, String[] categoryProperties, ServiceContext serviceContext) - Throws:
PortalException
-
getCTPersistence
- Specified by:
getCTPersistencein interfaceCTService<AssetCategory>
-
getModelClass
- Specified by:
getModelClassin interfaceCTService<AssetCategory>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<AssetCategory>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunctionin interfaceCTService<AssetCategory>- Throws:
E extends Throwable
-