Class AssetCategoryLocalServiceUtil
com.liferay.portlet.asset.service.impl.AssetCategoryLocalServiceImpl and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AssetCategoryaddAssetCategory(AssetCategory assetCategory) Adds the asset category to the database.static AssetCategoryaddCategory(long userId, long groupId, String title, long vocabularyId, ServiceContext serviceContext) static AssetCategoryaddCategory(String externalReferenceCode, long userId, long groupId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, long vocabularyId, String[] categoryProperties, ServiceContext serviceContext) static voidaddCategoryResources(AssetCategory category, boolean addGroupPermissions, boolean addGuestPermissions) static voidaddCategoryResources(AssetCategory category, ModelPermissions modelPermissions) static AssetCategorycreateAssetCategory(long categoryId) Creates a new asset category with the primary key.static PersistedModelcreatePersistedModel(Serializable primaryKeyObj) static AssetCategorydeleteAssetCategory(long categoryId) Deletes the asset category with the primary key from the database.static AssetCategorydeleteAssetCategory(AssetCategory assetCategory) Deletes the asset category from the database.static voiddeleteCategories(long[] categoryIds) static voiddeleteCategories(List<AssetCategory> categories) static AssetCategorydeleteCategory(long categoryId) static AssetCategorydeleteCategory(AssetCategory category) static AssetCategorydeleteCategory(AssetCategory category, boolean skipRebuildTree) static PersistedModeldeletePersistedModel(PersistedModel persistedModel) static voiddeleteVocabularyCategories(long vocabularyId) static <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static DynamicQuerystatic <T> List<T>dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.static <T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.static longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.static AssetCategoryfetchAssetCategory(long categoryId) static AssetCategoryfetchAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) static AssetCategoryfetchAssetCategoryByUuidAndGroupId(String uuid, long groupId) Returns the asset category matching the UUID and group.static AssetCategoryfetchCategory(long categoryId) static AssetCategoryfetchCategory(long groupId, long parentCategoryId, String name, long vocabularyId) static ActionableDynamicQuerystatic List<AssetCategory>getAssetCategories(int start, int end) Returns a range of all the asset categories.static List<AssetCategory>getAssetCategoriesByUuidAndCompanyId(String uuid, long companyId) Returns all the asset categories matching the UUID and company.static 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.static intReturns the number of asset categories.static AssetCategorygetAssetCategory(long categoryId) Returns the asset category with the primary key.static AssetCategorygetAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) static AssetCategorygetAssetCategoryByUuidAndGroupId(String uuid, long groupId) Returns the asset category matching the UUID and group.static List<AssetCategory>static List<AssetCategory>getCategories(long classNameId, long classPK) static List<AssetCategory>getCategories(long classNameId, long classPK, int start, int end) static List<AssetCategory>getCategories(Hits hits) static List<AssetCategory>getCategories(String className, long classPK) static intgetCategoriesCount(long classNameId, long classPK) static AssetCategorygetCategory(long categoryId) static AssetCategorygetCategory(String uuid, long groupId) static long[]getCategoryIds(String className, long classPK) static String[]static String[]getCategoryNames(long classNameId, long classPK) static String[]getCategoryNames(String className, long classPK) static List<AssetCategory>getChildCategories(long parentCategoryId) static List<AssetCategory>getChildCategories(long parentCategoryId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) static intgetChildCategoriesCount(long parentCategoryId) static List<AssetCategory>getDescendantCategories(AssetCategory category) static List<AssetCategory>getEntryCategories(long entryId) static ExportActionableDynamicQuerygetExportActionableDynamicQuery(PortletDataContext portletDataContext) static StringReturns the OSGi service identifier.static PersistedModelgetPersistedModel(Serializable primaryKeyObj) static AssetCategoryLocalServicegetSubcategoryIds(long parentCategoryId) static long[]getViewableCategoryIds(String className, long classPK, long[] categoryIds) static List<AssetCategory>getVocabularyCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) static List<AssetCategory>getVocabularyCategories(long parentCategoryId, long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) static intgetVocabularyCategoriesCount(long vocabularyId) static List<AssetCategory>getVocabularyRootCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) static intgetVocabularyRootCategoriesCount(long vocabularyId) static AssetCategorymergeCategories(long fromCategoryId, long toCategoryId) static AssetCategorymoveCategory(long categoryId, long parentCategoryId, long vocabularyId, ServiceContext serviceContext) static List<AssetCategory>static BaseModelSearchResult<AssetCategory>searchCategories(long companyId, long[] groupIds, String title, long[] vocabularyIds, int start, int end) static BaseModelSearchResult<AssetCategory>searchCategories(long companyId, long[] groupIds, String title, long[] parentCategoryIds, long[] vocabularyIds, int start, int end) static BaseModelSearchResult<AssetCategory>searchCategories(long companyId, long[] groupIds, String title, long[] vocabularyIds, long[] parentCategoryIds, int start, int end, Sort sort) static BaseModelSearchResult<AssetCategory>searchCategories(long companyId, long groupIds, String title, long vocabularyId, int start, int end) static voidsetService(AssetCategoryLocalService service) static AssetCategoryupdateAssetCategory(AssetCategory assetCategory) Updates the asset category in the database or adds it if it does not yet exist.static AssetCategoryupdateCategory(long userId, long categoryId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, long vocabularyId, String[] categoryProperties, ServiceContext serviceContext)
-
Constructor Details
-
AssetCategoryLocalServiceUtil
public AssetCategoryLocalServiceUtil()
-
-
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
public static AssetCategory addCategory(long userId, long groupId, String title, long vocabularyId, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
addCategory
public static 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
public static void addCategoryResources(AssetCategory category, boolean addGroupPermissions, boolean addGuestPermissions) throws PortalException - Throws:
PortalException
-
addCategoryResources
public static 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
public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException - 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
public static AssetCategory deleteCategory(AssetCategory category, boolean skipRebuildTree) throws PortalException - Throws:
PortalException
-
deleteCategory
- Throws:
PortalException
-
deletePersistedModel
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException - Throws:
PortalException
-
deleteVocabularyCategories
- Throws:
PortalException
-
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.Useful when paginating results. Returns a maximum of
end - 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
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 - 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
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic queryprojection- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchAssetCategory
-
fetchAssetCategoryByExternalReferenceCode
public static AssetCategory fetchAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) -
fetchAssetCategoryByUuidAndGroupId
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
public static AssetCategory fetchCategory(long groupId, long parentCategoryId, String name, long vocabularyId) -
getActionableDynamicQuery
-
getAssetCategories
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
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
public static 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
public static int getAssetCategoriesCount()Returns the number of asset categories.- Returns:
- the number of asset categories
-
getAssetCategory
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
public static AssetCategory getAssetCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Throws:
PortalException
-
getAssetCategoryByUuidAndGroupId
public static 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
- Throws:
PortalException
-
getCategories
-
getCategories
-
getCategories
-
getCategoriesCount
public static int getCategoriesCount(long classNameId, long classPK) -
getCategory
- Throws:
PortalException
-
getCategory
- Throws:
PortalException
-
getCategoryIds
-
getCategoryNames
-
getCategoryNames
-
getCategoryNames
-
getChildCategories
-
getChildCategories
public static List<AssetCategory> getChildCategories(long parentCategoryId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getChildCategoriesCount
public static int getChildCategoriesCount(long parentCategoryId) -
getDescendantCategories
-
getEntryCategories
-
getExportActionableDynamicQuery
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
- Throws:
PortalException
-
getSubcategoryIds
-
getViewableCategoryIds
public static long[] getViewableCategoryIds(String className, long classPK, long[] categoryIds) throws PortalException - Throws:
PortalException
-
getVocabularyCategories
public static List<AssetCategory> getVocabularyCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getVocabularyCategories
public static List<AssetCategory> getVocabularyCategories(long parentCategoryId, long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getVocabularyCategoriesCount
public static int getVocabularyCategoriesCount(long vocabularyId) -
getVocabularyRootCategories
public static List<AssetCategory> getVocabularyRootCategories(long vocabularyId, int start, int end, OrderByComparator<AssetCategory> orderByComparator) -
getVocabularyRootCategoriesCount
public static int getVocabularyRootCategoriesCount(long vocabularyId) -
mergeCategories
public static AssetCategory mergeCategories(long fromCategoryId, long toCategoryId) throws PortalException - Throws:
PortalException
-
moveCategory
public static AssetCategory moveCategory(long categoryId, long parentCategoryId, long vocabularyId, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
search
public static List<AssetCategory> search(long groupId, String name, String[] categoryProperties, int start, int end) -
searchCategories
public static BaseModelSearchResult<AssetCategory> searchCategories(long companyId, long groupIds, String title, long vocabularyId, int start, int end) throws PortalException - Throws:
PortalException
-
searchCategories
public static BaseModelSearchResult<AssetCategory> searchCategories(long companyId, long[] groupIds, String title, long[] vocabularyIds, int start, int end) throws PortalException - Throws:
PortalException
-
searchCategories
public static BaseModelSearchResult<AssetCategory> searchCategories(long companyId, long[] groupIds, String title, long[] parentCategoryIds, long[] vocabularyIds, int start, int end) throws PortalException - Throws:
PortalException
-
searchCategories
public static 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
public static 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
-
getService
-
setService
-