001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
034 public class RepositoryServiceUtil {
035
040
041
046 public static java.lang.String getBeanIdentifier() {
047 return getService().getBeanIdentifier();
048 }
049
050
055 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056 getService().setBeanIdentifier(beanIdentifier);
057 }
058
059 public static com.liferay.portal.model.Repository addRepository(
060 long groupId, long classNameId, long parentFolderId,
061 java.lang.String name, java.lang.String description,
062 java.lang.String portletId,
063 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
064 com.liferay.portal.service.ServiceContext serviceContext)
065 throws com.liferay.portal.kernel.exception.PortalException,
066 com.liferay.portal.kernel.exception.SystemException {
067 return getService()
068 .addRepository(groupId, classNameId, parentFolderId, name,
069 description, portletId, typeSettingsProperties, serviceContext);
070 }
071
072 public static void checkRepository(long repositoryId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().checkRepository(repositoryId);
076 }
077
078 public static void deleteRepository(long repositoryId)
079 throws com.liferay.portal.kernel.exception.PortalException,
080 com.liferay.portal.kernel.exception.SystemException {
081 getService().deleteRepository(repositoryId);
082 }
083
084 public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
085 long repositoryId)
086 throws com.liferay.portal.kernel.exception.PortalException,
087 com.liferay.portal.kernel.exception.SystemException {
088 return getService().getLocalRepositoryImpl(repositoryId);
089 }
090
091 public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
092 long folderId, long fileEntryId, long fileVersionId)
093 throws com.liferay.portal.kernel.exception.PortalException,
094 com.liferay.portal.kernel.exception.SystemException {
095 return getService()
096 .getLocalRepositoryImpl(folderId, fileEntryId, fileVersionId);
097 }
098
099 public static com.liferay.portal.model.Repository getRepository(
100 long repositoryId)
101 throws com.liferay.portal.kernel.exception.PortalException,
102 com.liferay.portal.kernel.exception.SystemException {
103 return getService().getRepository(repositoryId);
104 }
105
106 public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
107 long repositoryId)
108 throws com.liferay.portal.kernel.exception.PortalException,
109 com.liferay.portal.kernel.exception.SystemException {
110 return getService().getRepositoryImpl(repositoryId);
111 }
112
113 public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
114 long folderId, long fileEntryId, long fileVersionId)
115 throws com.liferay.portal.kernel.exception.PortalException,
116 com.liferay.portal.kernel.exception.SystemException {
117 return getService()
118 .getRepositoryImpl(folderId, fileEntryId, fileVersionId);
119 }
120
121 public static java.lang.String[] getSupportedConfigurations(
122 long classNameId)
123 throws com.liferay.portal.kernel.exception.SystemException {
124 return getService().getSupportedConfigurations(classNameId);
125 }
126
127 public static java.lang.String[] getSupportedParameters(long classNameId,
128 java.lang.String configuration)
129 throws com.liferay.portal.kernel.exception.SystemException {
130 return getService().getSupportedParameters(classNameId, configuration);
131 }
132
133 public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
134 long repositoryId)
135 throws com.liferay.portal.kernel.exception.PortalException,
136 com.liferay.portal.kernel.exception.SystemException {
137 return getService().getTypeSettingsProperties(repositoryId);
138 }
139
140 public static void updateRepository(long repositoryId,
141 java.lang.String name, java.lang.String description)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException {
144 getService().updateRepository(repositoryId, name, description);
145 }
146
147 public static RepositoryService getService() {
148 if (_service == null) {
149 _service = (RepositoryService)PortalBeanLocatorUtil.locate(RepositoryService.class.getName());
150
151 ReferenceRegistry.registerReference(RepositoryServiceUtil.class,
152 "_service");
153 }
154
155 return _service;
156 }
157
158
161 public void setService(RepositoryService service) {
162 }
163
164 private static RepositoryService _service;
165 }