Package org.apache.jackrabbit.core.config

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


        // init default ac-provider-factory
        acProviderFactory = new AccessControlProviderFactoryImpl();
        acProviderFactory.init(this.systemSession);

        // create the workspace access manager
        SecurityManagerConfig smc = config.getSecurityManagerConfig();
        if (smc != null && smc.getWorkspaceAccessConfig() != null) {
            workspaceAccessManager = (WorkspaceAccessManager) smc.getWorkspaceAccessConfig().newInstance();
        } else {
            // fallback -> the default implementation
            log.debug("No WorkspaceAccessManager configured; using default.");
            workspaceAccessManager = createDefaultWorkspaceAccessManager();
        }
View Full Code Here


     */
    protected synchronized JackrabbitSecurityManager getSecurityManager()
            throws RepositoryException {

        if (securityMgr == null) {
            SecurityManagerConfig smc = getConfig().getSecurityConfig().getSecurityManagerConfig();
            String workspaceName = getConfig().getDefaultWorkspaceName();
            if (smc != null && smc.getWorkspaceName() != null) {
                workspaceName = smc.getWorkspaceName();
            }
            SystemSession securitySession = getSystemSession(workspaceName);
            // mark system session as 'active' for that the system workspace does
            // not get disposed by workspace-janitor
            onSessionCreated(securitySession);

            if (smc == null) {
                log.debug("No configuration entry for SecurityManager. Using org.apache.jackrabbit.core.security.simple.SimpleSecurityManager");
                securityMgr = new SimpleSecurityManager();
            } else {
                securityMgr = (JackrabbitSecurityManager) smc.newInstance();
            }

            securityMgr.init(this, securitySession);
            log.info("SecurityManager = " + securityMgr.getClass());
        }
View Full Code Here

     * @throws RepositoryException if an error occurs
     */
    protected void initStartupWorkspaces() throws RepositoryException {
        String wspName = repConfig.getDefaultWorkspaceName();
        String secWspName = null;
        SecurityManagerConfig smc = repConfig.getSecurityConfig().getSecurityManagerConfig();
        if (smc != null) {
           secWspName = smc.getWorkspaceName();
        }
        try {
            (wspInfos.get(wspName)).initialize();
            if (secWspName != null && !wspInfos.containsKey(secWspName)) {
                createWorkspace(secWspName);
View Full Code Here

        // register all configured principal providers.
        for (Properties aModuleConfig : moduleConfig) {
            principalProviderRegistry.registerProvider(aModuleConfig);
        }

        SecurityManagerConfig smc = config.getSecurityManagerConfig();
        if (smc != null && smc.getWorkspaceAccessConfig() != null) {
            workspaceAccessManager = (WorkspaceAccessManager) smc.getWorkspaceAccessConfig().newInstance();
        } else {
            // fallback -> the default simple implementation
            log.debug("No WorkspaceAccessManager configured; using default.");
            workspaceAccessManager = new SimpleWorkspaceAccessManager();
        }
View Full Code Here

     */
    protected synchronized JackrabbitSecurityManager getSecurityManager()
            throws RepositoryException {

        if (securityMgr == null) {
            SecurityManagerConfig smc = getConfig().getSecurityConfig().getSecurityManagerConfig();
            String workspaceName = getConfig().getDefaultWorkspaceName();
            if (smc != null && smc.getWorkspaceName() != null) {
                workspaceName = smc.getWorkspaceName();
            }
            SystemSession securitySession = getSystemSession(workspaceName);
            // mark system session as 'active' for that the system workspace does
            // not get disposed by workspace-janitor
            onSessionCreated(securitySession);

            if (smc == null) {
                log.debug("No configuration entry for SecurityManager. Using org.apache.jackrabbit.core.security.simple.SimpleSecurityManager");
                securityMgr = new SimpleSecurityManager();
            } else {
                securityMgr = smc.newInstance(JackrabbitSecurityManager.class);
            }

            securityMgr.init(this, securitySession);
            log.info("SecurityManager = " + securityMgr.getClass());
        }
View Full Code Here

     * @throws RepositoryException if an error occurs
     */
    protected void initStartupWorkspaces() throws RepositoryException {
        String wspName = repConfig.getDefaultWorkspaceName();
        String secWspName = null;
        SecurityManagerConfig smc = repConfig.getSecurityConfig().getSecurityManagerConfig();
        if (smc != null) {
           secWspName = smc.getWorkspaceName();
        }
        try {
            (wspInfos.get(wspName)).initialize();
            if (secWspName != null && !wspInfos.containsKey(secWspName)) {
                createWorkspace(secWspName);
View Full Code Here

        // init default ac-provider-factory
        acProviderFactory = new AccessControlProviderFactoryImpl();
        acProviderFactory.init(this.systemSession);

        // create the workspace access manager
        SecurityManagerConfig smc = config.getSecurityManagerConfig();
        if (smc != null && smc.getWorkspaceAccessConfig() != null) {
            workspaceAccessManager =
                smc.getWorkspaceAccessConfig().newInstance(WorkspaceAccessManager.class);
        } else {
            // fallback -> the default implementation
            log.debug("No WorkspaceAccessManager configured; using default.");
            workspaceAccessManager = createDefaultWorkspaceAccessManager();
        }
View Full Code Here

        // init default ac-provider-factory
        acProviderFactory = new AccessControlProviderFactoryImpl();
        acProviderFactory.init(securitySession);

        // create the evalutor for workspace access
        SecurityManagerConfig smc = config.getSecurityManagerConfig();
        if (smc != null && smc.getWorkspaceAccessConfig() != null) {
            workspaceAccessManager = (WorkspaceAccessManager) smc.getWorkspaceAccessConfig().newInstance();
        } else {
            // fallback -> the default implementation
            log.debug("No WorkspaceAccessManager configured; using default.");
            workspaceAccessManager = new WorkspaceAccessManagerImpl();
        }
View Full Code Here

     * of this <code>Repository</code> and adds it to the repository context.
     *
     * @throws RepositoryException if an error occurs.
     */
    private synchronized void initSecurityManager() throws RepositoryException {
        SecurityManagerConfig smc =
            getConfig().getSecurityConfig().getSecurityManagerConfig();
        if (smc == null) {
            log.debug("No configuration entry for SecurityManager. Using org.apache.jackrabbit.core.security.simple.SimpleSecurityManager");
            securityMgr = new SimpleSecurityManager();
        } else {
            securityMgr = smc.newInstance(JackrabbitSecurityManager.class);
        }

        log.info("SecurityManager = " + securityMgr.getClass());

        context.setSecurityManager(securityMgr);

        String workspaceName = getConfig().getDefaultWorkspaceName();
        if (smc != null && smc.getWorkspaceName() != null) {
            workspaceName = smc.getWorkspaceName();
        }

        // mark the workspace as 'active' for that it does not get disposed
        // by the workspace-janitor
        // TODO: There should be a cleaner way to do this
View Full Code Here

     * @throws RepositoryException if an error occurs
     */
    protected void initStartupWorkspaces() throws RepositoryException {
        String wspName = repConfig.getDefaultWorkspaceName();
        String secWspName = null;
        SecurityManagerConfig smc = repConfig.getSecurityConfig().getSecurityManagerConfig();
        if (smc != null) {
           secWspName = smc.getWorkspaceName();
        }
        try {
            (wspInfos.get(wspName)).initialize();
            if (secWspName != null && !wspInfos.containsKey(secWspName)) {
                createWorkspace(secWspName);
View Full Code Here

TOP

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

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.