public GuidedDecisionTableUtils(
     final PackageDataModelOracle oracle, final GuidedDecisionTable52 model) {
   PortablePreconditions.checkNotNull("oracle", oracle);
   PortablePreconditions.checkNotNull("model", model);
   this.oracle = oracle;
   this.model = model;
 }
示例#2
0
  @Override
  public void copy(String source, String dest) {

    checkNotNull("source", source);
    checkNotNull("dest", dest);

    Path sourcePath = ioService.get("git://jbpm-playground/" + source);
    Path targetPath = ioService.get("git://jbpm-playground/" + dest);
    ioService.copy(sourcePath, targetPath);
  }
示例#3
0
  public void setImports(final Path path, final Imports resourceImports) {
    checkNotNull("path", path);
    checkNotNull("imports", resourceImports);
    checkNotNull("imports", resourceImports.getImports());

    this.path = path;
    this.resourceImports = resourceImports;

    for (Import item : resourceImports.getImports()) {
      view.addImport(item.getType());
    }
  }
示例#4
0
  @Override
  public OutputStream openFile(String path) {

    checkNotNull("path", path);

    return ioService.newOutputStream(ioService.get("git://jbpm-playground/" + path));
  }
示例#5
0
  @Override
  public boolean deleteIfExists(String path) {

    checkNotNull("path", path);

    return ioService.deleteIfExists(ioService.get("git://jbpm-playground/" + path));
  }
示例#6
0
  @Override
  public Path createDirectory(String path) {

    checkNotNull("path", path);

    return ioService.createDirectory(ioService.get("git://jbpm-playground/" + path));
  }
 public FileExtensionsFilter(final String[] extensions) {
   this.extensions = PortablePreconditions.checkNotNull("extension", extensions);
   for (int i = 0; i < extensions.length; i++) {
     if (!extensions[i].startsWith(".")) {
       extensions[i] = "." + extensions[i];
     }
   }
 }
 public ActionInsertFactCol52ActionInsertFactAdaptor(final ActionInsertFactCol52 action) {
   PortablePreconditions.checkNotNull("action", action);
   this.action = action;
   this.setFactType(action.getFactType());
   final ActionFieldValue afv = new ActionFieldValue();
   afv.setField(action.getFactField());
   afv.setNature(BaseSingleFieldConstraint.TYPE_LITERAL);
   afv.setType(action.getType());
   super.addFieldValue(afv);
 }
示例#9
0
  @Override
  public byte[] loadFile(final Path file) throws FileException {

    checkNotNull("file", file);

    try {
      return ioService.readAllBytes(file);
    } catch (IOException ex) {
      throw new FileException(ex.getMessage(), ex);
    }
  }
示例#10
0
  @Override
  public byte[] loadFile(final String path) throws FileException {
    Path file = ioService.get("git://jbpm-playground/" + path);

    checkNotNull("file", file);

    try {
      return ioService.readAllBytes(file);
    } catch (IOException ex) {
      throw new FileException(ex.getMessage(), ex);
    }
  }
  @Override
  public void setContent(final ProjectImports importTypes, final boolean isReadOnly) {
    checkNotNull("importTypes", importTypes);

    view.setContent(importTypes.getImports().getImports(), isReadOnly);
  }
示例#12
0
 public FileItem(final Path path, final String caption) {
   super(path, caption);
   PortablePreconditions.checkNotNull("path", path);
 }