@Test public void testMultiPublishDocumentWithStringTarget() throws Exception { ctx.setInput(fileToPublish); OperationChain chain = new OperationChain("multiPublishDocumentWithStringInput"); chain.add(FetchContextDocument.ID); chain.add(MultiPublishDocument.ID).set("target", section.getId() + "," + section2.getId()); service.run(ctx, chain); assertEquals(1, session.getChildren(section.getRef()).size()); assertEquals(1, session.getChildren(section2.getRef()).size()); }
@OperationMethod(collector = DocumentModelListCollector.class) public DocumentModelList run(DocumentModel doc) { DocumentModelListImpl docs = new DocumentModelListImpl(); for (DocumentModel t : target) { docs.add(session.publishDocument(doc, t, override)); } return docs; }
MultiPublishDocument { @OperationMethod(collector = DocumentModelListCollector.class) public DocumentModelList run(DocumentModel doc) { DocumentModelListImpl docs = new DocumentModelListImpl(); for (DocumentModel t : target) { docs.add(session.publishDocument(doc, t, override)); } return docs; } }
MultiPublishDocument { @OperationMethod(collector = DocumentModelListCollector.class) public DocumentModelList run(DocumentModel doc) { DocumentModelListImpl docs = new DocumentModelListImpl(); for (DocumentModel t : target) { docs.add(session.publishDocument(doc, t, override)); } return docs; }  }
MultiPublishDocument { @OperationMethod(collector = DocumentModelListCollector.class) public DocumentModelList run(DocumentModel doc) { DocumentModelListImpl docs = new DocumentModelListImpl(); for (DocumentModel t : target) { docs.add(session.publishDocument(doc, t, override)); } return docs; }  @OperationMethod(collector = DocumentModelListCollector.class) DocumentModelList run(DocumentModel doc); }
MultiPublishDocument { @OperationMethod(collector = DocumentModelListCollector.class) public DocumentModelList run(DocumentModel doc) { DocumentModelListImpl docs = new DocumentModelListImpl(); for (DocumentModel t : target) { docs.add(session.publishDocument(doc, t, override)); } return docs; }  @OperationMethod(collector = DocumentModelListCollector.class) DocumentModelList run(DocumentModel doc); static final String ID; }