Package org.pentaho.platform.plugin.services.security.userrole.ldap.search

Examples of org.pentaho.platform.plugin.services.security.userrole.ldap.search.LdapSearchParamsFactoryImpl$LdapSearchParamsImpl


  public void testGetUsernamesInRole4() throws Exception {
    SearchControls con1 = new SearchControls();
    con1.setReturningAttributes( new String[] { "uniqueMember" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramFactory =
        new LdapSearchParamsFactoryImpl( "ou=groups", "(&(objectClass=groupOfUniqueNames)(cn={0}))", con1 ); //$NON-NLS-1$//$NON-NLS-2$

    Transformer transformer1 = new SearchResultToAttrValueList( "uniqueMember", "uid" ); //$NON-NLS-1$ //$NON-NLS-2$

    GrantedAuthorityToString transformer2 = new GrantedAuthorityToString();

    LdapSearch usernamesInRoleSearch =
        new GenericLdapSearch( getContextSource(), paramFactory, transformer1, transformer2 );

    SearchControls con2 = new SearchControls();
    con2.setReturningAttributes( new String[] { "uid" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramFactory2 =
        new LdapSearchParamsFactoryImpl( "ou=users", "(businessCategory=cn={0}*)", con2 ); //$NON-NLS-1$//$NON-NLS-2$

    Transformer transformer3 = new SearchResultToAttrValueList( "uid" ); //$NON-NLS-1$

    GrantedAuthorityToString transformer4 = new GrantedAuthorityToString();

View Full Code Here


  public void testGetAllAuthorities1() {
    SearchControls con1 = new SearchControls();
    con1.setReturningAttributes( new String[] { "cn" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramsFactory =
        new LdapSearchParamsFactoryImpl( "ou=roles", "(objectClass=organizationalRole)", con1 ); //$NON-NLS-1$//$NON-NLS-2$

    Transformer one = new SearchResultToAttrValueList( "cn" ); //$NON-NLS-1$
    Transformer two = new StringToGrantedAuthority();
    Transformer[] transformers = { one, two };
    Transformer transformer = new ChainedTransformer( transformers );
View Full Code Here

    login( "suzy", defaultTenant );
    SearchControls con1 = new SearchControls();
    con1.setReturningAttributes( new String[] { "cn" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramsFactory =
        new LdapSearchParamsFactoryImpl( "ou=roles", "(objectClass=organizationalRole)", con1 ); //$NON-NLS-1$//$NON-NLS-2$

    Transformer one = new SearchResultToAttrValueList( "cn" ); //$NON-NLS-1$
    Transformer two = new StringToGrantedAuthority();
    Transformer[] transformers = { one, two };
    Transformer transformer = new ChainedTransformer( transformers );
View Full Code Here

  public void testGetAllAuthorities1Sorted() {
    SearchControls con1 = new SearchControls();
    con1.setReturningAttributes( new String[] { "cn" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramsFactory =
        new LdapSearchParamsFactoryImpl( "ou=roles", "(objectClass=organizationalRole)", con1 ); //$NON-NLS-1$//$NON-NLS-2$

    Transformer one = new SearchResultToAttrValueList( "cn" ); //$NON-NLS-1$
    Transformer two = new StringToGrantedAuthority();
    Transformer[] transformers = { one, two };
    Transformer transformer = new ChainedTransformer( transformers );
View Full Code Here

  public void testGetAllAuthorities2() {
    SearchControls con1 = new SearchControls();
    con1.setReturningAttributes( new String[] { "cn" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramsFactory =
        new LdapSearchParamsFactoryImpl( "ou=groups", "(objectClass=groupOfUniqueNames)", con1 ); //$NON-NLS-1$//$NON-NLS-2$

    Transformer one = new SearchResultToAttrValueList( "cn" ); //$NON-NLS-1$
    Transformer two = new StringToGrantedAuthority();
    Transformer[] transformers = { one, two };
    Transformer transformer = new ChainedTransformer( transformers );
View Full Code Here

  public void testGetAllAuthorities3() throws Exception {
    SearchControls con1 = new SearchControls();
    con1.setReturningAttributes( new String[] { "cn" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramsFactory =
        new LdapSearchParamsFactoryImpl( "ou=roles", "(objectClass=organizationalRole)", con1 ); //$NON-NLS-1$ //$NON-NLS-2$

    Transformer one = new SearchResultToAttrValueList( "cn" ); //$NON-NLS-1$
    Transformer two = new StringToGrantedAuthority();
    Transformer[] transformers = { one, two };
    Transformer transformer = new ChainedTransformer( transformers );

    LdapSearch rolesSearch = new GenericLdapSearch( getContextSource(), paramsFactory, transformer );

    SearchControls con2 = new SearchControls();
    con1.setReturningAttributes( new String[] { "cn" } ); //$NON-NLS-1$

    LdapSearchParamsFactory paramsFactory2 =
        new LdapSearchParamsFactoryImpl( "ou=groups", "(objectClass=groupOfUniqueNames)", con2 ); //$NON-NLS-1$//$NON-NLS-2$

    Transformer oneB = new SearchResultToAttrValueList( "cn" ); //$NON-NLS-1$
    Transformer twoB = new StringToGrantedAuthority();
    Transformer[] transformers2 = { oneB, twoB };
    Transformer transformer2 = new ChainedTransformer( transformers2 );
View Full Code Here

TOP

Related Classes of org.pentaho.platform.plugin.services.security.userrole.ldap.search.LdapSearchParamsFactoryImpl$LdapSearchParamsImpl

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.