1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.journal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="JournalStructureServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link JournalStructureService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       JournalStructureService
37   * @generated
38   */
39  public class JournalStructureServiceUtil {
40      public static com.liferay.portlet.journal.model.JournalStructure addStructure(
41          java.lang.String structureId, boolean autoStructureId, long plid,
42          java.lang.String name, java.lang.String description,
43          java.lang.String xsd, boolean addCommunityPermissions,
44          boolean addGuestPermissions)
45          throws com.liferay.portal.PortalException,
46              com.liferay.portal.SystemException, java.rmi.RemoteException {
47          return getService()
48                     .addStructure(structureId, autoStructureId, plid, name,
49              description, xsd, addCommunityPermissions, addGuestPermissions);
50      }
51  
52      public static com.liferay.portlet.journal.model.JournalStructure addStructure(
53          java.lang.String structureId, boolean autoStructureId, long plid,
54          java.lang.String name, java.lang.String description,
55          java.lang.String xsd, java.lang.String[] communityPermissions,
56          java.lang.String[] guestPermissions)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException, java.rmi.RemoteException {
59          return getService()
60                     .addStructure(structureId, autoStructureId, plid, name,
61              description, xsd, communityPermissions, guestPermissions);
62      }
63  
64      public static com.liferay.portlet.journal.model.JournalStructure copyStructure(
65          long groupId, java.lang.String oldStructureId,
66          java.lang.String newStructureId, boolean autoStructureId)
67          throws com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException, java.rmi.RemoteException {
69          return getService()
70                     .copyStructure(groupId, oldStructureId, newStructureId,
71              autoStructureId);
72      }
73  
74      public static void deleteStructure(long groupId,
75          java.lang.String structureId)
76          throws com.liferay.portal.PortalException,
77              com.liferay.portal.SystemException, java.rmi.RemoteException {
78          getService().deleteStructure(groupId, structureId);
79      }
80  
81      public static com.liferay.portlet.journal.model.JournalStructure getStructure(
82          long groupId, java.lang.String structureId)
83          throws com.liferay.portal.PortalException,
84              com.liferay.portal.SystemException, java.rmi.RemoteException {
85          return getService().getStructure(groupId, structureId);
86      }
87  
88      public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
89          long groupId, java.lang.String structureId, java.lang.String name,
90          java.lang.String description, java.lang.String xsd)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException, java.rmi.RemoteException {
93          return getService()
94                     .updateStructure(groupId, structureId, name, description, xsd);
95      }
96  
97      public static JournalStructureService getService() {
98          if (_service == null) {
99              _service = (JournalStructureService)PortalBeanLocatorUtil.locate(JournalStructureService.class.getName());
100         }
101 
102         return _service;
103     }
104 
105     public void setService(JournalStructureService service) {
106         _service = service;
107     }
108 
109     private static JournalStructureService _service;
110 }