本文整理汇总了Java中org.xdi.model.DisplayNameEntry类的典型用法代码示例。如果您正苦于以下问题:Java DisplayNameEntry类的具体用法?Java DisplayNameEntry怎么用?Java DisplayNameEntry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DisplayNameEntry类属于org.xdi.model包,在下文中一共展示了DisplayNameEntry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: acceptSelectScopes
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public void acceptSelectScopes() {
if (this.availableScopes == null) {
return;
}
Set<String> addedScopeInums = new HashSet<String>();
for (DisplayNameEntry scope : scopes) {
addedScopeInums.add(scope.getInum());
}
for (OxAuthScope aScope : this.availableScopes) {
if (aScope.isSelected() && !addedScopeInums.contains(aScope.getInum())) {
addScope(aScope);
}
}
}
示例2: acceptSelectClients
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public void acceptSelectClients() {
if (this.availableClients == null) {
return;
}
Set<String> addedClientInums = new HashSet<String>();
for (DisplayNameEntry entry : clientDisplayNameEntries) {
addedClientInums.add(entry.getInum());
}
for (OxAuthClient client : this.availableClients) {
if (client.isSelected() && !addedClientInums.contains(client.getInum())) {
addClient(client);
if(client.getOxAuthRedirectURIs() != null && client.getOxAuthRedirectURIs().size()>0)
this.loginUris.addAll(client.getOxAuthRedirectURIs());
}
}
}
示例3: getInitialAuthorizationPolicies
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
private List<CustomScript> getInitialAuthorizationPolicies() {
List<CustomScript> result = new ArrayList<CustomScript>();
if ((this.scopeDescription.getAuthorizationPolicies() == null) || (this.scopeDescription.getAuthorizationPolicies().size() == 0)) {
return result;
}
List<DisplayNameEntry> displayNameEntries = lookupService.getDisplayNameEntries(customScriptService.baseDn(),
this.scopeDescription.getAuthorizationPolicies());
if (displayNameEntries != null) {
for (DisplayNameEntry displayNameEntry : displayNameEntries) {
result.add(new CustomScript(displayNameEntry.getDn(), displayNameEntry.getInum(), displayNameEntry.getDisplayName()));
}
}
return result;
}
示例4: removeScope
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
@Restrict("#{s:hasPermission('uma', 'access')}")
public void removeScope(String inum) {
if (StringHelper.isEmpty(inum)) {
return;
}
String removeScopeDn = scopeDescriptionService.getDnForScopeDescription(inum);
for (Iterator<DisplayNameEntry> iterator = this.scopes.iterator(); iterator.hasNext();) {
DisplayNameEntry oneScope = iterator.next();
if (removeScopeDn.equals(oneScope.getDn())) {
iterator.remove();
break;
}
}
}
示例5: removeClient
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
@Restrict("#{s:hasPermission('uma', 'access')}")
public void removeClient(String inum) {
if (StringHelper.isEmpty(inum)) {
return;
}
String removeClientInum = clientService.getDnForClient(inum);
for (Iterator<DisplayNameEntry> iterator = this.clients.iterator(); iterator.hasNext();) {
DisplayNameEntry oneClient = iterator.next();
if (removeClientInum.equals(oneClient.getDn())) {
iterator.remove();
break;
}
}
}
示例6: add
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
@Restrict("#{s:hasPermission('scope', 'access')}")
public String add() throws Exception {
if (this.scope != null) {
return OxTrustConstants.RESULT_SUCCESS;
}
this.update = false;
this.scope = new OxAuthScope();
try {
if (this.scope.getOxAuthClaims() != null && this.scope.getOxAuthClaims().size() > 0) {
this.claims = getClaimDisplayNameEntiries();
} else {
this.claims = new ArrayList<DisplayNameEntry>();
}
} catch (LdapMappingException ex) {
log.error("Failed to load scopes", ex);
return OxTrustConstants.RESULT_FAILURE;
}
return OxTrustConstants.RESULT_SUCCESS;
}
示例7: removeClaim
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public void removeClaim(String inum) throws Exception {
if (StringHelper.isEmpty(inum)) {
return;
}
String removeClaimInum = attributeService.getDnForAttribute(inum);
for (Iterator<DisplayNameEntry> iterator = this.claims.iterator(); iterator.hasNext();) {
DisplayNameEntry oneClaim = iterator.next();
if (removeClaimInum.equals(oneClaim.getDn())) {
iterator.remove();
break;
}
}
}
示例8: selectAddedClaims
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public void selectAddedClaims() {
if (this.availableClaims == null) {
return;
}
Set<String> addedClaimInums = new HashSet<String>();
for (DisplayNameEntry claim : claims) {
addedClaimInums.add(claim.getInum());
}
for (GluuAttribute attribute : this.availableClaims) {
if (attribute.isSelected() && !addedClaimInums.contains(attribute.getInum())) {
addClaim(attribute);
}
}
}
示例9: acceptSelectClaims
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public void acceptSelectClaims() {
if (this.availableClaims == null) {
return;
}
Set<String> addedClaimsInums = new HashSet<String>();
for (DisplayNameEntry claim : claims) {
addedClaimsInums.add(claim.getInum());
}
for (GluuAttribute attribute : this.availableClaims) {
if (attribute.isSelected() && !addedClaimsInums.contains(attribute.getInum())) {
addClaim(attribute);
}
}
}
示例10: acceptSelectMembers
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public void acceptSelectMembers() {
if (this.availableMembers == null) {
return;
}
Set<String> addedMemberInums = new HashSet<String>();
for (DisplayNameEntry member : members) {
addedMemberInums.add(member.getInum());
}
for (GluuCustomPerson person : this.availableMembers) {
if (person.isSelected() && !addedMemberInums.contains(person.getInum())) {
addMember(person);
}
}
}
示例11: acceptSelectScopes
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public void acceptSelectScopes() {
if (this.availableScopes == null) {
return;
}
Set<String> addedScopeInums = new HashSet<String>();
for (DisplayNameEntry scope : scopes) {
addedScopeInums.add(scope.getInum());
}
for (OxAuthScope aScope : this.availableScopes) {
if (aScope.isSelected() && !addedScopeInums.contains(aScope.getInum())) {
addScope(aScope);
}
}
}
示例12: updateClaims
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
private void updateClaims() {
if ((org.xdi.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);
}
示例13: getInitialDynamicScripts
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
private List<CustomScript> getInitialDynamicScripts() {
List<CustomScript> result = new ArrayList<CustomScript>();
if ((this.scope.getDynamicScopeScripts() == null) || (this.scope.getDynamicScopeScripts().size() == 0)) {
return result;
}
List<DisplayNameEntry> displayNameEntries = lookupService.getDisplayNameEntries(customScriptService.baseDn(),
this.scope.getDynamicScopeScripts());
if (displayNameEntries != null) {
for (DisplayNameEntry displayNameEntry : displayNameEntries) {
result.add(new CustomScript(displayNameEntry.getDn(), displayNameEntry.getInum(), displayNameEntry.getDisplayName()));
}
}
return result;
}
示例14: getDisplayNameEntries
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
/**
* Returns list of DisplayNameEntry objects
*
* @param baseDn
* base DN
* @param dns
* list of display names to find
* @return list of DisplayNameEntry objects
*/
@SuppressWarnings("unchecked")
public List<DisplayNameEntry> getDisplayNameEntries(String baseDn, List<String> dns) {
List<String> inums = getInumsFromDns(dns);
if (inums.size() == 0) {
return null;
}
String key = getCompoundKey(inums);
List<DisplayNameEntry> entries = (List<DisplayNameEntry>) cacheService.get(OxConstants.CACHE_LOOKUP_NAME, key);
if (entries == null) {
Filter searchFilter = buildInumFilter(inums);
entries = ldapEntryManager.findEntries(baseDn, DisplayNameEntry.class, searchFilter);
cacheService.put(OxConstants.CACHE_LOOKUP_NAME, key, entries);
}
return entries;
}
示例15: getDisplayNameEntry
import org.xdi.model.DisplayNameEntry; //导入依赖的package包/类
public static DisplayNameEntry getDisplayNameEntry(String dn) {
if (dn == null) {
return null;
}
try {
return LookupService.instance().getDisplayNameEntry(dn);
} catch (Exception ex) {
return null;
}
}