use of com.evolveum.midpoint.xml.ns._public.model.model_3.GetObjectType in project midpoint by Evolveum.
the class FocusTypeAssignmentPopupTabPanel method getSelectedAssignmentsMap.
@Override
protected Map<String, AssignmentType> getSelectedAssignmentsMap() {
Map<String, AssignmentType> assignmentsMap = new HashMap<>();
List<F> selectedObjects = getObjectType().equals(ObjectTypes.ORG) ? getPreselectedObjects() : getSelectedObjectsList();
QName relation = getRelationValue();
selectedObjects.forEach(selectedObject -> assignmentsMap.put(selectedObject.getOid(), ObjectTypeUtil.createAssignmentTo(selectedObject, relation)));
return assignmentsMap;
}
use of com.evolveum.midpoint.xml.ns._public.model.model_3.GetObjectType in project midpoint by Evolveum.
the class PageShadow method createPageTitleModel.
@Override
protected IModel<String> createPageTitleModel() {
return new LoadableModel<>(false) {
private static final long serialVersionUID = 1L;
@Override
protected String load() {
ShadowType account = getObjectDetailsModels().getObjectType();
String accName = WebComponentUtil.getName(account);
ResourceType resource = (ResourceType) account.getResourceRef().asReferenceValue().getObject().asObjectable();
String name = WebComponentUtil.getName(resource);
// TODO: refactor
return createStringResourceStatic(PageShadow.this, "PageAccount.title", accName, name).getString();
}
};
}
use of com.evolveum.midpoint.xml.ns._public.model.model_3.GetObjectType in project midpoint by Evolveum.
the class ActionsExecutedSummarizer method mapToBean.
private void mapToBean(Map<ActionsExecutedObjectsKey, ObjectActionsExecutedEntryType> map, List<ObjectActionsExecutedEntryType> list) {
for (Map.Entry<ActionsExecutedObjectsKey, ObjectActionsExecutedEntryType> entry : map.entrySet()) {
ObjectActionsExecutedEntryType e = entry.getValue().clone();
e.setObjectType(entry.getKey().getObjectType());
e.setOperation(ChangeType.toChangeTypeType(entry.getKey().getOperation()));
e.setChannel(entry.getKey().getChannel());
list.add(e);
}
}
use of com.evolveum.midpoint.xml.ns._public.model.model_3.GetObjectType in project midpoint by Evolveum.
the class GlobalObjectCache method getStateInformation.
public Collection<SingleCacheStateInformationType> getStateInformation() {
Map<Class<?>, Integer> counts = new HashMap<>();
AtomicInteger size = new AtomicInteger(0);
if (cache != null) {
cache.invokeAll(cache.keys(), e -> {
Class<?> objectType = e.getValue().getObjectType();
counts.compute(objectType, (type, count) -> count != null ? count + 1 : 1);
size.incrementAndGet();
return null;
});
SingleCacheStateInformationType info = new SingleCacheStateInformationType(prismContext).name(GlobalObjectCache.class.getName()).size(size.get());
counts.forEach((type, count) -> info.beginComponent().name(type.getSimpleName()).size(count));
return Collections.singleton(info);
} else {
return Collections.emptySet();
}
}
use of com.evolveum.midpoint.xml.ns._public.model.model_3.GetObjectType in project midpoint by Evolveum.
the class GlobalVersionCache method getStateInformation.
public Collection<SingleCacheStateInformationType> getStateInformation() {
Map<Class<?>, Integer> counts = new HashMap<>();
AtomicInteger size = new AtomicInteger(0);
if (cache != null) {
cache.invokeAll(cache.keys(), e -> {
Class<?> objectType = e.getValue().getObjectType();
counts.compute(objectType, (type, count) -> count != null ? count + 1 : 1);
size.incrementAndGet();
return null;
});
SingleCacheStateInformationType info = new SingleCacheStateInformationType(prismContext).name(GlobalVersionCache.class.getName()).size(size.get());
counts.forEach((type, count) -> info.beginComponent().name(type.getSimpleName()).size(count));
return Collections.singleton(info);
} else {
return Collections.emptySet();
}
}
Aggregations