@Test public void testMultipleTargetsSingleProperty() throws OperationException { String schema = "dublincore"; String property = "title"; assertTrue(target1.hasSchema(schema)); target1.setProperty(schema, property, target1.getName()); assertTrue(target2.hasSchema(schema)); target2.setProperty(schema, property, target2.getName()); context.setInput(targets); OperationChain chain = new OperationChain("testMultipleTargetsSingleProperty"); chain.add(ResetSchema.ID).set("xpath", schema + ":" + property); targets = (DocumentModelList)service.run(context, chain); assertNull(target1.getProperty(schema, property)); assertNull(target2.getProperty(schema, property)); }
@OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel target) throws OperationException { resetSchemaProperties(target); if (saveDocument) { target = session.saveDocument(target); if (save) { session.save(); } } return target; }
ResetSchema { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel target) throws OperationException { resetSchemaProperties(target); if (saveDocument) { target = session.saveDocument(target); if (save) { session.save(); } } return target; } }
ResetSchema { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel target) throws OperationException { resetSchemaProperties(target); if (saveDocument) { target = session.saveDocument(target); if (save) { session.save(); } } return target; }  }
ResetSchema { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel target) throws OperationException { resetSchemaProperties(target); if (saveDocument) { target = session.saveDocument(target); if (save) { session.save(); } } return target; }  @OperationMethod(collector = DocumentModelCollector.class) DocumentModel run(DocumentModel target); }
ResetSchema { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel target) throws OperationException { resetSchemaProperties(target); if (saveDocument) { target = session.saveDocument(target); if (save) { session.save(); } } return target; }  @OperationMethod(collector = DocumentModelCollector.class) DocumentModel run(DocumentModel target); static final String ID; }