Пример #1
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !(o instanceof ClientModel)) return false;

    ClientModel that = (ClientModel) o;
    return that.getId().equals(getId());
  }
Пример #2
0
  @Override
  public Set<RoleModel> getClientScopeMappings(ClientModel client) {
    Set<RoleModel> roleMappings = client.getScopeMappings();

    Set<RoleModel> appRoles = new HashSet<RoleModel>();
    for (RoleModel role : roleMappings) {
      RoleContainerModel container = role.getContainer();
      if (container instanceof RealmModel) {
      } else {
        ClientModel app = (ClientModel) container;
        if (app.getId().equals(getId())) {
          appRoles.add(role);
        }
      }
    }

    return appRoles;
  }
Пример #3
0
 @Override
 public String getId() {
   if (updated != null) return updated.getId();
   return cached.getId();
 }