001    /**
002     * Copyright (c) 2000-2012 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.journal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the journal structure remote service. This utility wraps {@link com.liferay.portlet.journal.service.impl.JournalStructureServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * 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.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalStructureService
030     * @see com.liferay.portlet.journal.service.base.JournalStructureServiceBaseImpl
031     * @see com.liferay.portlet.journal.service.impl.JournalStructureServiceImpl
032     * @generated
033     */
034    public class JournalStructureServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalStructureServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.journal.model.JournalStructure addStructure(
041                    long groupId, java.lang.String structureId, boolean autoStructureId,
042                    java.lang.String parentStructureId,
043                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
044                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
045                    java.lang.String xsd,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException,
048                            com.liferay.portal.kernel.exception.SystemException {
049                    return getService()
050                                       .addStructure(groupId, structureId, autoStructureId,
051                            parentStructureId, nameMap, descriptionMap, xsd, serviceContext);
052            }
053    
054            public static com.liferay.portlet.journal.model.JournalStructure copyStructure(
055                    long groupId, java.lang.String oldStructureId,
056                    java.lang.String newStructureId, boolean autoStructureId)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    return getService()
060                                       .copyStructure(groupId, oldStructureId, newStructureId,
061                            autoStructureId);
062            }
063    
064            public static void deleteStructure(long groupId,
065                    java.lang.String structureId)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    getService().deleteStructure(groupId, structureId);
069            }
070    
071            public static com.liferay.portlet.journal.model.JournalStructure getStructure(
072                    long groupId, java.lang.String structureId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService().getStructure(groupId, structureId);
076            }
077    
078            public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
079                    long groupId)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getService().getStructures(groupId);
082            }
083    
084            public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
085                    long companyId, long[] groupIds, java.lang.String keywords, int start,
086                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    return getService()
089                                       .search(companyId, groupIds, keywords, start, end, obc);
090            }
091    
092            public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
093                    long companyId, long[] groupIds, java.lang.String structureId,
094                    java.lang.String name, java.lang.String description,
095                    boolean andOperator, int start, int end,
096                    com.liferay.portal.kernel.util.OrderByComparator obc)
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService()
099                                       .search(companyId, groupIds, structureId, name, description,
100                            andOperator, start, end, obc);
101            }
102    
103            public static int searchCount(long companyId, long[] groupIds,
104                    java.lang.String keywords)
105                    throws com.liferay.portal.kernel.exception.SystemException {
106                    return getService().searchCount(companyId, groupIds, keywords);
107            }
108    
109            public static int searchCount(long companyId, long[] groupIds,
110                    java.lang.String structureId, java.lang.String name,
111                    java.lang.String description, boolean andOperator)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService()
114                                       .searchCount(companyId, groupIds, structureId, name,
115                            description, andOperator);
116            }
117    
118            public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
119                    long groupId, java.lang.String structureId,
120                    java.lang.String parentStructureId,
121                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
122                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
123                    java.lang.String xsd,
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                                       .updateStructure(groupId, structureId, parentStructureId,
129                            nameMap, descriptionMap, xsd, serviceContext);
130            }
131    
132            public static JournalStructureService getService() {
133                    if (_service == null) {
134                            _service = (JournalStructureService)PortalBeanLocatorUtil.locate(JournalStructureService.class.getName());
135    
136                            ReferenceRegistry.registerReference(JournalStructureServiceUtil.class,
137                                    "_service");
138                            MethodCache.remove(JournalStructureService.class);
139                    }
140    
141                    return _service;
142            }
143    
144            public void setService(JournalStructureService service) {
145                    MethodCache.remove(JournalStructureService.class);
146    
147                    _service = service;
148    
149                    ReferenceRegistry.registerReference(JournalStructureServiceUtil.class,
150                            "_service");
151                    MethodCache.remove(JournalStructureService.class);
152            }
153    
154            private static JournalStructureService _service;
155    }