|
|
|
@ -91,37 +91,8 @@ public class FrontPageResource extends ApiResource {
|
|
|
|
|
values.put("version", context().configuration().version());
|
|
|
|
|
|
|
|
|
|
String infrastructure = context().container().configuration().infrastructure();
|
|
|
|
|
StringBuilder voValue = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
Set<String> vos = new HashSet<String>();
|
|
|
|
|
|
|
|
|
|
//pre-process
|
|
|
|
|
for (String scope : context().container().configuration().authorizationProvider().getContexts()) {
|
|
|
|
|
ContextBean bean = new ContextBean(scope);
|
|
|
|
|
switch (bean.type()) {
|
|
|
|
|
case INFRASTRUCTURE:
|
|
|
|
|
infrastructure = bean.name();
|
|
|
|
|
break;
|
|
|
|
|
case VO:
|
|
|
|
|
vos.add(bean.name());
|
|
|
|
|
break;
|
|
|
|
|
case VRE:
|
|
|
|
|
vos.add(bean.enclosingScope().name());
|
|
|
|
|
infrastructure=bean.enclosingScope().enclosingScope().name();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//build vo value
|
|
|
|
|
int i = 0;
|
|
|
|
|
int max = vos.size()-1;
|
|
|
|
|
for (String vo : vos) {
|
|
|
|
|
String voPrefix = i == 0 ? "" : (i==max?" and ":", ");
|
|
|
|
|
voValue.append(voPrefix+"<em>" + vo + "</em>");
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
values.put("infra", infrastructure);
|
|
|
|
|
values.put("vos", voValue.toString());
|
|
|
|
|
|
|
|
|
|
values.put("status", context().lifecycle().state().toString());
|
|
|
|
|
|
|
|
|
|