Search in sources :

Example 6 with DisplayNameEntry

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

the class UpdateScopeAction method getInitialDynamicScripts.

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

Example 7 with DisplayNameEntry

use of org.gluu.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.gluu.model.DisplayNameEntry)

Example 8 with DisplayNameEntry

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

the class UpdateResourceAction method addScope.

public void addScope(Scope scope) {
    DisplayNameEntry oneScope = new DisplayNameEntry(scope.getDn(), scope.getId(), scope.getDisplayName());
    this.scopes.add(oneScope);
}
Also used : DisplayNameEntry(org.gluu.model.DisplayNameEntry)

Example 9 with DisplayNameEntry

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

the class UpdateResourceAction method add.

private String add() {
    this.resource = new UmaResource();
    this.scopes = new ArrayList<DisplayNameEntry>();
    this.clients = new ArrayList<DisplayNameEntry>();
    this.clientList = new ArrayList<OxAuthClient>();
    this.resources = new ArrayList<String>();
    return OxTrustConstants.RESULT_SUCCESS;
}
Also used : OxAuthClient(org.gluu.oxtrust.model.OxAuthClient) DisplayNameEntry(org.gluu.model.DisplayNameEntry) UmaResource(org.gluu.oxauth.model.uma.persistence.UmaResource)

Example 10 with DisplayNameEntry

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

the class UpdateUmaScopeAction method getInitialAuthorizationPolicies.

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

Aggregations

DisplayNameEntry (org.gluu.model.DisplayNameEntry)16 ArrayList (java.util.ArrayList)7 CustomScript (org.gluu.model.custom.script.model.CustomScript)2 HashSet (java.util.HashSet)1 GluuAttribute (org.gluu.model.GluuAttribute)1 UmaResource (org.gluu.oxauth.model.uma.persistence.UmaResource)1 OxAuthClient (org.gluu.oxtrust.model.OxAuthClient)1 BasePersistenceException (org.gluu.persist.exception.BasePersistenceException)1 Entry (org.gluu.persist.model.base.Entry)1 Scope (org.oxauth.persistence.model.Scope)1