use of org.gluu.asimba.util.ldap.idp.IDPEntry in project oxTrust by GluuFederation.
the class AsimbaAddIDPAction method refresh.
public void refresh() {
log.info("refresh() IDP call");
idp = new IDPEntry();
}
use of org.gluu.asimba.util.ldap.idp.IDPEntry in project oxTrust by GluuFederation.
the class UpdateAsimbaIDPAction method clearEdit.
public void clearEdit() {
log.info("clearEdit() IDP call");
idp = new IDPEntry();
editEntryInum = null;
newEntry = true;
uploadedCertBytes = null;
}
use of org.gluu.asimba.util.ldap.idp.IDPEntry in project oxTrust by GluuFederation.
the class AsimbaService method loadIDPs.
public List<IDPEntry> loadIDPs() {
List<LdapIDPEntry> entries = ldapEntryManager.findEntries(getDnForLdapIDPEntry(null), LdapIDPEntry.class, null);
List<IDPEntry> result = new ArrayList<IDPEntry>();
for (LdapIDPEntry entry : entries) {
result.add(entry.getEntry());
}
return result;
}
use of org.gluu.asimba.util.ldap.idp.IDPEntry in project oxTrust by GluuFederation.
the class UpdateAsimbaIDPAction method moveIdpUp.
public void moveIdpUp() {
log.info("moveIdpUp()");
log.info("selectedIdpId: " + selectedIdpId);
if (selectedIdpId == null || "".equals(selectedIdpId))
return;
IDPEntry idp = null;
// serch entry
for (IDPEntry entry : idpList) if (selectedIdpId.equals(entry.getId())) {
idp = entry;
break;
}
int index = idpList.lastIndexOf(idp);
if (index > 0) {
// move other entries to 1 step lowest
for (int i = 0; i < idpList.size(); i++) {
IDPEntry entry = idpList.get(i);
if (i == index - 1) {
// position to swap
entry.setViewPriorityIndex(i + 1);
} else if (i == index) {
// target idp to up
// move entry priority to 1 step topest
entry.setViewPriorityIndex(i - 1);
} else {
// before and after new idp position
entry.setViewPriorityIndex(i);
}
asimbaService.updateIDPEntry(entry);
}
}
selectedIdpId = null;
}
use of org.gluu.asimba.util.ldap.idp.IDPEntry 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()));
}
}
Aggregations