001    /**
002     * Copyright (c) 2000-2012 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.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the c m i s repository local service. This utility wraps {@link com.liferay.portal.service.impl.CMISRepositoryLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see CMISRepositoryLocalService
030     * @see com.liferay.portal.service.base.CMISRepositoryLocalServiceBaseImpl
031     * @see com.liferay.portal.service.impl.CMISRepositoryLocalServiceImpl
032     * @generated
033     */
034    public class CMISRepositoryLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.CMISRepositoryLocalServiceImpl} 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 java.lang.Object getSession(long repositoryId)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().getSession(repositoryId);
063            }
064    
065            public static com.liferay.portal.kernel.repository.model.FileEntry toFileEntry(
066                    long repositoryId, java.lang.Object object)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService().toFileEntry(repositoryId, object);
070            }
071    
072            public static com.liferay.portal.kernel.repository.model.FileVersion toFileVersion(
073                    long repositoryId, java.lang.Object object)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().toFileVersion(repositoryId, object);
077            }
078    
079            public static com.liferay.portal.kernel.repository.model.Folder toFolder(
080                    long repositoryId, java.lang.Object object)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    return getService().toFolder(repositoryId, object);
084            }
085    
086            public static CMISRepositoryLocalService getService() {
087                    if (_service == null) {
088                            _service = (CMISRepositoryLocalService)PortalBeanLocatorUtil.locate(CMISRepositoryLocalService.class.getName());
089    
090                            ReferenceRegistry.registerReference(CMISRepositoryLocalServiceUtil.class,
091                                    "_service");
092                            MethodCache.remove(CMISRepositoryLocalService.class);
093                    }
094    
095                    return _service;
096            }
097    
098            public void setService(CMISRepositoryLocalService service) {
099                    MethodCache.remove(CMISRepositoryLocalService.class);
100    
101                    _service = service;
102    
103                    ReferenceRegistry.registerReference(CMISRepositoryLocalServiceUtil.class,
104                            "_service");
105                    MethodCache.remove(CMISRepositoryLocalService.class);
106            }
107    
108            private static CMISRepositoryLocalService _service;
109    }