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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for Repository. This utility wraps
024     * {@link com.liferay.portal.service.impl.RepositoryServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see RepositoryService
032     * @see com.liferay.portal.service.base.RepositoryServiceBaseImpl
033     * @see com.liferay.portal.service.impl.RepositoryServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class RepositoryServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            public static com.liferay.portal.model.Repository addRepository(
063                    long groupId, long classNameId, long parentFolderId,
064                    java.lang.String name, java.lang.String description,
065                    java.lang.String portletId,
066                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    return getService()
071                                       .addRepository(groupId, classNameId, parentFolderId, name,
072                            description, portletId, typeSettingsProperties, serviceContext);
073            }
074    
075            public static void checkRepository(long repositoryId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    getService().checkRepository(repositoryId);
079            }
080    
081            public static void deleteRepository(long repositoryId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    getService().deleteRepository(repositoryId);
085            }
086    
087            public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
088                    long repositoryId)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService().getLocalRepositoryImpl(repositoryId);
092            }
093    
094            public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
095                    long folderId, long fileEntryId, long fileVersionId)
096                    throws com.liferay.portal.kernel.exception.PortalException,
097                            com.liferay.portal.kernel.exception.SystemException {
098                    return getService()
099                                       .getLocalRepositoryImpl(folderId, fileEntryId, fileVersionId);
100            }
101    
102            public static com.liferay.portal.model.Repository getRepository(
103                    long repositoryId)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException {
106                    return getService().getRepository(repositoryId);
107            }
108    
109            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
110                    long repositoryId)
111                    throws com.liferay.portal.kernel.exception.PortalException,
112                            com.liferay.portal.kernel.exception.SystemException {
113                    return getService().getRepositoryImpl(repositoryId);
114            }
115    
116            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
117                    long folderId, long fileEntryId, long fileVersionId)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException {
120                    return getService()
121                                       .getRepositoryImpl(folderId, fileEntryId, fileVersionId);
122            }
123    
124            public static java.lang.String[] getSupportedConfigurations(
125                    long classNameId)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().getSupportedConfigurations(classNameId);
128            }
129    
130            public static java.lang.String[] getSupportedParameters(long classNameId,
131                    java.lang.String configuration)
132                    throws com.liferay.portal.kernel.exception.SystemException {
133                    return getService().getSupportedParameters(classNameId, configuration);
134            }
135    
136            public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
137                    long repositoryId)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    return getService().getTypeSettingsProperties(repositoryId);
141            }
142    
143            public static void updateRepository(long repositoryId,
144                    java.lang.String name, java.lang.String description)
145                    throws com.liferay.portal.kernel.exception.PortalException,
146                            com.liferay.portal.kernel.exception.SystemException {
147                    getService().updateRepository(repositoryId, name, description);
148            }
149    
150            public static RepositoryService getService() {
151                    if (_service == null) {
152                            _service = (RepositoryService)PortalBeanLocatorUtil.locate(RepositoryService.class.getName());
153    
154                            ReferenceRegistry.registerReference(RepositoryServiceUtil.class,
155                                    "_service");
156                    }
157    
158                    return _service;
159            }
160    
161            /**
162             * @deprecated As of 6.2.0
163             */
164            public void setService(RepositoryService service) {
165            }
166    
167            private static RepositoryService _service;
168    }