Package org.apache.jackrabbit.core.config

Examples of org.apache.jackrabbit.core.config.BeanConfig


        }else{
            //No support so far from OSGi so would use default logic used by Jackrabbit
            //to construct the LoginModule
            Properties p = new Properties();
            p.putAll(options);
            BeanConfig bc = new BeanConfig(delegateLoginModuleClass,p);
            LoginModuleConfig lmc = new LoginModuleConfig(bc);
            try {
                delegate = lmc.getLoginModule();
                delegate.initialize(subject,callbackHandler,sharedState,options);
                logger.info("No JAAS Configuration provider found would be directly invoking LoginModule {}",delegateLoginModuleClass);
View Full Code Here


            throws RepositoryException {
        String workspaceName = systemSession.getWorkspace().getName();
        AccessControlProvider prov;
        Map props;
        if (config != null && config.getAccessControlProviderConfig() != null) {
            BeanConfig bc = config.getAccessControlProviderConfig();
            prov = (AccessControlProvider) bc.newInstance();
            props = bc.getParameters();
        } else {
            log.debug("No ac-provider configuration for workspace " + workspaceName + " -> using defaults.");
            if (workspaceName.equals(secWorkspaceName) && !workspaceName.equals(defaultWorkspaceName)) {
                // UserAccessControlProvider is designed to work with an extra
                // workspace storing user and groups. therefore avoid returning
View Full Code Here

     * @param records memory journal's list of records
     */
    private ClusterNode createClusterNode(String id, ArrayList records)
            throws ClusterException {

        BeanConfig bc = new BeanConfig(MemoryJournal.class.getName(), new Properties());
        JournalConfig jc = new JournalConfig(bc);
        ClusterConfig cc = new ClusterConfig(id, SYNC_DELAY, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        ClusterNode clusterNode = new ClusterNode();
View Full Code Here

     * @param records memory journal's list of records
     */
    private ClusterNode createClusterNode(String id, ArrayList records)
            throws ClusterException {

        BeanConfig bc = new BeanConfig(MemoryJournal.class.getName(), new Properties());
        JournalConfig jc = new JournalConfig(bc);
        ClusterConfig cc = new ClusterConfig(id, SYNC_DELAY, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        ClusterNode clusterNode = new ClusterNode();
View Full Code Here

     * @param session session
     * @return user manager
     * @throws RepositoryException if an error occurs
     */
    protected UserManagerImpl createUserManager(SessionImpl session) throws RepositoryException {
        BeanConfig umc = repository.getConfig().getSecurityConfig().getSecurityManagerConfig().getUserManagerConfig();
        Properties config = null;
        if (umc != null) {
            // TODO: deal with other user manager implementations.
            String clName = umc.getClassName();
            if (clName != null && !(UserManagerImpl.class.getName().equals(clName) || clName.length() == 0)) {
                log.warn("Unsupported custom UserManager implementation: '" + clName + "' -> Ignored.");
            }
            config = umc.getParameters();
        }
        return new UserManagerImpl(session, adminId, config);
    }
View Full Code Here

            throws RepositoryException {
        String workspaceName = systemSession.getWorkspace().getName();
        AccessControlProvider prov;
        Map props;
        if (config != null && config.getAccessControlProviderConfig() != null) {
            BeanConfig bc = config.getAccessControlProviderConfig();
            prov = bc.newInstance(AccessControlProvider.class);
            props = bc.getParameters();
        } else {
            log.debug("No ac-provider configuration for workspace " + workspaceName + " -> using defaults.");
            if (workspaceName.equals(secWorkspaceName) && !workspaceName.equals(defaultWorkspaceName)) {
                // UserAccessControlProvider is designed to work with an extra
                // workspace storing user and groups. therefore avoid returning
View Full Code Here

    public BeanConf(BeanConf config) {
        this(config.getClassName(), config.getParameters());
    }
   
  public BeanConfig createBeanConfig(Variables variables) throws ConfException {
    return new BeanConfig(getClassName(), variables.replaceVariables(getParameters()));
  }
View Full Code Here

     * @param session session
     * @return user manager
     * @throws RepositoryException if an error occurs
     */
    protected UserManagerImpl createUserManager(SessionImpl session) throws RepositoryException {
        BeanConfig umc = repository.getConfig().getSecurityConfig().getSecurityManagerConfig().getUserManagerConfig();
        Properties config = null;
        if (umc != null) {
            // TODO: deal with other user manager implementations.
            String clName = umc.getClassName();
            if (clName != null && !(UserManagerImpl.class.getName().equals(clName) || clName.length() == 0)) {
                log.warn("Unsupported custom UserManager implementation: '" + clName + "' -> Ignored.");
            }
            config = umc.getParameters();
        }
        return new UserManagerImpl(session, adminId, config);
    }
View Full Code Here

            throws RepositoryException {
        String workspaceName = systemSession.getWorkspace().getName();
        AccessControlProvider prov;
        Map props;
        if (config != null && config.getAccessControlProviderConfig() != null) {
            BeanConfig bc = config.getAccessControlProviderConfig();
            prov = (AccessControlProvider) bc.newInstance();
            props = bc.getParameters();
        } else {
            log.debug("No ac-provider configuration for workspace " + workspaceName + " -> using defaults.");
            if (workspaceName.equals(secWorkspaceName) && !workspaceName.equals(defaultWorkspaceName)) {
                // UserAccessControlProvider is designed to work with an extra
                // workspace storing user and groups. therefore avoid returning
View Full Code Here

     * will be persisted.
     *
     * @throws Exception
     */
    public void testClusterIdGeneration() throws Exception {
        BeanConfig bc = new BeanConfig(MemoryJournal.class.getName(), new Properties());
        JournalConfig jc = new JournalConfig(bc);
        ClusterConfig cc = new ClusterConfig(null, 0, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc, repositoryHome);

        ClusterNode clusterNode = new ClusterNode();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.config.BeanConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.