Search in sources :

Example 1 with ApplicationSelectorEntry

use of org.gluu.asimba.util.ldap.selector.ApplicationSelectorEntry in project oxTrust by GluuFederation.

the class UpdateAsimbaSelectorAction method clearEdit.

public void clearEdit() {
    selector = new ApplicationSelectorEntry();
    editEntryInum = null;
    newEntry = true;
}
Also used : ApplicationSelectorEntry(org.gluu.asimba.util.ldap.selector.ApplicationSelectorEntry)

Example 2 with ApplicationSelectorEntry

use of org.gluu.asimba.util.ldap.selector.ApplicationSelectorEntry in project oxTrust by GluuFederation.

the class AsimbaService method loadSelectors.

public List<ApplicationSelectorEntry> loadSelectors() {
    List<LDAPApplicationSelectorEntry> entries = ldapEntryManager.findEntries(getDnForLDAPApplicationSelectorEntry(null), LDAPApplicationSelectorEntry.class, null);
    List<ApplicationSelectorEntry> result = new ArrayList<ApplicationSelectorEntry>();
    for (LDAPApplicationSelectorEntry entry : entries) {
        result.add(entry.getEntry());
    }
    return result;
}
Also used : LDAPApplicationSelectorEntry(org.gluu.asimba.util.ldap.selector.LDAPApplicationSelectorEntry) ApplicationSelectorEntry(org.gluu.asimba.util.ldap.selector.ApplicationSelectorEntry) ArrayList(java.util.ArrayList) LDAPApplicationSelectorEntry(org.gluu.asimba.util.ldap.selector.LDAPApplicationSelectorEntry)

Example 3 with ApplicationSelectorEntry

use of org.gluu.asimba.util.ldap.selector.ApplicationSelectorEntry in project oxTrust by GluuFederation.

the class AsimbaService method searchSelectors.

/**
 * Search by pattern
 *
 * @param pattern Pattern
 * @param sizeLimit Maximum count of results
 * @return List of scopes
 * @throws Exception
 */
public List<ApplicationSelectorEntry> searchSelectors(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 organizationIdFilter = Filter.createSubstringFilter(OxTrustConstants.organizationId, null, targetArray, null);
    Filter searchFilter = Filter.createORFilter(idFilter, friendlyNameFilter, descriptionFilter, inameFilter, organizationIdFilter);
    // search
    List<LDAPApplicationSelectorEntry> entries = ldapEntryManager.findEntries(getDnForLDAPApplicationSelectorEntry(null), LDAPApplicationSelectorEntry.class, searchFilter, sizeLimit);
    // convert result
    List<ApplicationSelectorEntry> ret = new ArrayList<ApplicationSelectorEntry>();
    for (LDAPApplicationSelectorEntry entry : entries) {
        ret.add(entry.getEntry());
    }
    return ret;
}
Also used : Filter(org.gluu.search.filter.Filter) LDAPApplicationSelectorEntry(org.gluu.asimba.util.ldap.selector.LDAPApplicationSelectorEntry) ApplicationSelectorEntry(org.gluu.asimba.util.ldap.selector.ApplicationSelectorEntry) ArrayList(java.util.ArrayList) LDAPApplicationSelectorEntry(org.gluu.asimba.util.ldap.selector.LDAPApplicationSelectorEntry)

Aggregations

ApplicationSelectorEntry (org.gluu.asimba.util.ldap.selector.ApplicationSelectorEntry)3 ArrayList (java.util.ArrayList)2 LDAPApplicationSelectorEntry (org.gluu.asimba.util.ldap.selector.LDAPApplicationSelectorEntry)2 Filter (org.gluu.search.filter.Filter)1