use of com.dexels.navajo.document.Operation in project navajo by Dexels.
the class TestOperation method testOperation.
@Test
public void testOperation() {
NavajoFactory f = NavajoFactory.getInstance();
Navajo n = f.createNavajo();
Message msg = f.createMessage(n, "__Mongo__");
Operation o = f.createOperation(n, "PUT", "vla/ProcessInsertPerson", null, "Person", null);
n.addOperation(o);
o.setExtraMessage(msg);
Method m = f.createMethod(n, "vla/ProcessUpdatePerson", null);
m.addRequired("Apenoot");
n.addMethod(m);
n.write(System.err);
}
use of com.dexels.navajo.document.Operation in project navajo by Dexels.
the class BaseOperationsImpl method getAllOperations.
public List<Operation> getAllOperations() {
List<Operation> al = new ArrayList<>();
for (int i = 0; i < myOperations.size(); i++) {
Operation m = (Operation) myOperations.get(i);
al.add(m);
}
return al;
}
use of com.dexels.navajo.document.Operation in project navajo by Dexels.
the class BaseNavajoImpl method copy.
@Override
public Navajo copy() {
Navajo ni = NavajoFactory.getInstance().createNavajo();
BaseNavajoImpl n = (BaseNavajoImpl) ni;
List<Message> al = getAllMessages();
for (int i = 0; i < al.size(); i++) {
Message m = al.get(i);
Message m2 = copyMessage(m, n);
n.addMessage(m2);
}
List<Method> mm = myMethods.getAllMethods();
for (int i = 0; i < mm.size(); i++) {
Method m = mm.get(i);
Method m2 = m.copy(n);
n.addMethod(m2);
}
List<Operation> oo = myOperations.getAllOperations();
for (Operation o : oo) {
Operation o2 = o.copy(n);
n.addOperation(o2);
}
if (getHeader() != null) {
ni.addHeader(getHeader().copy(ni));
}
return n;
}
Aggregations