Interface FileWithVersionsIO<T extends HasVersions>

All Superinterfaces:
ObjectFileReader<T>
All Known Implementing Classes:
ComponentIOComponent, ComponentOverrideIOComponent, PageIOComponent, WebbpmProcessFileAdapter

public interface FileWithVersionsIO<T extends HasVersions> extends ObjectFileReader<T>
Used by MigrationManager to read/write files with versions. Should not be used by other components for reading files, since this component may not perform some required version checks. This interface does not extend FileReader and FileWriter because these component should only be used for migration operations, not for indexing etc
Author:
krylov
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(Path file)
    Checks if this component can work with the file
    Returns the class of objects being read by this component
    Returns a set of packages the object depends on.
    read(Path file)
    Reads the specified file
    void
    write(T obj, Path file)
    Writes the object to specified file

    Methods inherited from interface ru.cg.webbpm.studio.core.api.indexing.ObjectFileReader

    readIfValid
  • Method Details

    • accept

      boolean accept(Path file)
      Checks if this component can work with the file
      Specified by:
      accept in interface ObjectFileReader<T extends HasVersions>
      Parameters:
      file - the file
      Returns:
      if this component can read/write the file
    • read

      T read(Path file)
      Reads the specified file
      Specified by:
      read in interface ObjectFileReader<T extends HasVersions>
      Parameters:
      file - the file path
      Returns:
      the object
    • getObjectClass

      Class<T> getObjectClass()
      Returns the class of objects being read by this component
      Returns:
      object class
    • write

      void write(T obj, Path file)
      Writes the object to specified file
      Parameters:
      obj - the object
      file - the file
    • getUsedPackages

      Set<Package> getUsedPackages(T object)
      Returns a set of packages the object depends on. "depends on package" means that the object contains scripts or components provided by said package
      Parameters:
      object - the object
      Returns:
      set of packages in the project the object depends on