001    /**
002     * Copyright (c) 2000-2012 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.jndi.pacl;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import java.util.Hashtable;
021    
022    import javax.naming.spi.InitialContextFactory;
023    import javax.naming.spi.InitialContextFactoryBuilder;
024    
025    /**
026     * @author Brian Wing Shun Chan
027     */
028    public class PACLInitialContextFactoryBuilder
029            implements InitialContextFactoryBuilder {
030    
031            public InitialContextFactory createInitialContextFactory(
032                    Hashtable<?, ?> environment) {
033    
034                    if (_log.isDebugEnabled()) {
035                            _log.debug("Creating " + PACLInitialContextFactory.class.getName());
036                    }
037    
038                    return new PACLInitialContextFactory(
039                            _initialContextFactoryBuilder, environment);
040            }
041    
042            public void setInitialContextFactoryBuilder(
043                    InitialContextFactoryBuilder initialContextFactoryBuilder) {
044    
045                    _initialContextFactoryBuilder = initialContextFactoryBuilder;
046            }
047    
048            private static Log _log = LogFactoryUtil.getLog(
049                    PACLInitialContextFactoryBuilder.class.getName());
050    
051            private InitialContextFactoryBuilder _initialContextFactoryBuilder;
052    
053    }