...
|
...
|
@@ -71,15 +71,17 @@ public class EntityKeyMapping { |
71
|
71
|
private static final String ADDRESS_2 = "address2";
|
72
|
72
|
private static final String ZIP = "zip";
|
73
|
73
|
private static final String PHONE = "phone";
|
|
74
|
+ private static final String ADDITIONAL_INFO = "additionalInfo";
|
74
|
75
|
|
75
|
|
- public static final List<String> typedEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME, TYPE);
|
76
|
|
- public static final List<String> commonEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME);
|
|
76
|
+ public static final List<String> typedEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME, TYPE, ADDITIONAL_INFO);
|
|
77
|
+ public static final List<String> widgetEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME);
|
|
78
|
+ public static final List<String> commonEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME, ADDITIONAL_INFO);
|
77
|
79
|
public static final List<String> dashboardEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, TITLE);
|
78
|
|
- public static final List<String> labeledEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME, TYPE, LABEL);
|
79
|
|
- public static final List<String> contactBasedEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, EMAIL, TITLE, COUNTRY, STATE, CITY, ADDRESS, ADDRESS_2, ZIP, PHONE);
|
|
80
|
+ public static final List<String> labeledEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME, TYPE, LABEL, ADDITIONAL_INFO);
|
|
81
|
+ public static final List<String> contactBasedEntityFields = Arrays.asList(CREATED_TIME, ENTITY_TYPE, EMAIL, TITLE, COUNTRY, STATE, CITY, ADDRESS, ADDRESS_2, ZIP, PHONE, ADDITIONAL_INFO);
|
80
|
82
|
|
81
|
83
|
public static final Set<String> commonEntityFieldsSet = new HashSet<>(commonEntityFields);
|
82
|
|
- public static final Set<String> relationQueryEntityFieldsSet = new HashSet<>(Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME, TYPE, LABEL, FIRST_NAME, LAST_NAME, EMAIL, REGION, TITLE, COUNTRY, STATE, CITY, ADDRESS, ADDRESS_2, ZIP, PHONE));
|
|
84
|
+ public static final Set<String> relationQueryEntityFieldsSet = new HashSet<>(Arrays.asList(CREATED_TIME, ENTITY_TYPE, NAME, TYPE, LABEL, FIRST_NAME, LAST_NAME, EMAIL, REGION, TITLE, COUNTRY, STATE, CITY, ADDRESS, ADDRESS_2, ZIP, PHONE, ADDITIONAL_INFO));
|
83
|
85
|
|
84
|
86
|
static {
|
85
|
87
|
allowedEntityFieldMap.put(EntityType.DEVICE, new HashSet<>(labeledEntityFields));
|
...
|
...
|
@@ -90,13 +92,13 @@ public class EntityKeyMapping { |
90
|
92
|
allowedEntityFieldMap.get(EntityType.TENANT).add(REGION);
|
91
|
93
|
allowedEntityFieldMap.put(EntityType.CUSTOMER, new HashSet<>(contactBasedEntityFields));
|
92
|
94
|
|
93
|
|
- allowedEntityFieldMap.put(EntityType.USER, new HashSet<>(Arrays.asList(CREATED_TIME, FIRST_NAME, LAST_NAME, EMAIL)));
|
|
95
|
+ allowedEntityFieldMap.put(EntityType.USER, new HashSet<>(Arrays.asList(CREATED_TIME, FIRST_NAME, LAST_NAME, EMAIL, ADDITIONAL_INFO)));
|
94
|
96
|
|
95
|
97
|
allowedEntityFieldMap.put(EntityType.DASHBOARD, new HashSet<>(dashboardEntityFields));
|
96
|
98
|
allowedEntityFieldMap.put(EntityType.RULE_CHAIN, new HashSet<>(commonEntityFields));
|
97
|
99
|
allowedEntityFieldMap.put(EntityType.RULE_NODE, new HashSet<>(commonEntityFields));
|
98
|
|
- allowedEntityFieldMap.put(EntityType.WIDGET_TYPE, new HashSet<>(commonEntityFields));
|
99
|
|
- allowedEntityFieldMap.put(EntityType.WIDGETS_BUNDLE, new HashSet<>(commonEntityFields));
|
|
100
|
+ allowedEntityFieldMap.put(EntityType.WIDGET_TYPE, new HashSet<>(widgetEntityFields));
|
|
101
|
+ allowedEntityFieldMap.put(EntityType.WIDGETS_BUNDLE, new HashSet<>(widgetEntityFields));
|
100
|
102
|
|
101
|
103
|
entityFieldColumnMap.put(CREATED_TIME, ModelConstants.CREATED_TIME_PROPERTY);
|
102
|
104
|
entityFieldColumnMap.put(ENTITY_TYPE, ModelConstants.ENTITY_TYPE_PROPERTY);
|
...
|
...
|
@@ -115,6 +117,7 @@ public class EntityKeyMapping { |
115
|
117
|
entityFieldColumnMap.put(ADDRESS_2, ModelConstants.ADDRESS2_PROPERTY);
|
116
|
118
|
entityFieldColumnMap.put(ZIP, ModelConstants.ZIP_PROPERTY);
|
117
|
119
|
entityFieldColumnMap.put(PHONE, ModelConstants.PHONE_PROPERTY);
|
|
120
|
+ entityFieldColumnMap.put(ADDITIONAL_INFO, ModelConstants.ADDITIONAL_INFO_PROPERTY);
|
118
|
121
|
|
119
|
122
|
Map<String, String> contactBasedAliases = new HashMap<>();
|
120
|
123
|
contactBasedAliases.put(NAME, TITLE);
|
...
|
...
|
@@ -140,6 +143,7 @@ public class EntityKeyMapping { |
140
|
143
|
private String alias;
|
141
|
144
|
private boolean isLatest;
|
142
|
145
|
private boolean isSelection;
|
|
146
|
+ private boolean isSearchable;
|
143
|
147
|
private boolean isSortOrder;
|
144
|
148
|
private boolean ignore = false;
|
145
|
149
|
private List<KeyFilter> keyFilters;
|
...
|
...
|
@@ -304,6 +308,7 @@ public class EntityKeyMapping { |
304
|
308
|
EntityKeyMapping mapping = new EntityKeyMapping();
|
305
|
309
|
mapping.setLatest(false);
|
306
|
310
|
mapping.setSelection(true);
|
|
311
|
+ mapping.setSearchable(!key.getKey().equals(ADDITIONAL_INFO));
|
307
|
312
|
mapping.setEntityKey(key);
|
308
|
313
|
return mapping;
|
309
|
314
|
}
|
...
|
...
|
@@ -312,6 +317,7 @@ public class EntityKeyMapping { |
312
|
317
|
key -> {
|
313
|
318
|
EntityKeyMapping mapping = new EntityKeyMapping();
|
314
|
319
|
mapping.setLatest(true);
|
|
320
|
+ mapping.setSearchable(true);
|
315
|
321
|
mapping.setSelection(true);
|
316
|
322
|
mapping.setEntityKey(key);
|
317
|
323
|
return mapping;
|
...
|
...
|
|