-
Notifications
You must be signed in to change notification settings - Fork 188
/
AssignmentDetailsWrapperFactoryImpl.java
43 lines (36 loc) · 1.46 KB
/
AssignmentDetailsWrapperFactoryImpl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Copyright (c) 2010-2019 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.gui.impl.factory.wrapper;
import javax.xml.namespace.QName;
import com.evolveum.midpoint.gui.api.factory.wrapper.WrapperContext;
import org.springframework.stereotype.Component;
import com.evolveum.midpoint.gui.api.prism.ItemStatus;
import com.evolveum.midpoint.prism.Containerable;
import com.evolveum.midpoint.prism.ItemDefinition;
import com.evolveum.midpoint.xml.ns._public.common.common_3.MappingsType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.PersonaConstructionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.PolicyRuleType;
/**
* @author katka
*
*/
@Component
public class AssignmentDetailsWrapperFactoryImpl<C extends Containerable> extends PrismContainerWrapperFactoryImpl<C> {
@Override
public boolean match(ItemDefinition<?> def) {
QName typeName = def.getTypeName();
return PersonaConstructionType.COMPLEX_TYPE.equals(typeName) || MappingsType.COMPLEX_TYPE.equals(typeName) || PolicyRuleType.COMPLEX_TYPE.equals(typeName);
}
@Override
protected boolean canCreateWrapper(ItemDefinition<?> def, ItemStatus status, WrapperContext context, boolean isEmptyValue) {
return !isEmptyValue;
}
@Override
public int getOrder() {
return super.getOrder() - 10;
}
}