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.journal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link JournalStructureService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       JournalStructureService
030     * @generated
031     */
032    public class JournalStructureServiceUtil {
033            public static com.liferay.portlet.journal.model.JournalStructure addStructure(
034                    long groupId, java.lang.String structureId, boolean autoStructureId,
035                    java.lang.String parentStructureId, java.lang.String name,
036                    java.lang.String description, java.lang.String xsd,
037                    com.liferay.portal.service.ServiceContext serviceContext)
038                    throws com.liferay.portal.kernel.exception.PortalException,
039                            com.liferay.portal.kernel.exception.SystemException {
040                    return getService()
041                                       .addStructure(groupId, structureId, autoStructureId,
042                            parentStructureId, name, description, xsd, serviceContext);
043            }
044    
045            public static com.liferay.portlet.journal.model.JournalStructure copyStructure(
046                    long groupId, java.lang.String oldStructureId,
047                    java.lang.String newStructureId, boolean autoStructureId)
048                    throws com.liferay.portal.kernel.exception.PortalException,
049                            com.liferay.portal.kernel.exception.SystemException {
050                    return getService()
051                                       .copyStructure(groupId, oldStructureId, newStructureId,
052                            autoStructureId);
053            }
054    
055            public static void deleteStructure(long groupId,
056                    java.lang.String structureId)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    getService().deleteStructure(groupId, structureId);
060            }
061    
062            public static com.liferay.portlet.journal.model.JournalStructure getStructure(
063                    long groupId, java.lang.String structureId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService().getStructure(groupId, structureId);
067            }
068    
069            public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
070                    long groupId, java.lang.String structureId,
071                    java.lang.String parentStructureId, java.lang.String name,
072                    java.lang.String description, java.lang.String xsd,
073                    com.liferay.portal.service.ServiceContext serviceContext)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .updateStructure(groupId, structureId, parentStructureId,
078                            name, description, xsd, serviceContext);
079            }
080    
081            public static JournalStructureService getService() {
082                    if (_service == null) {
083                            _service = (JournalStructureService)PortalBeanLocatorUtil.locate(JournalStructureService.class.getName());
084                    }
085    
086                    return _service;
087            }
088    
089            public void setService(JournalStructureService service) {
090                    _service = service;
091            }
092    
093            private static JournalStructureService _service;
094    }