001    /**
002     * Copyright (c) 2000-2011 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.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    }