/** * Get contracts that match all the reference * @return referenced items */ @Override public Set<Approvable> getReferencedItems() { Set<Approvable> referencedItems = new HashSet<>(); if (transactional != null && transactional.getReferences() != null) { for (Reference r : transactional.getReferences()) { referencedItems.addAll(r.matchingItems); } } if (definition != null && definition.getReferences() != null) { for (Reference r : definition.getReferences()) { referencedItems.addAll(r.matchingItems); } } if (state != null && state.getReferences() != null) { for (Reference r : state.getReferences()) { referencedItems.addAll(r.matchingItems); } } return referencedItems; }
if (transactional.getReferences() == null) return null; List<Reference> listRefs = transactional.getReferences(); for (Reference ref: listRefs) if (ref.getName().equals(name))
if (c.getTransactional() != null && c.getTransactional().getReferences() != null) { for (Reference rm : c.getTransactional().getReferences()) { rm.contract_id = contractHashId.get(rm.transactional_id);
if(swapContract.getNew().get(0).getParent().equals(lamborghini.getId())) iHack = 0; swapContract.getNew().get(iHack).getTransactional().getReferences().get(0).contract_id = HashId.createRandom(); swapContract.getNew().get(iHack).seal(); swapContract.getNew().get(iHack).addSignatureToSeal(stepaPrivateKeys); System.out.println(newLamborghini.getReferences().values().iterator().next().transactional_id); System.out.println(newDelorean.getTransactional().getReferences().get(0)); System.out.println(newLamborghini.getTransactional().getReferences().get(0)); System.out.println(swapContract.getNew().get(0).getTransactional().getReferences().get(0)); System.out.println(swapContract.getNew().get(1).getTransactional().getReferences().get(0));
System.out.println(newDelorean.getTransactional().getReferences().get(0).transactional_id); System.out.println(newLamborghini.getTransactional().getReferences().get(0).transactional_id); newDelorean.getTransactional().getReferences().get(0).transactional_id = null; newLamborghini.getTransactional().getReferences().get(0).transactional_id = null; newDelorean.seal(); newLamborghini.seal();
System.out.println(newDelorean.getTransactional().getReferences().get(0).transactional_id); System.out.println(newLamborghini.getTransactional().getReferences().get(0).transactional_id); newDelorean.getTransactional().getReferences().get(0).transactional_id = ""; newLamborghini.getTransactional().getReferences().get(0).transactional_id = ""; newDelorean.seal(); newLamborghini.seal();
Contract second = swapContract.getNew().get(1); first.getTransactional().getReferences().get(0).setConditions(firstLamborghini ? conditions2 : conditions1); first.seal(); second.getTransactional().getReferences().get(0).setConditions(firstLamborghini ? conditions1 : conditions2); second.seal(); swapContract.seal();
Contract second = swapContract.getNew().get(1); first.getTransactional().getReferences().get(0).setConditions(firstLamborghini ? conditions2 : conditions1); first.seal(); second.getTransactional().getReferences().get(0).setConditions(firstLamborghini ? conditions1 : conditions2); second.seal(); swapContract.seal();
if(c.getTransactional() != null && c.getTransactional().getReferences() != null) { for (Reference rm : c.getTransactional().getReferences()) { rm.contract_id = contractHashId;