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.dynamicdatamapping.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 d d m structure remote service. This utility wraps {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl} 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 DDMStructureService
030     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMStructureServiceBaseImpl
031     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl
032     * @generated
033     */
034    public class DDMStructureServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
041                    long groupId, long classNameId, java.lang.String structureKey,
042                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
043                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
044                    java.lang.String xsd, java.lang.String storageType, int type,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    return getService()
049                                       .addStructure(groupId, classNameId, structureKey, nameMap,
050                            descriptionMap, xsd, storageType, type, serviceContext);
051            }
052    
053            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
054                    long structureId,
055                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
056                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException,
059                            com.liferay.portal.kernel.exception.SystemException {
060                    return getService()
061                                       .copyStructure(structureId, nameMap, descriptionMap,
062                            serviceContext);
063            }
064    
065            public static void deleteStructure(long structureId)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    getService().deleteStructure(structureId);
069            }
070    
071            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
072                    long groupId, java.lang.String structureKey)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService().fetchStructure(groupId, structureKey);
076            }
077    
078            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
079                    long structureId)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    return getService().getStructure(structureId);
083            }
084    
085            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
086                    long structureId,
087                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
088                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
089                    java.lang.String xsd,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    return getService()
094                                       .updateStructure(structureId, nameMap, descriptionMap, xsd,
095                            serviceContext);
096            }
097    
098            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
099                    long groupId, java.lang.String structureKey,
100                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
101                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
102                    java.lang.String xsd,
103                    com.liferay.portal.service.ServiceContext serviceContext)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException {
106                    return getService()
107                                       .updateStructure(groupId, structureKey, nameMap,
108                            descriptionMap, xsd, serviceContext);
109            }
110    
111            public static DDMStructureService getService() {
112                    if (_service == null) {
113                            _service = (DDMStructureService)PortalBeanLocatorUtil.locate(DDMStructureService.class.getName());
114    
115                            ReferenceRegistry.registerReference(DDMStructureServiceUtil.class,
116                                    "_service");
117                            MethodCache.remove(DDMStructureService.class);
118                    }
119    
120                    return _service;
121            }
122    
123            public void setService(DDMStructureService service) {
124                    MethodCache.remove(DDMStructureService.class);
125    
126                    _service = service;
127    
128                    ReferenceRegistry.registerReference(DDMStructureServiceUtil.class,
129                            "_service");
130                    MethodCache.remove(DDMStructureService.class);
131            }
132    
133            private static DDMStructureService _service;
134    }