Package org.apache.archiva.admin.model.beans

Examples of org.apache.archiva.admin.model.beans.LdapGroupMapping


                            StringUtils.substringAfter( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY );
                        String val = userConfiguration.getConcatenatedList( key, "" );
                        if ( !StringUtils.isEmpty( val ) )
                        {
                            String[] roles = StringUtils.split( val, ',' );
                            ldapGroupMappings.add( new LdapGroupMapping( group, roles ) );
                        }
                    }
                }

                redbackRuntimeConfiguration.setLdapGroupMappings( ldapGroupMappings );
View Full Code Here


        {
            List<LdapGroupMapping> ldapGroupMappings = new ArrayList<>( mappings.size() );

            for ( org.apache.archiva.configuration.LdapGroupMapping mapping : mappings )
            {
                ldapGroupMappings.add( new LdapGroupMapping( mapping.getGroup(), mapping.getRoleNames() ) );
            }

            redbackRuntimeConfiguration.setLdapGroupMappings( ldapGroupMappings );
        }
View Full Code Here

        try
        {
            RedbackRuntimeConfiguration redbackRuntimeConfiguration =
                redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration();
            boolean added =
                redbackRuntimeConfiguration.getLdapGroupMappings().add( new LdapGroupMapping( ldapGroup, roles ) );
            logger.debug( "addLdapMapping ldapGroup: {}, roles: {}, added: {}", ldapGroup, roles, added );
            redbackRuntimeConfigurationAdmin.updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
        }
        catch ( RepositoryAdminException e )
        {
View Full Code Here

        try
        {
            RedbackRuntimeConfiguration redbackRuntimeConfiguration =
                redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration();
            LdapGroupMapping ldapGroupMapping = new LdapGroupMapping( ldapGroup );
            int idx = redbackRuntimeConfiguration.getLdapGroupMappings().indexOf( ldapGroupMapping );
            if ( idx > -1 )
            {
                logger.debug( "updateLdapMapping ldapGroup: {}, roles: {}", ldapGroup, roles );
                ldapGroupMapping = redbackRuntimeConfiguration.getLdapGroupMappings().get( idx );
                ldapGroupMapping.setRoleNames( roles );
            }
            redbackRuntimeConfigurationAdmin.updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );

        }
        catch ( RepositoryAdminException e )
View Full Code Here

        try
        {
            RedbackRuntimeConfiguration redbackRuntimeConfiguration =
                redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration();
            boolean removed =
                redbackRuntimeConfiguration.getLdapGroupMappings().remove( new LdapGroupMapping( group ) );
            redbackRuntimeConfigurationAdmin.updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
            logger.debug( "removeLdapMapping ldapGroup: {}, removed: {}", group, removed );
        }
        catch ( RepositoryAdminException e )
        {
View Full Code Here

            List<LdapGroupMapping> ldapGroupMappings = new ArrayList<>( mappings.size() );

            for ( Map.Entry<String, List<String>> entry : mappings.entrySet() )
            {
                ldapGroupMappings.add( new LdapGroupMapping( entry.getKey(), entry.getValue() ) );
            }

            redbackRuntimeConfiguration.setLdapGroupMappings( ldapGroupMappings );

            redbackRuntimeConfigurationAdmin.updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
View Full Code Here

        }

        if ( StringUtils.startsWith( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) )
        {
            RedbackRuntimeConfiguration redbackRuntimeConfiguration = getRedbackRuntimeConfiguration();
            int index = redbackRuntimeConfiguration.getLdapGroupMappings().indexOf( new LdapGroupMapping(
                StringUtils.substringAfter( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) ) );
            if ( index > -1 )
            {
                return StringUtils.join( redbackRuntimeConfiguration.getLdapGroupMappings().get( index ).getRoleNames(),
                                         ',' );
View Full Code Here

                            StringUtils.substringAfter( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY );
                        String val = userConfiguration.getConcatenatedList( key, "" );
                        if ( !StringUtils.isEmpty( val ) )
                        {
                            String[] roles = StringUtils.split( val, ',' );
                            ldapGroupMappings.add( new LdapGroupMapping( group, roles ) );
                        }
                    }
                }

                redbackRuntimeConfiguration.setLdapGroupMappings( ldapGroupMappings );
View Full Code Here

        {
            List<LdapGroupMapping> ldapGroupMappings = new ArrayList<LdapGroupMapping>( mappings.size() );

            for ( org.apache.archiva.configuration.LdapGroupMapping mapping : mappings )
            {
                ldapGroupMappings.add( new LdapGroupMapping( mapping.getGroup(), mapping.getRoleNames() ) );
            }

            redbackRuntimeConfiguration.setLdapGroupMappings( ldapGroupMappings );
        }
View Full Code Here

        }

        if ( StringUtils.startsWith( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) )
        {
            RedbackRuntimeConfiguration redbackRuntimeConfiguration = getRedbackRuntimeConfiguration();
            int index = redbackRuntimeConfiguration.getLdapGroupMappings().indexOf( new LdapGroupMapping(
                StringUtils.substringAfter( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) ) );
            if ( index > -1 )
            {
                return StringUtils.join( redbackRuntimeConfiguration.getLdapGroupMappings().get( index ).getRoleNames(),
                                         ',' );
View Full Code Here

TOP

Related Classes of org.apache.archiva.admin.model.beans.LdapGroupMapping

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.