name = name.replaceAll("/", ""); if (attribute.isRequestContext()) { if (attribute.isRequired()) { if (name.startsWith(REQCTX)) {
private Map<String, Map<String, CatalogInfo>> initializeData(CatalogReader catalogReader) throws Exception { JsonFactory factory = new JsonFactory(); factory.enable(JsonParser.Feature.ALLOW_COMMENTS); ObjectMapper mapper = new ObjectMapper(factory); String catalog = catalogReader.readCatalog(); catalogData = mapper.readValue(catalog, CatalogData.class); if (catalogData.getAttributes() != null) { for (Attribute attr : catalogData.getAttributes()) { if (attr.isRequestContext()) { requestContextAttributes.put(attr.getName(), attr); } Map<String, Attribute> attrMap = attributeMap.get(attr.getCatalogId()); if (attrMap == null) { attrMap = new HashMap<>(); attributeMap.put(attr.getCatalogId(), attrMap); } attrMap.put(attr.getName(), attr); } } Map<String, Map<String, CatalogInfo>> map = new HashMap<>(); map.put(DEFAULT_CATALOG, new HashMap<>()); for (Event event : catalogData.getEvents()) { addEntry(map, event); } return map; }
for (EventAttribute eventAttribute : eventAttributes) { Attribute attr = catalogManager.getAttribute(eventAttribute.getName(), event.getCatalogId()); if ((!attr.isRequestContext() && (attr.isRequired()) || (eventAttribute.isRequired() != null && eventAttribute.isRequired()))) { String name = attr.getName();
boolean anyConstraints = false; for (Attribute attribute : attributes.values()) { if (attribute.isRequestContext()) { String name = attribute.getName(); if (name.startsWith(REQCTX)) { continue; if (attribute.isRequestContext() && attribute.isRequired()) { String name = eventAttribute.getName(); if (name.startsWith(REQCTX)) { if (!attribute.isRequestContext() && attribute.getDataType().getImportClass() != null) { if (!importedTypes.containsKey(attribute.getDataType().getTypeName())) { importedTypes.put(attribute.getDataType().getTypeName(), attribute.getDataType().getImportClass());
model.setCatalogId(attribute.getCatalogId()); model.setIndexed(attribute.isIndexed()); model.setRequestContext(attribute.isRequestContext()); model.setRequired(attribute.isRequired()); model.setSortable(attribute.isSortable());