Examples of LdapSchemaTemplateDTO


Examples of com.sonatype.security.ldap.api.dto.LdapSchemaTemplateDTO

    Assert.assertNotNull(templates);
    Assert.assertEquals(4, templates.size());

    // get the 2nd one and validate it

    LdapSchemaTemplateDTO template = templates.get(3);
    Assert.assertEquals("Generic Ldap Server", template.getName());
    Assert.assertEquals("mail", template.getUserAndGroupConfig().getEmailAddressAttribute());
    Assert.assertEquals(null, template.getUserAndGroupConfig().getGroupBaseDn());
    Assert.assertEquals(null, template.getUserAndGroupConfig().getGroupIdAttribute());
    Assert.assertEquals(null, template.getUserAndGroupConfig().getGroupMemberAttribute());
    Assert.assertEquals(null, template.getUserAndGroupConfig().getGroupMemberFormat());
    Assert.assertEquals(null, template.getUserAndGroupConfig().getGroupObjectClass());

    Assert.assertEquals(null, template.getUserAndGroupConfig().getUserBaseDn());
    Assert.assertEquals("uid", template.getUserAndGroupConfig().getUserIdAttribute());
    Assert.assertEquals("memberOf", template.getUserAndGroupConfig().getUserMemberOfAttribute());
    Assert.assertEquals("inetOrgPerson", template.getUserAndGroupConfig().getUserObjectClass());
    Assert.assertEquals("userPassword", template.getUserAndGroupConfig().getUserPasswordAttribute());
    Assert.assertEquals("cn", template.getUserAndGroupConfig().getUserRealNameAttribute());
    Assert.assertEquals(false, template.getUserAndGroupConfig().isGroupSubtree());
    Assert.assertEquals(true, template.getUserAndGroupConfig().isLdapGroupsAsRoles());
    Assert.assertEquals(false, template.getUserAndGroupConfig().isUserSubtree());
  }
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapSchemaTemplateDTO

    LdapSchemaTemplateListResponse resource = new LdapSchemaTemplateListResponse();
    // LdapServerConfigurationDTO dto = new LdapServerConfigurationDTO();
    resource.setData(new ArrayList<LdapSchemaTemplateDTO>());

    LdapSchemaTemplateDTO template1Dto = new LdapSchemaTemplateDTO();
    resource.getData().add(template1Dto);
    template1Dto.setName("name");
    template1Dto.setUserAndGroupConfig(new LdapUserAndGroupAuthConfigurationDTO());
    template1Dto.getUserAndGroupConfig().setUserSubtree(true);

    validateMarshalAndUnmarchal(resource);
  }
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapSchemaTemplateDTO

    LdapSchemaTemplateListResponse templateResponse = new LdapSchemaTemplateListResponse();
    templateResponse.setData(new ArrayList<LdapSchemaTemplateDTO>());

    for (LdapSchemaTemplate ldapSchemaTemplate : templates) {
      LdapSchemaTemplateDTO dto = new LdapSchemaTemplateDTO();
      dto.setName(ldapSchemaTemplate.getName());
      dto.setUserAndGroupConfig(this.toDto(ldapSchemaTemplate.getUserAndGroupAuthConfig()));
      templateResponse.getData().add(dto);
    }

    return templateResponse;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.