use of org.gluu.model.DisplayNameEntry in project oxTrust by GluuFederation.
the class UpdateGroupAction method addMember.
public void addMember(GluuCustomPerson person) {
DisplayNameEntry member = new DisplayNameEntry(person.getDn(), person.getInum(), person.getDisplayName());
this.members.add(member);
}
use of org.gluu.model.DisplayNameEntry in project oxTrust by GluuFederation.
the class UpdateGroupAction method updateMembers.
private void updateMembers() {
if (this.members == null || this.members.size() == 0) {
this.group.setMembers(null);
return;
}
List<String> tmpMembers = new ArrayList<String>();
for (DisplayNameEntry member : this.members) {
tmpMembers.add(member.getDn());
}
this.group.setMembers(tmpMembers);
}
use of org.gluu.model.DisplayNameEntry in project oxTrust by GluuFederation.
the class UpdateResourceAction method updateScopes.
private void updateScopes() {
if ((this.scopes == null) || (this.scopes.size() == 0)) {
this.resource.setScopes(null);
return;
}
List<String> tmpScopes = new ArrayList<String>();
for (DisplayNameEntry scope : this.scopes) {
tmpScopes.add(scope.getDn());
}
this.resource.setScopes(tmpScopes);
}
use of org.gluu.model.DisplayNameEntry in project oxTrust by GluuFederation.
the class UpdateScopeAction method add.
public String add() throws Exception {
if (this.scope != null) {
return OxTrustConstants.RESULT_SUCCESS;
}
this.update = false;
this.scope = new Scope();
this.scope.setScopeType(ScopeType.OAUTH);
try {
if (this.scope.getOxAuthClaims() != null && this.scope.getOxAuthClaims().size() > 0) {
this.claims = getClaimDisplayNameEntiries();
} else {
this.claims = new ArrayList<DisplayNameEntry>();
}
} catch (BasePersistenceException ex) {
log.error("Failed to load scopes", ex);
facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to add new scope");
conversationService.endConversation();
return OxTrustConstants.RESULT_FAILURE;
}
this.dynamicScripts = getInitialDynamicScripts();
fillAvailableDynScript();
this.oxAttributesJson = getScopeAttributesJson();
return OxTrustConstants.RESULT_SUCCESS;
}
use of org.gluu.model.DisplayNameEntry in project oxTrust by GluuFederation.
the class UpdateScopeAction method updateClaims.
private void updateClaims() {
if ((org.gluu.oxauth.model.common.ScopeType.DYNAMIC == this.scope.getScopeType()) || (this.claims == null) || (this.claims.size() == 0)) {
this.scope.setOxAuthClaims(null);
return;
}
List<String> resultClaims = new ArrayList<String>();
this.scope.setOxAuthClaims(resultClaims);
for (DisplayNameEntry claim : this.claims) {
resultClaims.add(claim.getDn());
}
this.scope.setOxAuthClaims(resultClaims);
}
Aggregations