@Override public void save(final Path path, final GuidedDecisionTable52 model, final String comment) { ioService.write( paths.convert(path), GuidedDTXMLPersistence.getInstance().marshal(model), makeCommentedOption(comment)); }
@Override public void save( final Path resource, final GuidedDecisionTable52 model, final ResourceConfig config, final Metadata metadata, final String comment) { final org.kie.commons.java.nio.file.Path path = paths.convert(resource); Map<String, Object> attrs; try { attrs = ioService.readAttributes(path); } catch (final NoSuchFileException ex) { attrs = new HashMap<String, Object>(); } if (config != null) { attrs = resourceConfigService.configAttrs(attrs, config); } if (metadata != null) { attrs = metadataService.configAttrs(attrs, metadata); } ioService.write( path, GuidedDTXMLPersistence.getInstance().marshal(model), attrs, makeCommentedOption(comment)); }
@Override public GuidedDecisionTable52 loadRuleModel(Path path) { return GuidedDTXMLPersistence.getInstance() .unmarshal(ioService.readAllString(paths.convert(path))); }