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