public static String getDisplayName(OperationData data) { if (data.getAttributes().get("name") == null) { return (String) data.getMasterAttributes().get("name"); } return (String) data.getAttributes().get("name"); }
public void search(String oldVal, String newVal) { if ((oldVal != null) && (newVal.length() < oldVal.length())) { listviewPaneContent.resetItems(); } String value = searchField.getText().toUpperCase(); ObservableList<OperationData> subentries = FXCollections.observableArrayList(); for (OperationData entry : listviewPaneContent.getItems()) { boolean match = true; String entryText = entry.getMasterAttributes().get("name") == null ? "name" : (String) entry.getMasterAttributes().get("name"); if (!entryText.toUpperCase().contains(value)) { match = false; continue; } if (match) { subentries.add(entry); } } listviewPaneContent.setItems(subentries); }
public static List<EnumeratedValueModel> toEnumeratedValuesByMasterName(MultipleResult result) { List<EnumeratedValueModel> vals = new ArrayList<>(); if (result != null) { List<OperationData> datas = result.getData(); if (datas != null) { for(OperationData data: datas) { EnumeratedValueModel model = new EnumeratedValueModel(); model.setValue((String) data.getMasterAttributes().get("name")); model.setDescription((String) data.getMasterAttributes().get("description")); model.setSavedValue((String) data.getMasterAttributes().get("fullId")); model.setSourceModel(data); vals.add(model); }; } } return vals; }
@Override public Node getDisplayIdentity() { if(identityPresenter != null) { Node node = identityPresenter.provideIdentityOf(this, getRootComponent()); return node; } OperationData data = getOpData(); Label identity = new Label("Structure of " + data.getMasterAttributes().get("name")); identity.setStyle("-fx-text-fill:white;-fx-font-size:12px;"); return identity; }
String containerFullId = controller.getModelContainerFullId(); String fullId = controller.getModelFullId(); String masterFullId = (String) ((AbstractViewController)controller).getOpData().getMasterAttributes().get("fullId");
/** * @{inheritedDoc} */ @Override public void navigate(IEmaginController controller, IOperationResult currentPage, Direction direction, Consumer<IOperationResult> consumer) { final String modelFullId = controller.getModelFullId(); if (modelFullId != null) { final MultipleResult currentResult = (MultipleResult) currentPage; final JsonObject query = new JsonObject(); if(masterLink) { String t = (String) ((AbstractViewController)controller).getOpData().getMasterAttributes().get("fullId"); query.addProperty("oid", t); } else { query.addProperty("oid", modelFullId); } query.addProperty("linkClass", getLinkClass()); if (StringUtils.isNotBlank(getLinkConstraintName())) { query.addProperty("linkConstraintName", getLinkConstraintName()); } query.addProperty(IOperationResult.page, getNexPageIndex(direction, currentResult)); query.addProperty(IOperationResult.pageSize, currentResult.getPageSize().toString()); paginateOperation.doOperation(query, consumer); } }
String masterFullId = (String) ((AbstractViewController)controller).getOpData().getMasterAttributes().get("fullId"); if (StringUtils.isNotEmpty(masterFullId)) { query.addProperty("masterFullId", masterFullId);
val = d.getMasterAttributes().get(StringUtils.substringAfter(name, "masterAttributes."));