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;
}
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;
}
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;
}
Aggregations