001    /**
002     * Copyright (c) 2000-2011 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.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, java.lang.String name,
043                    java.lang.String description, java.lang.String xsd,
044                    com.liferay.portal.service.ServiceContext serviceContext)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    return getService()
048                                       .addStructure(groupId, structureId, autoStructureId,
049                            parentStructureId, name, description, xsd, serviceContext);
050            }
051    
052            public static com.liferay.portlet.journal.model.JournalStructure copyStructure(
053                    long groupId, java.lang.String oldStructureId,
054                    java.lang.String newStructureId, boolean autoStructureId)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService()
058                                       .copyStructure(groupId, oldStructureId, newStructureId,
059                            autoStructureId);
060            }
061    
062            public static void deleteStructure(long groupId,
063                    java.lang.String structureId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    getService().deleteStructure(groupId, structureId);
067            }
068    
069            public static com.liferay.portlet.journal.model.JournalStructure getStructure(
070                    long groupId, java.lang.String structureId)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService().getStructure(groupId, structureId);
074            }
075    
076            public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
077                    long groupId)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    return getService().getStructures(groupId);
080            }
081    
082            public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
083                    long companyId, long[] groupIds, java.lang.String keywords, int start,
084                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
085                    throws com.liferay.portal.kernel.exception.SystemException {
086                    return getService()
087                                       .search(companyId, groupIds, keywords, start, end, obc);
088            }
089    
090            public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
091                    long companyId, long[] groupIds, java.lang.String structureId,
092                    java.lang.String name, java.lang.String description,
093                    boolean andOperator, int start, int end,
094                    com.liferay.portal.kernel.util.OrderByComparator obc)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService()
097                                       .search(companyId, groupIds, structureId, name, description,
098                            andOperator, start, end, obc);
099            }
100    
101            public static int searchCount(long companyId, long[] groupIds,
102                    java.lang.String keywords)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().searchCount(companyId, groupIds, keywords);
105            }
106    
107            public static int searchCount(long companyId, long[] groupIds,
108                    java.lang.String structureId, java.lang.String name,
109                    java.lang.String description, boolean andOperator)
110                    throws com.liferay.portal.kernel.exception.SystemException {
111                    return getService()
112                                       .searchCount(companyId, groupIds, structureId, name,
113                            description, andOperator);
114            }
115    
116            public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
117                    long groupId, java.lang.String structureId,
118                    java.lang.String parentStructureId, java.lang.String name,
119                    java.lang.String description, java.lang.String xsd,
120                    com.liferay.portal.service.ServiceContext serviceContext)
121                    throws com.liferay.portal.kernel.exception.PortalException,
122                            com.liferay.portal.kernel.exception.SystemException {
123                    return getService()
124                                       .updateStructure(groupId, structureId, parentStructureId,
125                            name, description, xsd, serviceContext);
126            }
127    
128            public static JournalStructureService getService() {
129                    if (_service == null) {
130                            _service = (JournalStructureService)PortalBeanLocatorUtil.locate(JournalStructureService.class.getName());
131    
132                            ReferenceRegistry.registerReference(JournalStructureServiceUtil.class,
133                                    "_service");
134                            MethodCache.remove(JournalStructureService.class);
135                    }
136    
137                    return _service;
138            }
139    
140            public void setService(JournalStructureService service) {
141                    MethodCache.remove(JournalStructureService.class);
142    
143                    _service = service;
144    
145                    ReferenceRegistry.registerReference(JournalStructureServiceUtil.class,
146                            "_service");
147                    MethodCache.remove(JournalStructureService.class);
148            }
149    
150            private static JournalStructureService _service;
151    }