Class AssetCategoryServiceImpl
Object
com.liferay.portal.kernel.service.BaseServiceImpl
com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl
- All Implemented Interfaces:
com.liferay.asset.kernel.service.AssetCategoryService,com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService,com.liferay.portal.kernel.service.BaseService
Provides the remote service for accessing, adding, deleting, moving, and
updating asset categories. Its methods include permission checks.
- Author:
- Brian Wing Shun Chan, Jorge Ferrer, Alvaro del Castillo, Eduardo Lundgren, Bruno Farache
-
Field Summary
Fields inherited from class com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
assetCategoryLocalService, assetCategoryPersistence, assetCategoryService, counterLocalServiceFields inherited from class com.liferay.portal.kernel.service.BaseServiceImpl
ANONYMOUS_NAMES, JRUN_ANONYMOUS, ORACLE_ANONYMOUS, SUN_ANONYMOUS, WEBLOGIC_ANONYMOUS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.liferay.asset.kernel.model.AssetCategoryaddCategory(long groupId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, long vocabularyId, String[] categoryProperties, com.liferay.portal.kernel.service.ServiceContext serviceContext) com.liferay.asset.kernel.model.AssetCategoryaddCategory(long groupId, String title, long vocabularyId, com.liferay.portal.kernel.service.ServiceContext serviceContext) com.liferay.asset.kernel.model.AssetCategoryaddCategory(String externalReferenceCode, long groupId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, long vocabularyId, String[] categoryProperties, com.liferay.portal.kernel.service.ServiceContext serviceContext) voiddeleteCategories(long[] categoryIds) voiddeleteCategory(long categoryId) com.liferay.asset.kernel.model.AssetCategoryfetchCategory(long categoryId) com.liferay.asset.kernel.model.AssetCategoryfetchCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) protected List<com.liferay.asset.kernel.model.AssetCategory>filterCategories(List<com.liferay.asset.kernel.model.AssetCategory> categories) com.liferay.asset.kernel.model.AssetCategorygetAssetCategoryByExternalReferenceCode(long groupId, String externalReferenceCode) List<com.liferay.asset.kernel.model.AssetCategory>getCategories(long classNameId, long classPK, int start, int end) Returns a range of assetCategories related to an AssetEntry with the given "classNameId-classPK".List<com.liferay.asset.kernel.model.AssetCategory>getCategories(String className, long classPK) intgetCategoriesCount(long classNameId, long classPK) Returns the number of assetCategories related to an AssetEntry with the given "classNameId-classPK".com.liferay.asset.kernel.model.AssetCategorygetCategory(long categoryId) getCategoryPath(long categoryId) List<com.liferay.asset.kernel.model.AssetCategory>getChildCategories(long parentCategoryId) List<com.liferay.asset.kernel.model.AssetCategory>getChildCategories(long parentCategoryId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) eturns a range of child assetCategories.intgetChildCategoriesCount(long parentCategoryId) Returns the number of child categoriesList<com.liferay.asset.kernel.model.AssetCategory>getVocabularyCategories(long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) List<com.liferay.asset.kernel.model.AssetCategory>getVocabularyCategories(long parentCategoryId, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) List<com.liferay.asset.kernel.model.AssetCategory>getVocabularyCategories(long groupId, long parentCategoryId, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) List<com.liferay.asset.kernel.model.AssetCategory>getVocabularyCategories(long groupId, String name, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) intgetVocabularyCategoriesCount(long groupId, long vocabularyId) intgetVocabularyCategoriesCount(long groupId, long parentCategory, long vocabularyId) intgetVocabularyCategoriesCount(long groupId, String name, long vocabularyId) com.liferay.asset.kernel.model.AssetCategoryDisplaygetVocabularyCategoriesDisplay(long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) com.liferay.asset.kernel.model.AssetCategoryDisplaygetVocabularyCategoriesDisplay(long groupId, String name, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) List<com.liferay.asset.kernel.model.AssetCategory>getVocabularyRootCategories(long groupId, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) intgetVocabularyRootCategoriesCount(long groupId, long vocabularyId) com.liferay.asset.kernel.model.AssetCategorymoveCategory(long categoryId, long parentCategoryId, long vocabularyId, com.liferay.portal.kernel.service.ServiceContext serviceContext) com.liferay.portal.kernel.json.JSONArrayList<com.liferay.asset.kernel.model.AssetCategory>search(long groupId, String keywords, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) com.liferay.portal.kernel.json.JSONArraycom.liferay.asset.kernel.model.AssetCategoryDisplaysearchCategoriesDisplay(long[] groupIds, String title, long[] vocabularyIds, int start, int end) com.liferay.asset.kernel.model.AssetCategoryDisplaysearchCategoriesDisplay(long[] groupIds, String title, long[] parentCategoryIds, long[] vocabularyIds, int start, int end) com.liferay.asset.kernel.model.AssetCategoryDisplaysearchCategoriesDisplay(long[] groupIds, String title, long[] vocabularyIds, long[] parentCategoryIds, int start, int end, com.liferay.portal.kernel.search.Sort sort) com.liferay.asset.kernel.model.AssetCategoryDisplaysearchCategoriesDisplay(long groupId, String title, long vocabularyId, int start, int end) com.liferay.asset.kernel.model.AssetCategoryDisplaysearchCategoriesDisplay(long groupId, String title, long parentCategoryId, long vocabularyId, int start, int end) com.liferay.asset.kernel.model.AssetCategoryDisplaysearchCategoriesDisplay(long groupId, String title, long vocabularyId, long parentCategoryId, int start, int end, com.liferay.portal.kernel.search.Sort sort) protected com.liferay.portal.kernel.json.JSONArraytoJSONArray(List<com.liferay.asset.kernel.model.AssetCategory> categories) com.liferay.asset.kernel.model.AssetCategoryupdateCategory(long categoryId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, long vocabularyId, String[] categoryProperties, com.liferay.portal.kernel.service.ServiceContext serviceContext) Methods inherited from class com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
afterPropertiesSet, destroy, getAssetCategoryLocalService, getAssetCategoryPersistence, getAssetCategoryService, getCounterLocalService, getModelClass, getModelClassName, getOSGiServiceIdentifier, runSQL, setAssetCategoryLocalService, setAssetCategoryPersistence, setAssetCategoryService, setCounterLocalServiceMethods inherited from class com.liferay.portal.kernel.service.BaseServiceImpl
getClassLoader, getGuestOrUser, getGuestOrUserId, getPermissionChecker, getUser, getUserId
-
Constructor Details
-
AssetCategoryServiceImpl
public AssetCategoryServiceImpl()
-
-
Method Details
-
addCategory
public com.liferay.asset.kernel.model.AssetCategory addCategory(long groupId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, long vocabularyId, String[] categoryProperties, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addCategory
public com.liferay.asset.kernel.model.AssetCategory addCategory(long groupId, String title, long vocabularyId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addCategory
public com.liferay.asset.kernel.model.AssetCategory addCategory(String externalReferenceCode, long groupId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, long vocabularyId, String[] categoryProperties, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteCategories
public void deleteCategories(long[] categoryIds) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteCategory
public void deleteCategory(long categoryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchCategory
public com.liferay.asset.kernel.model.AssetCategory fetchCategory(long categoryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchCategoryByExternalReferenceCode
public com.liferay.asset.kernel.model.AssetCategory fetchCategoryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getAssetCategoryByExternalReferenceCode
public com.liferay.asset.kernel.model.AssetCategory getAssetCategoryByExternalReferenceCode(long groupId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getCategories(long classNameId, long classPK, int start, int end) Returns a range of assetCategories related to an AssetEntry with the given "classNameId-classPK".- Parameters:
classNameId- the className of the assetclassPK- the classPK of the assetstart- the lower bound of the range of resultsend- the upper bound of the range of results (not inclusive)- Returns:
- the matching assetCategories
-
getCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getCategories(String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCategoriesCount
public int getCategoriesCount(long classNameId, long classPK) Returns the number of assetCategories related to an AssetEntry with the given "classNameId-classPK".- Parameters:
classNameId- the className of the assetclassPK- the classPK of the asset- Returns:
- the number of matching assetCategories
-
getCategory
public com.liferay.asset.kernel.model.AssetCategory getCategory(long categoryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCategoryPath
public String getCategoryPath(long categoryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getChildCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getChildCategories(long parentCategoryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getChildCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getChildCategories(long parentCategoryId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException eturns a range of child assetCategories.- Parameters:
parentCategoryId- the parent category IDstart- the lower bound of the range of resultsend- the upper bound of the range of results (not inclusive)orderByComparator- the comparator- Returns:
- the matching categories
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getChildCategoriesCount
public int getChildCategoriesCount(long parentCategoryId) throws com.liferay.portal.kernel.exception.PortalException Returns the number of child categories- Parameters:
parentCategoryId- the parent category ID- Returns:
- the number of child categories
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getVocabularyCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getVocabularyCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(long parentCategoryId, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getVocabularyCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(long groupId, long parentCategoryId, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) -
getVocabularyCategories
-
getVocabularyCategoriesCount
public int getVocabularyCategoriesCount(long groupId, long vocabularyId) -
getVocabularyCategoriesCount
public int getVocabularyCategoriesCount(long groupId, long parentCategory, long vocabularyId) -
getVocabularyCategoriesCount
-
getVocabularyCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getVocabularyCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(long groupId, String name, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getVocabularyRootCategories
public List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyRootCategories(long groupId, long vocabularyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> orderByComparator) -
getVocabularyRootCategoriesCount
public int getVocabularyRootCategoriesCount(long groupId, long vocabularyId) -
moveCategory
public com.liferay.asset.kernel.model.AssetCategory moveCategory(long categoryId, long parentCategoryId, long vocabularyId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
-
search
public com.liferay.portal.kernel.json.JSONArray search(long groupId, String name, String[] categoryProperties, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
public com.liferay.portal.kernel.json.JSONArray search(long[] groupIds, String name, long[] vocabularyIds, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(long groupId, String title, long vocabularyId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(long groupId, String title, long parentCategoryId, long vocabularyId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(long groupId, String title, long vocabularyId, long parentCategoryId, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds, String title, long[] vocabularyIds, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds, String title, long[] parentCategoryIds, long[] vocabularyIds, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCategoriesDisplay
public com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds, String title, long[] vocabularyIds, long[] parentCategoryIds, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateCategory
public com.liferay.asset.kernel.model.AssetCategory updateCategory(long categoryId, long parentCategoryId, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, long vocabularyId, String[] categoryProperties, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Throws:
com.liferay.portal.kernel.exception.PortalException
-
filterCategories
protected List<com.liferay.asset.kernel.model.AssetCategory> filterCategories(List<com.liferay.asset.kernel.model.AssetCategory> categories) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
toJSONArray
protected com.liferay.portal.kernel.json.JSONArray toJSONArray(List<com.liferay.asset.kernel.model.AssetCategory> categories) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-