001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
021     * The utility for the repository remote service. This utility wraps {@link com.liferay.portal.service.impl.RepositoryServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
022     *
023     * <p>
024     * 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.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see RepositoryService
029     * @see com.liferay.portal.service.base.RepositoryServiceBaseImpl
030     * @see com.liferay.portal.service.impl.RepositoryServiceImpl
031     * @generated
032     */
033    public class RepositoryServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            public static com.liferay.portal.model.Repository addRepository(
059                    long groupId, long classNameId, long parentFolderId,
060                    java.lang.String name, java.lang.String description,
061                    java.lang.String portletId,
062                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService()
067                                       .addRepository(groupId, classNameId, parentFolderId, name,
068                            description, portletId, typeSettingsProperties, serviceContext);
069            }
070    
071            public static void checkRepository(long repositoryId)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    getService().checkRepository(repositoryId);
075            }
076    
077            public static void deleteRepository(long repositoryId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    getService().deleteRepository(repositoryId);
081            }
082    
083            public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
084                    long repositoryId)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService().getLocalRepositoryImpl(repositoryId);
088            }
089    
090            public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
091                    long folderId, long fileEntryId, long fileVersionId)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    return getService()
095                                       .getLocalRepositoryImpl(folderId, fileEntryId, fileVersionId);
096            }
097    
098            public static com.liferay.portal.model.Repository getRepository(
099                    long repositoryId)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException {
102                    return getService().getRepository(repositoryId);
103            }
104    
105            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
106                    long repositoryId)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    return getService().getRepositoryImpl(repositoryId);
110            }
111    
112            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
113                    long folderId, long fileEntryId, long fileVersionId)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    return getService()
117                                       .getRepositoryImpl(folderId, fileEntryId, fileVersionId);
118            }
119    
120            public static java.lang.String[] getSupportedConfigurations(
121                    long classNameId)
122                    throws com.liferay.portal.kernel.exception.SystemException {
123                    return getService().getSupportedConfigurations(classNameId);
124            }
125    
126            public static java.lang.String[] getSupportedParameters(long classNameId,
127                    java.lang.String configuration)
128                    throws com.liferay.portal.kernel.exception.SystemException {
129                    return getService().getSupportedParameters(classNameId, configuration);
130            }
131    
132            public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
133                    long repositoryId)
134                    throws com.liferay.portal.kernel.exception.PortalException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    return getService().getTypeSettingsProperties(repositoryId);
137            }
138    
139            public static void updateRepository(long repositoryId,
140                    java.lang.String name, java.lang.String description)
141                    throws com.liferay.portal.kernel.exception.PortalException,
142                            com.liferay.portal.kernel.exception.SystemException {
143                    getService().updateRepository(repositoryId, name, description);
144            }
145    
146            public static RepositoryService getService() {
147                    if (_service == null) {
148                            _service = (RepositoryService)PortalBeanLocatorUtil.locate(RepositoryService.class.getName());
149    
150                            ReferenceRegistry.registerReference(RepositoryServiceUtil.class,
151                                    "_service");
152                    }
153    
154                    return _service;
155            }
156    
157            /**
158             * @deprecated As of 6.2.0
159             */
160            public void setService(RepositoryService service) {
161            }
162    
163            private static RepositoryService _service;
164    }