001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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, int start, int end,
071                    com.liferay.portal.kernel.util.OrderByComparator obc)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService().getChildCategories(parentCategoryId, start, end, obc);
075            }
076    
077            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
078                    long vocabularyId, int start, int end,
079                    com.liferay.portal.kernel.util.OrderByComparator obc)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    return getService()
083                                       .getVocabularyCategories(vocabularyId, start, end, obc);
084            }
085    
086            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
087                    long vocabularyId, int start, int end,
088                    com.liferay.portal.kernel.util.OrderByComparator obc)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService()
092                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
093            }
094    
095            public static com.liferay.portal.kernel.json.JSONArray search(
096                    long groupId, java.lang.String name,
097                    java.lang.String[] categoryProperties, int start, int end)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getService().search(groupId, name, categoryProperties, start, end);
100            }
101    
102            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
103                    long categoryId, long parentCategoryId,
104                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
105                    long vocabularyId, java.lang.String[] categoryProperties,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    return getService()
110                                       .updateCategory(categoryId, parentCategoryId, titleMap,
111                            vocabularyId, categoryProperties, serviceContext);
112            }
113    
114            public static AssetCategoryService getService() {
115                    if (_service == null) {
116                            _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
117                    }
118    
119                    return _service;
120            }
121    
122            public void setService(AssetCategoryService service) {
123                    _service = service;
124            }
125    
126            private static AssetCategoryService _service;
127    }