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, 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 }