Search in sources :

Example 1 with RequestorPoolEntry

use of org.gluu.asimba.util.ldap.sp.RequestorPoolEntry in project oxTrust by GluuFederation.

the class UpdateAsimbaSPPoolAction method clearEdit.

public void clearEdit() {
    spPool = new RequestorPoolEntry();
    // dafault fields
    spPool.setPostAuthorizationProfileID("postauthz.1");
    spPool.setAttributeReleasePolicyID("asimba.releasepolicy.1");
    spPool.setAuthenticationProfileIDs("remote.saml2");
    editEntryInum = null;
    newEntry = true;
}
Also used : RequestorPoolEntry(org.gluu.asimba.util.ldap.sp.RequestorPoolEntry)

Example 2 with RequestorPoolEntry

use of org.gluu.asimba.util.ldap.sp.RequestorPoolEntry in project oxTrust by GluuFederation.

the class AsimbaService method searchRequestorPools.

/**
    * Search by pattern
    * 
    * @param pattern Pattern
    * @param sizeLimit Maximum count of results
    * @return List of scopes
    * @throws Exception
    */
public List<RequestorPoolEntry> searchRequestorPools(String pattern, int sizeLimit) throws Exception {
    // filter
    String[] targetArray = new String[] { pattern };
    Filter idFilter = Filter.createSubstringFilter(OxTrustConstants.uniqueIdentifier, null, targetArray, null);
    Filter friendlyNameFilter = Filter.createSubstringFilter(OxTrustConstants.friendlyName, null, targetArray, null);
    Filter descriptionFilter = Filter.createSubstringFilter(OxTrustConstants.description, null, targetArray, null);
    Filter inameFilter = Filter.createSubstringFilter(OxTrustConstants.iname, null, targetArray, null);
    Filter searchFilter = Filter.createORFilter(idFilter, friendlyNameFilter, descriptionFilter, inameFilter);
    // search
    List<LDAPRequestorPoolEntry> entries = ldapEntryManager.findEntries(getDnForLDAPRequestorPoolEntry(null), LDAPRequestorPoolEntry.class, searchFilter, sizeLimit);
    // convert result
    List<RequestorPoolEntry> ret = new ArrayList<RequestorPoolEntry>();
    for (LDAPRequestorPoolEntry entry : entries) {
        ret.add(entry.getEntry());
    }
    return ret;
}
Also used : LDAPRequestorPoolEntry(org.gluu.asimba.util.ldap.sp.LDAPRequestorPoolEntry) RequestorPoolEntry(org.gluu.asimba.util.ldap.sp.RequestorPoolEntry) Filter(com.unboundid.ldap.sdk.Filter) ArrayList(java.util.ArrayList) LDAPRequestorPoolEntry(org.gluu.asimba.util.ldap.sp.LDAPRequestorPoolEntry)

Example 3 with RequestorPoolEntry

use of org.gluu.asimba.util.ldap.sp.RequestorPoolEntry in project oxTrust by GluuFederation.

the class AsimbaService method loadRequestorPools.

public List<RequestorPoolEntry> loadRequestorPools() {
    List<LDAPRequestorPoolEntry> entries = ldapEntryManager.findEntries(getDnForLDAPRequestorPoolEntry(null), LDAPRequestorPoolEntry.class, null);
    List<RequestorPoolEntry> result = new ArrayList<RequestorPoolEntry>();
    for (LDAPRequestorPoolEntry entry : entries) {
        result.add(entry.getEntry());
    }
    return result;
}
Also used : LDAPRequestorPoolEntry(org.gluu.asimba.util.ldap.sp.LDAPRequestorPoolEntry) RequestorPoolEntry(org.gluu.asimba.util.ldap.sp.RequestorPoolEntry) ArrayList(java.util.ArrayList) LDAPRequestorPoolEntry(org.gluu.asimba.util.ldap.sp.LDAPRequestorPoolEntry)

Example 4 with RequestorPoolEntry

use of org.gluu.asimba.util.ldap.sp.RequestorPoolEntry in project oxTrust by GluuFederation.

the class UpdateAsimbaSPRequestorAction method refresh.

public void refresh() {
    log.info("refresh() SPRequestor call");
    if (searchPattern == null || "".equals(searchPattern)) {
        // list loading
        spRequestorList = asimbaService.loadRequestors();
    } else {
        // search mode, clear pattern
        searchPattern = null;
    }
    // fill spPoolList
    spPoolList = new ArrayList<SelectItem>();
    List<RequestorPoolEntry> spPoolListEntries = asimbaService.loadRequestorPools();
    for (RequestorPoolEntry entry : spPoolListEntries) {
        spPoolList.add(new SelectItem(entry.getId(), entry.getId(), entry.getFriendlyName()));
    }
}
Also used : RequestorPoolEntry(org.gluu.asimba.util.ldap.sp.RequestorPoolEntry) SelectItem(javax.faces.model.SelectItem)

Aggregations

RequestorPoolEntry (org.gluu.asimba.util.ldap.sp.RequestorPoolEntry)4 ArrayList (java.util.ArrayList)2 LDAPRequestorPoolEntry (org.gluu.asimba.util.ldap.sp.LDAPRequestorPoolEntry)2 Filter (com.unboundid.ldap.sdk.Filter)1 SelectItem (javax.faces.model.SelectItem)1