Search in sources :

Example 1 with ShareMapper

use of org.alfresco.jlan.server.core.ShareMapper in project alfresco-repository by Alfresco.

the class ServerConfigurationBean method processSecurityConfig.

/**
 * Process the security configuration
 */
protected void processSecurityConfig() {
    // Create the security configuration section
    SecurityConfigSection secConfig = new SecurityConfigSection(this);
    try {
        // Check if global access controls have been specified
        AccessControlListBean accessControls = securityConfigBean.getGlobalAccessControl();
        if (accessControls != null) {
            // Parse the access control list
            AccessControlList acls = accessControls.toAccessControlList(secConfig);
            if (acls != null)
                secConfig.setGlobalAccessControls(acls);
        }
        // Check if a JCE provider class has been specified
        String jceProvider = securityConfigBean.getJCEProvider();
        if (jceProvider != null && jceProvider.length() > 0) {
            // Set the JCE provider
            secConfig.setJCEProvider(jceProvider);
        } else {
            // Use the default Bouncy Castle JCE provider
            secConfig.setJCEProvider("org.bouncycastle.jce.provider.BouncyCastleProvider");
        }
        // Check if a share mapper has been specified
        ShareMapper shareMapper = securityConfigBean.getShareMapper();
        if (shareMapper != null) {
            // Associate the share mapper
            secConfig.setShareMapper(shareMapper);
        }
    } catch (InvalidConfigurationException ex) {
        throw new AlfrescoRuntimeException(ex.getMessage());
    }
}
Also used : AccessControlList(org.alfresco.jlan.server.auth.acl.AccessControlList) SecurityConfigSection(org.alfresco.jlan.server.config.SecurityConfigSection) ShareMapper(org.alfresco.jlan.server.core.ShareMapper) AlfrescoRuntimeException(org.alfresco.error.AlfrescoRuntimeException) AccessControlListBean(org.alfresco.filesys.config.acl.AccessControlListBean) InvalidConfigurationException(org.alfresco.jlan.server.config.InvalidConfigurationException)

Aggregations

AlfrescoRuntimeException (org.alfresco.error.AlfrescoRuntimeException)1 AccessControlListBean (org.alfresco.filesys.config.acl.AccessControlListBean)1 AccessControlList (org.alfresco.jlan.server.auth.acl.AccessControlList)1 InvalidConfigurationException (org.alfresco.jlan.server.config.InvalidConfigurationException)1 SecurityConfigSection (org.alfresco.jlan.server.config.SecurityConfigSection)1 ShareMapper (org.alfresco.jlan.server.core.ShareMapper)1