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