Interface IFileSystemEntryAccessor<Holder,​Entry extends IFileSystemEntry<Entry>>

  • Type Parameters:
    Holder - Type of the object containing the file system entry in its instance state.
    Entry - Type of the file system entry.
    All Known Subinterfaces:
    IEntityFileSystemBeanAdapter<Entry,​Entity,​Scope>

    public interface IFileSystemEntryAccessor<Holder,​Entry extends IFileSystemEntry<Entry>>
    An accessor for file system entries of a given type of object. Consists of two methods: one to extract the file system entry contained in the instance state of an object; and one to incorporate a given entry into the instance state of an object.

    For example, a JPA entity might store the file path in a String field. The extractor method could split that string at the path separator (a forward slash /) and return a new file system with those path parts. The mutator method could join the path parts and store the new path in the entity.

    Since:
    8.3.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getFileSystemEntry

        Entry getFileSystemEntry​(Holder object)
        Extracts the file system entry from the instance state of a given instance.
        Parameters:
        object - The object whose instance state should be queried.
        Returns:
        The entry representing the location of the object on the file system.
      • setFileSystemEntry

        void setFileSystemEntry​(Holder object,
                                Entry entry)
        Incorporates the file system entry into the instance state of a given object, effectively moving the object to a new location on the file system. After this method completes successfully, extractEntry must return the same entry as the one passed to this method.
        Parameters:
        object - The object whose instance state should be mutated.
        entry - The entry representing the new location for the object on the file system.