@Test public void shouldCreateProxyLive() throws ClientException { operation.run(doc); DocumentModelList docs = session.getChildren(folder.getRef()); assertEquals(1, docs.size()); DocumentModel proxy = docs.get(0); assertEquals("Test1", proxy.getTitle()); proxy.setPropertyValue("dc:title", "Test2"); proxy = session.saveDocument(proxy); session.save(); doc = session.getDocument(doc.getRef()); assertEquals("Test2", doc.getTitle()); doc.setPropertyValue("dc:title", "Test3"); doc = session.saveDocument(doc); session.save(); proxy = session.getDocument(proxy.getRef()); assertEquals("Test3", proxy.getTitle()); }
@OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel input) throws ClientException { DocumentRef docRef = new PathRef(path); if (!session.exists(docRef)) { throw new ClientException(String.format( "Destination \"%s\" specified into operation not found", path)); } DocumentModel proxy = session.createProxy(input.getRef(), docRef); return proxy; }
CreateProxyLive { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel input) throws ClientException { DocumentRef docRef = new PathRef(path); if (!session.exists(docRef)) { throw new ClientException(String.format( "Destination \"%s\" specified into operation not found", path)); } DocumentModel proxy = session.createProxy(input.getRef(), docRef); return proxy; } }
CreateProxyLive { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel input) throws ClientException { DocumentRef docRef = new PathRef(path); if (!session.exists(docRef)) { throw new ClientException(String.format( "Destination \"%s\" specified into operation not found", path)); } DocumentModel proxy = session.createProxy(input.getRef(), docRef); return proxy; }  }
CreateProxyLive { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel input) throws ClientException { DocumentRef docRef = new PathRef(path); if (!session.exists(docRef)) { throw new ClientException(String.format( "Destination \"%s\" specified into operation not found", path)); } DocumentModel proxy = session.createProxy(input.getRef(), docRef); return proxy; }  @OperationMethod(collector = DocumentModelCollector.class) DocumentModel run(DocumentModel input); }
CreateProxyLive { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel input) throws ClientException { DocumentRef docRef = new PathRef(path); if (!session.exists(docRef)) { throw new ClientException(String.format( "Destination \"%s\" specified into operation not found", path)); } DocumentModel proxy = session.createProxy(input.getRef(), docRef); return proxy; }  @OperationMethod(collector = DocumentModelCollector.class) DocumentModel run(DocumentModel input); static final String ID; }