public GuidedDecisionTableUtils(
     final PackageDataModelOracle oracle, final GuidedDecisionTable52 model) {
   PortablePreconditions.checkNotNull("oracle", oracle);
   PortablePreconditions.checkNotNull("model", model);
   this.oracle = oracle;
   this.model = model;
 }
Beispiel #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);
  }
  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());
    }
  }
Beispiel #4
0
  @Override
  public OutputStream openFile(String path) {

    checkNotNull("path", path);

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

    checkNotNull("path", path);

    return ioService.deleteIfExists(ioService.get("git://jbpm-playground/" + path));
  }
Beispiel #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);
 }
Beispiel #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);
    }
  }
Beispiel #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);
  }
Beispiel #12
0
 public FileItem(final Path path, final String caption) {
   super(path, caption);
   PortablePreconditions.checkNotNull("path", path);
 }