Interface IRepositoryConnection

All Superinterfaces:
IRepositoryReadOnlyConnection

public interface IRepositoryConnection extends IRepositoryReadOnlyConnection
Connection to some hierarchical file storage. The connection can be obtained only inside transaction and is automatically closed on transaction end.
  • Method Details

    • makeFolders

      void makeFolders(ILocation loc) throws RepositoryException
      Makes all folders on the given location path (if not already created).

      The location can't be a null or have a revision

      Parameters:
      loc - location
      Throws:
      RepositoryException - if error occurs
    • create

      void create(ILocation loc, InputStream content) throws RepositoryException
      Creates empty file on given location.

      The location can't be a null or have a revision

      Parameters:
      loc - location
      content - content of a new file
      Throws:
      RepositoryException - if error occurs
    • create

      void create(ILocation loc, InputStream content, Boolean locExists) throws RepositoryException
      Parameters:
      loc -
      content -
      locExists -
      Throws:
      RepositoryException
      Since:
      3.4.1
    • delete

      void delete(ILocation loc) throws RepositoryException
      Deletes given location.

      Does conflict detection if location has revision.

      The location can't be a null

      Parameters:
      loc - location
      Throws:
      RepositoryException - if error occurs
    • move

      void move(ILocation oldLoc, ILocation newLoc, boolean overwrite) throws RepositoryException
      Moves resource from old location to new location.

      Does conflict detection if old location has revision.

      The locations can't be a null and new location can't have a revision

      Parameters:
      oldLoc - old location
      newLoc - new location
      Throws:
      RepositoryException - if error occurs
    • copy

      void copy(ILocation oldLoc, ILocation newLoc, boolean overwrite) throws RepositoryException
      Copies resource from old location to new location.

      Conflict detection is not used.

      The locations can't be a null and new location can't have a revision

      Parameters:
      oldLoc - old location
      newLoc - new location
      Throws:
      RepositoryException - if error occurs
    • setContent

      void setContent(ILocation loc, InputStream content) throws RepositoryException
      Sets file content.

      Does conflict detection if location has revision.

      The location and content can't be a null

      Parameters:
      loc - location
      content - new content as stream of bytes
      Throws:
      RepositoryException - if error occurs
    • setProperty

      void setProperty(ILocation loc, String name, String value) throws RepositoryException
      Sets property value.

      Does conflict detection if location has revision.

      The location, name and value can't be a null

      Parameters:
      loc - resource location
      name - property name
      value - property value
      Throws:
      RepositoryException - if error occurs
    • removeProperty

      void removeProperty(ILocation loc, String name) throws RepositoryException
      Removes property.

      Does conflict detection if location has revision.

      The location and the name can't be a null

      Parameters:
      loc - resource location
      name - property name
      Throws:
      RepositoryException - if error occurs