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.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                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    return getService().copyStructure(structureId, serviceContext);
059            }
060    
061            public static void deleteStructure(long structureId)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    getService().deleteStructure(structureId);
065            }
066    
067            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
068                    long groupId, java.lang.String structureKey)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    return getService().fetchStructure(groupId, structureKey);
072            }
073    
074            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
075                    long structureId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService().getStructure(structureId);
079            }
080    
081            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
082                    long structureId,
083                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
084                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
085                    java.lang.String xsd,
086                    com.liferay.portal.service.ServiceContext serviceContext)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService()
090                                       .updateStructure(structureId, nameMap, descriptionMap, xsd,
091                            serviceContext);
092            }
093    
094            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
095                    long groupId, java.lang.String structureKey,
096                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
097                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
098                    java.lang.String xsd,
099                    com.liferay.portal.service.ServiceContext serviceContext)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException {
102                    return getService()
103                                       .updateStructure(groupId, structureKey, nameMap,
104                            descriptionMap, xsd, serviceContext);
105            }
106    
107            public static DDMStructureService getService() {
108                    if (_service == null) {
109                            _service = (DDMStructureService)PortalBeanLocatorUtil.locate(DDMStructureService.class.getName());
110    
111                            ReferenceRegistry.registerReference(DDMStructureServiceUtil.class,
112                                    "_service");
113                            MethodCache.remove(DDMStructureService.class);
114                    }
115    
116                    return _service;
117            }
118    
119            public void setService(DDMStructureService service) {
120                    MethodCache.remove(DDMStructureService.class);
121    
122                    _service = service;
123    
124                    ReferenceRegistry.registerReference(DDMStructureServiceUtil.class,
125                            "_service");
126                    MethodCache.remove(DDMStructureService.class);
127            }
128    
129            private static DDMStructureService _service;
130    }