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     * Provides the remote service utility for Repository. This utility wraps
022     * {@link com.liferay.portal.service.impl.RepositoryServiceImpl} and is the
023     * primary access point for service operations in application layer code running
024     * on a remote server. Methods of this service are expected to have security
025     * checks based on the propagated JAAS credentials because this service can be
026     * accessed remotely.
027     *
028     * @author Brian Wing Shun Chan
029     * @see RepositoryService
030     * @see com.liferay.portal.service.base.RepositoryServiceBaseImpl
031     * @see com.liferay.portal.service.impl.RepositoryServiceImpl
032     * @generated
033     */
034    public class RepositoryServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Returns the Spring bean ID for this bean.
043            *
044            * @return the Spring bean ID for this bean
045            */
046            public static java.lang.String getBeanIdentifier() {
047                    return getService().getBeanIdentifier();
048            }
049    
050            /**
051            * Sets the Spring bean ID for this bean.
052            *
053            * @param beanIdentifier the Spring bean ID for this bean
054            */
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            /**
159             * @deprecated As of 6.2.0
160             */
161            public void setService(RepositoryService service) {
162            }
163    
164            private static RepositoryService _service;
165    }