@Test public void testMultipleTargetsFullSchema() throws OperationException { String schema = "common"; assertTrue(target1.hasSchema(schema)); target1.setProperty(schema, "icon-expanded", "icon-expanded1"); target1.setProperty(schema, "icon", "icon1"); assertTrue(target2.hasSchema(schema)); target2.setProperty(schema, "icon-expanded", "icon-expanded2"); target2.setProperty(schema, "icon", "icon2"); context.setInput(targets); OperationChain chain = new OperationChain("testMultipleTargetsFullSchema"); chain.add(ResetSchema.ID).set("schema", schema); targets = (DocumentModelList)service.run(context, chain); for (Map.Entry<String, Object> entry : target1.getProperties(schema).entrySet()) { assertNull(target1.getProperty(schema, entry.getKey())); assertNull(target2.getProperty(schema, entry.getKey())); } }
@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; }