Package io.jmix.core

Class FileRef

java.lang.Object
io.jmix.core.FileRef
All Implemented Interfaces:
Serializable

public class FileRef extends Object implements Serializable
A reference pointing to a file located in FileStorage.
See Also:
  • Constructor Details

    • FileRef

      public FileRef(String storageName, String path, String fileName, Map<String,String> parameters)
      Creates file reference for the given storage name, path, file name and parameters.
    • FileRef

      public FileRef(String storageName, String path, String fileName)
      Creates file reference for the given storage name, path and file name.
  • Method Details

    • create

      public static FileRef create(String storageName, String path, String fileName)
      Creates file reference for the given storage name, path and file name.
    • getStorageName

      public String getStorageName()
      Returns storage name.
    • getPath

      public String getPath()
      Returns path inside storage.
    • getFileName

      public String getFileName()
      Returns file name.
    • getParameters

      public Map<String,String> getParameters()
      Returns parameters.
    • addParameter

      public void addParameter(String key, String value)
      Add a parameter.
    • fromString

      public static FileRef fromString(String fileRefString)
      Creates FileRef object from its string representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getContentType

      public String getContentType()
      Returns content type according to MIME standard.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object