001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.jcr;
016    
017    import com.liferay.portal.kernel.util.PropsKeys;
018    import com.liferay.portal.util.PropsUtil;
019    
020    import javax.jcr.RepositoryException;
021    import javax.jcr.Session;
022    
023    /**
024     * @author Michael Young
025     */
026    public interface JCRFactory {
027    
028            public static final String WORKSPACE_NAME =
029                    PropsUtil.get(PropsKeys.JCR_WORKSPACE_NAME);
030    
031            public static final String NODE_DOCUMENTLIBRARY =
032                    PropsUtil.get(PropsKeys.JCR_NODE_DOCUMENTLIBRARY);
033    
034            public Session createSession(String workspaceName)
035                    throws RepositoryException;
036    
037            public void initialize() throws RepositoryException;
038    
039            public void prepare() throws RepositoryException;
040    
041            public void shutdown();
042    
043    }