Interface UploadProfile


public interface UploadProfile
An upload profile contains information for a specific upload service. This class is a simple holder for a blob with a type, title, and description. The profile data is interpreted by the service it is handled to.
  • Method Details

    • getID

      String getID()
      Returns a unique id that identifies this specific upload profile.
    • isEditable

      boolean isEditable()
      Inspects this profile to see if it is editable. Use this method too check if this profile can be used by the UploadService editProfile method.
      Returns:
      true if this profile can be edited, otherwise false.
      See Also:
      • UploadService.editProfile
    • isWebbable

      boolean isWebbable()
      Inspects this profile to see if the published content is webbable, i.e. viewed in a web browser, such as Internet Explorer.
      (Sorry, but the name isBrowsable was taken)
      Returns:
      true if this profile can be webbed, otherwise false.
    • isBrowsable

      boolean isBrowsable()
      Inspects this profile to see if the published content is browsable, i.e. viewed in a filesystem browser such a Explorer.
      Returns:
      true if this profile can be browsed, otherwise false.
    • isZipped

      default boolean isZipped()
      Returns true if a zip of the content will be created and uploaded.
    • isZipOnly

      default boolean isZipOnly()
      Returns true if only a zip file will be created and uploaded.
    • getZipFileName

      default String getZipFileName()
    • isNotifySubscribers

      default boolean isNotifySubscribers()
      Returns true if subscribers should be notified
    • getSourceServerId

      default Optional<String> getSourceServerId()
      Returns the source server id
    • getSourceRepositoryId

      default Optional<String> getSourceRepositoryId()
      Returns the source repository UUID
    • save

      void save() throws IOException
      Saves changes to the profile back to the database or filesystem.
      Throws:
      MTAccessException
      IOException
      Since:
      3.0
    • remove

      void remove() throws IOException
      Removes this profile from the database or filesystem.
      Throws:
      MTAccessException
      IOException
      Since:
      3.0
    • getTitle

      String getTitle()
      Return the title of the profile.
      Returns:
      The profile title.
      Since:
      3.2
    • getDescription

      String getDescription()
      Returns the description of the profile.
      Returns:
      The profile description.
      Since:
      3.2
    • getURL

      URL getURL()
      check isWebbable() before calling this method
      Returns:
      returns the webbable URL
    • getBrowsableURL

      URL getBrowsableURL() throws MalformedURLException
      check isBrowsable() before calling this method
      Returns:
      returns the browsable URL
      Throws:
      MalformedURLException
    • upload

      void upload(File source, BiFunction<Path,String,Boolean> removeExistingFilter, ProgressCallback progress) throws UploadException, IOException
      Upload using this service.
      Throws:
      UploadException
      IOException
    • getUploadService

      Class<? extends UploadService> getUploadService()
    • testConnection

      default boolean testConnection()
    • finalizeUpload

      default void finalizeUpload()
    • setBrowsablePath

      default void setBrowsablePath(String relativePath)