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