Search in sources :

Example 6 with DisplayNameEntry

use of org.xdi.model.DisplayNameEntry in project oxTrust by GluuFederation.

the class UpdateGroupAction method convertToDNsArray.

private String[] convertToDNsArray(List<DisplayNameEntry> members) {
    String[] memberDns = new String[members.size()];
    int i = 0;
    for (DisplayNameEntry member : members) {
        memberDns[i++] = member.getDn();
    }
    return memberDns;
}
Also used : DisplayNameEntry(org.xdi.model.DisplayNameEntry)

Example 7 with DisplayNameEntry

use of org.xdi.model.DisplayNameEntry in project oxTrust by GluuFederation.

the class UpdateResourceSetAction method addClient.

public void addClient(OxAuthClient clietn) {
    DisplayNameEntry oneClient = new DisplayNameEntry(clietn.getDn(), clietn.getInum(), clietn.getDisplayName());
    this.clients.add(oneClient);
}
Also used : DisplayNameEntry(org.xdi.model.DisplayNameEntry)

Example 8 with DisplayNameEntry

use of org.xdi.model.DisplayNameEntry in project oxTrust by GluuFederation.

the class UpdateResourceSetAction method updateClients.

private void updateClients() {
    if ((this.clients == null) || (this.clients.size() == 0)) {
        this.resourceSet.setClients(null);
        return;
    }
    List<String> tmpClients = new ArrayList<String>();
    for (DisplayNameEntry client : this.clients) {
        tmpClients.add(client.getDn());
    }
    this.resourceSet.setClients(tmpClients);
}
Also used : ArrayList(java.util.ArrayList) DisplayNameEntry(org.xdi.model.DisplayNameEntry)

Example 9 with DisplayNameEntry

use of org.xdi.model.DisplayNameEntry in project oxTrust by GluuFederation.

the class UpdateScopeDescriptionAction method getInitialAuthorizationPolicies.

private List<CustomScript> getInitialAuthorizationPolicies() {
    List<CustomScript> result = new ArrayList<CustomScript>();
    if ((this.scopeDescription.getAuthorizationPolicies() == null) || (this.scopeDescription.getAuthorizationPolicies().size() == 0)) {
        return result;
    }
    List<DisplayNameEntry> displayNameEntries = lookupService.getDisplayNameEntries(customScriptService.baseDn(), this.scopeDescription.getAuthorizationPolicies());
    if (displayNameEntries != null) {
        for (DisplayNameEntry displayNameEntry : displayNameEntries) {
            result.add(new CustomScript(displayNameEntry.getDn(), displayNameEntry.getInum(), displayNameEntry.getDisplayName()));
        }
    }
    return result;
}
Also used : CustomScript(org.xdi.model.custom.script.model.CustomScript) ArrayList(java.util.ArrayList) DisplayNameEntry(org.xdi.model.DisplayNameEntry)

Example 10 with DisplayNameEntry

use of org.xdi.model.DisplayNameEntry in project oxTrust by GluuFederation.

the class UpdateSectorIdentifierAction method convertToDNsArray.

private String[] convertToDNsArray(List<DisplayNameEntry> clientDisplayNameEntries) {
    String[] dns = new String[clientDisplayNameEntries.size()];
    int i = 0;
    for (DisplayNameEntry displayNameEntry : clientDisplayNameEntries) {
        dns[i++] = displayNameEntry.getDn();
    }
    return dns;
}
Also used : DisplayNameEntry(org.xdi.model.DisplayNameEntry)

Aggregations

DisplayNameEntry (org.xdi.model.DisplayNameEntry)20 ArrayList (java.util.ArrayList)8 CustomScript (org.xdi.model.custom.script.model.CustomScript)2 Filter (com.unboundid.ldap.sdk.Filter)1 List (java.util.List)1 OxAuthScope (org.gluu.oxtrust.model.OxAuthScope)1 LdapMappingException (org.gluu.site.ldap.persistence.exception.LdapMappingException)1 ResourceSet (org.xdi.oxauth.model.uma.persistence.ResourceSet)1