Package org.apache.jackrabbit.core.security.principal

Examples of org.apache.jackrabbit.core.security.principal.PrincipalProvider


        public PrincipalProvider getDefault() {
            return defaultPrincipalProvider;
        }

        public PrincipalProvider getProvider(String className) {
            PrincipalProvider p = getPrincipalProviderRegistry().getProvider(className);
            if (p == null && defaultPrincipalProvider.getClass().getName().equals(className)) {
                p = defaultPrincipalProvider;
            }
            return p;
        }
View Full Code Here


        }
        workspaceAccessManager.init(this.systemSession);

        // initialize principal-provider registry
        // 1) create default
        PrincipalProvider defaultPP = createDefaultPrincipalProvider(moduleConfig);
        // 2) create registry instance
        principalProviderRegistry = new ProviderRegistryImpl(defaultPP);
        // 3) register all configured principal providers.
        for (Properties props : moduleConfig) {
            principalProviderRegistry.registerProvider(props);
View Full Code Here

     * @return An new instance of <code>DefaultPrincipalProvider</code>.
     * @throws RepositoryException If an error occurs.
     */
    protected PrincipalProvider createDefaultPrincipalProvider(Properties[] moduleConfig) throws RepositoryException {
        boolean initialized = false;
        PrincipalProvider defaultPP = new DefaultPrincipalProvider(this.systemSession, (UserManagerImpl) systemUserManager);
        for (Properties props : moduleConfig) {
            //GRANITE-4470: apply config to DefaultPrincipalProvider if there is no explicit PrincipalProvider configured
            if (!props.containsKey(LoginModuleConfig.PARAM_PRINCIPAL_PROVIDER_CLASS) && props.containsKey(AbstractPrincipalProvider.MAXSIZE_KEY)) {
                defaultPP.init(props);
                initialized = true;
                break;
            }
        }
        if (!initialized) {
            defaultPP.init(new Properties());
        }
        return defaultPP;
    }
View Full Code Here

        }
        workspaceAccessManager.init(this.systemSession);

        // initialize principal-provider registry
        // 1) create default
        PrincipalProvider defaultPP = createDefaultPrincipalProvider();
        // 2) create registry instance
        principalProviderRegistry = new ProviderRegistryImpl(defaultPP);
        // 3) register all configured principal providers.
        for (Properties props : moduleConfig) {
            principalProviderRegistry.registerProvider(props);
View Full Code Here

     *
     * @return An new instance of <code>DefaultPrincipalProvider</code>.
     * @throws RepositoryException If an error occurs.
     */
    protected PrincipalProvider createDefaultPrincipalProvider() throws RepositoryException {
        PrincipalProvider defaultPP = new DefaultPrincipalProvider(this.systemSession, (UserManagerImpl) systemUserManager);
        defaultPP.init(new Properties());
        return defaultPP;
    }
View Full Code Here

            anonymID = SecurityConstants.ANONYMOUS_ID;
        }

        // most simple principal provider registry, that does not read anything
        // from configuration
        PrincipalProvider principalProvider = new SimplePrincipalProvider();
        // skip init of provider (nop)
        principalProviderRegistry = new ProviderRegistryImpl(principalProvider);
        // register all configured principal providers.
        for (int i = 0; i < moduleConfig.length; i++) {
            principalProviderRegistry.registerProvider(moduleConfig[i]);
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.security.principal.PrincipalProvider

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.