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