001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.asset.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * The utility for the asset category remote service. This utility wraps {@link com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see AssetCategoryService
032     * @see com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
033     * @see com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl
034     * @generated
035     */
036    public class AssetCategoryServiceUtil {
037            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
038                    long parentCategoryId,
039                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
040                    long vocabularyId, java.lang.String[] categoryProperties,
041                    com.liferay.portal.service.ServiceContext serviceContext)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    return getService()
045                                       .addCategory(parentCategoryId, titleMap, vocabularyId,
046                            categoryProperties, serviceContext);
047            }
048    
049            public static void deleteCategory(long categoryId)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException {
052                    getService().deleteCategory(categoryId);
053            }
054    
055            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
056                    java.lang.String className, long classPK)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    return getService().getCategories(className, classPK);
060            }
061    
062            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
063                    long categoryId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService().getCategory(categoryId);
067            }
068    
069            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
070                    long parentCategoryId)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService().getChildCategories(parentCategoryId);
074            }
075    
076            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
077                    long parentCategoryId, int start, int end,
078                    com.liferay.portal.kernel.util.OrderByComparator obc)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return getService().getChildCategories(parentCategoryId, start, end, obc);
082            }
083    
084            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
085                    long vocabularyId, int start, int end,
086                    com.liferay.portal.kernel.util.OrderByComparator obc)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService()
090                                       .getVocabularyCategories(vocabularyId, start, end, obc);
091            }
092    
093            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
094                    long parentCategoryId, long vocabularyId, int start, int end,
095                    com.liferay.portal.kernel.util.OrderByComparator obc)
096                    throws com.liferay.portal.kernel.exception.PortalException,
097                            com.liferay.portal.kernel.exception.SystemException {
098                    return getService()
099                                       .getVocabularyCategories(parentCategoryId, vocabularyId,
100                            start, end, obc);
101            }
102    
103            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
104                    long vocabularyId, int start, int end,
105                    com.liferay.portal.kernel.util.OrderByComparator obc)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException {
108                    return getService()
109                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
110            }
111    
112            public static com.liferay.portal.kernel.json.JSONArray search(
113                    long groupId, java.lang.String name,
114                    java.lang.String[] categoryProperties, int start, int end)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException {
117                    return getService().search(groupId, name, categoryProperties, start, end);
118            }
119    
120            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
121                    long categoryId, long parentCategoryId,
122                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
123                    long vocabularyId, java.lang.String[] categoryProperties,
124                    com.liferay.portal.service.ServiceContext serviceContext)
125                    throws com.liferay.portal.kernel.exception.PortalException,
126                            com.liferay.portal.kernel.exception.SystemException {
127                    return getService()
128                                       .updateCategory(categoryId, parentCategoryId, titleMap,
129                            vocabularyId, categoryProperties, serviceContext);
130            }
131    
132            public static AssetCategoryService getService() {
133                    if (_service == null) {
134                            _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
135                    }
136    
137                    return _service;
138            }
139    
140            public void setService(AssetCategoryService service) {
141                    _service = service;
142            }
143    
144            private static AssetCategoryService _service;
145    }