Search in sources :

Example 1 with RequestorEntry

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

the class AsimbaAddSPAction method refresh.

public void refresh() {
    log.info("refresh() SP call");
    spRequestor = new RequestorEntry();
}
Also used : RequestorEntry(org.gluu.asimba.util.ldap.sp.RequestorEntry)

Example 2 with RequestorEntry

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

the class UpdateAsimbaSPRequestorAction method clearEdit.

public void clearEdit() {
    log.info("clearEdit() SPRequestor call");
    spRequestor = new RequestorEntry();
    editEntryInum = null;
    newEntry = true;
    uploadedCertBytes = null;
}
Also used : RequestorEntry(org.gluu.asimba.util.ldap.sp.RequestorEntry)

Example 3 with RequestorEntry

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

the class AsimbaService method searchRequestors.

/**
    * Search by pattern
    * 
    * @param pattern Pattern
    * @param sizeLimit Maximum count of results
    * @return List of scopes
    * @throws Exception
    */
public List<RequestorEntry> searchRequestors(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<LDAPRequestorEntry> entries = ldapEntryManager.findEntries(getDnForLDAPRequestorEntry(null), LDAPRequestorEntry.class, searchFilter, sizeLimit);
    // convert result
    List<RequestorEntry> ret = new ArrayList<RequestorEntry>();
    for (LDAPRequestorEntry entry : entries) {
        ret.add(entry.getEntry());
    }
    return ret;
}
Also used : Filter(com.unboundid.ldap.sdk.Filter) LDAPRequestorEntry(org.gluu.asimba.util.ldap.sp.LDAPRequestorEntry) LDAPRequestorEntry(org.gluu.asimba.util.ldap.sp.LDAPRequestorEntry) RequestorEntry(org.gluu.asimba.util.ldap.sp.RequestorEntry) ArrayList(java.util.ArrayList)

Example 4 with RequestorEntry

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

the class AsimbaService method loadRequestors.

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

Example 5 with RequestorEntry

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

the class UpdateAsimbaSelectorAction method refresh.

public void refresh() {
    log.info("refresh() Selector call");
    if (searchPattern == null || "".equals(searchPattern)) {
        //list loading
        selectorList = asimbaService.loadSelectors();
    } else {
        // search mode, clear pattern
        searchPattern = null;
    }
    // Load edit lists
    idpList = new ArrayList<SelectItem>();
    List<IDPEntry> idpListEntries = asimbaService.loadIDPs();
    for (IDPEntry entry : idpListEntries) {
        idpList.add(new SelectItem(entry.getId(), entry.getId(), entry.getFriendlyName()));
    }
    spRequestorList = new ArrayList<SelectItem>();
    List<RequestorEntry> spRequestorListEntries = asimbaService.loadRequestors();
    for (RequestorEntry entry : spRequestorListEntries) {
        spRequestorList.add(new SelectItem(entry.getId(), entry.getId(), entry.getFriendlyName()));
    }
}
Also used : SelectItem(javax.faces.model.SelectItem) RequestorEntry(org.gluu.asimba.util.ldap.sp.RequestorEntry) IDPEntry(org.gluu.asimba.util.ldap.idp.IDPEntry)

Aggregations

RequestorEntry (org.gluu.asimba.util.ldap.sp.RequestorEntry)5 ArrayList (java.util.ArrayList)2 LDAPRequestorEntry (org.gluu.asimba.util.ldap.sp.LDAPRequestorEntry)2 Filter (com.unboundid.ldap.sdk.Filter)1 SelectItem (javax.faces.model.SelectItem)1 IDPEntry (org.gluu.asimba.util.ldap.idp.IDPEntry)1