@Override public boolean supports(final Path destination) { return (drlResourceType.accept(destination) || dslrResourceType.accept(destination)); }
@Override public boolean supportsPath(final Path path) { return dslrType.accept(Paths.convert(path)); }
@Override public boolean supports(final Path destination) { return (drlResourceType.accept(destination) || dslrResourceType.accept(destination)); }
@Override public boolean supports(final Path destination) { return (drlResourceType.accept(destination) || dslrResourceType.accept(destination)); }
@Override public boolean supportsPath(final Path path) { return dslrType.accept(Paths.convert(path)); }
@Override public boolean supports(final Path destination) { return (drlResourceType.accept(destination) || dslrResourceType.accept(destination)); }
private String toSourceUnexpanded(final Path path, final RuleModel content) { //Wrap RuleModel as we need to control whether the DSLs are expanded. Both DRL and DSLR files should not have //DSLs expanded. In the case of DSLRs we need to explicitly control escaping plain-DRL to prevent attempts //by drools to expand it, by forcing the Model->DRL persistence into believing the model has DSLs. final RuleModelWrapper model = new RuleModelWrapper(content, dslrResourceType.accept(path)); final String source = RuleModelDRLPersistenceImpl.getInstance().marshal(model); return source; }
private String toSourceUnexpanded(final Path path, final RuleModel content) { //Wrap RuleModel as we need to control whether the DSLs are expanded. Both DRL and DSLR files should not have //DSLs expanded. In the case of DSLRs we need to explicitly control escaping plain-DRL to prevent attempts //by drools to expand it, by forcing the Model->DRL persistence into believing the model has DSLs. final RuleModelWrapper model = new RuleModelWrapper(content, dslrResourceType.accept(path)); final String source = RuleModelDRLPersistenceImpl.getInstance().marshal(model); return source; }
@Override public RuleModel load(final Path path) { try { final String drl = ioService.readAllString(Paths.convert(path)); final List<String> globals = utilities.loadGlobalsForPackage(path); final PackageDataModelOracle oracle = dataModelService.getDataModel(path); RuleModel ruleModel = null; if (dslrResourceType.accept(path)) { final String[] dsls = utilities.loadDslsForPackage(path); ruleModel = RuleModelDRLPersistenceImpl.getInstance().unmarshalUsingDSL(drl, globals, oracle, persistenceExtensions, dsls); } else { ruleModel = RuleModelDRLPersistenceImpl.getInstance().unmarshal(drl, globals, oracle, persistenceExtensions); } return ruleModel; } catch (Exception e) { throw ExceptionUtilities.handleException(e); } }
@Override public RuleModel load(final Path path) { try { final String drl = ioService.readAllString(Paths.convert(path)); final List<String> globals = utilities.loadGlobalsForPackage(path); final PackageDataModelOracle oracle = dataModelService.getDataModel(path); RuleModel ruleModel = null; if (dslrResourceType.accept(path)) { final String[] dsls = utilities.loadDslsForPackage(path); ruleModel = RuleModelDRLPersistenceImpl.getInstance().unmarshalUsingDSL(drl, globals, oracle, persistenceExtensions, dsls); } else { ruleModel = RuleModelDRLPersistenceImpl.getInstance().unmarshal(drl, globals, oracle, persistenceExtensions); } return ruleModel; } catch (Exception e) { throw ExceptionUtilities.handleException(e); } }
ruleName = FileNameUtil.removeExtension(destination, drlResourceType); } else if (dslrResourceType.accept(destination)) { model = RuleModelDRLPersistenceImpl.getInstance().unmarshalUsingDSL(drl, globals,
ruleName = FileNameUtil.removeExtension(destination, drlResourceType); } else if (dslrResourceType.accept(destination)) { model = RuleModelDRLPersistenceImpl.getInstance().unmarshalUsingDSL(drl, globals,
ruleName = FileNameUtil.removeExtension(destination, drlResourceType); } else if (dslrResourceType.accept(destination)) { model = RuleModelDRLPersistenceImpl.getInstance().unmarshalUsingDSL(drl, globals,
ruleName = FileNameUtil.removeExtension(destination, drlResourceType); } else if (dslrResourceType.accept(destination)) { model = RuleModelDRLPersistenceImpl.getInstance().unmarshalUsingDSL(drl, globals,