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 Summary
Modifier and TypeMethodDescriptiondefault voidcheckisBrowsable()before calling this methodReturns the description of the profile.getID()Returns a unique id that identifies this specific upload profile.Returns the source repository UUIDReturns the source server idgetTitle()Return the title of the profile.Class<? extends UploadService>getURL()checkisWebbable()before calling this methoddefault StringbooleanInspects this profile to see if the published content is browsable, i.e.booleanInspects this profile to see if it is editable.default booleanReturns true if subscribers should be notifiedbooleanInspects this profile to see if the published content is webbable, i.e.default booleanReturns true if only a zip file will be created and uploaded.default booleanisZipped()Returns true if a zip of the content will be created and uploaded.voidremove()Removes this profile from the database or filesystem.voidsave()Saves changes to the profile back to the database or filesystem.default voidsetBrowsablePath(String relativePath) default booleanvoidupload(File source, BiFunction<Path, String, Boolean> removeExistingFilter, ProgressCallback progress) Upload using this service.
-
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
-
isNotifySubscribers
default boolean isNotifySubscribers()Returns true if subscribers should be notified -
getSourceServerId
Returns the source server id -
getSourceRepositoryId
Returns the source repository UUID -
save
Saves changes to the profile back to the database or filesystem.- Throws:
MTAccessExceptionIOException- Since:
- 3.0
-
remove
Removes this profile from the database or filesystem.- Throws:
MTAccessExceptionIOException- 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()checkisWebbable()before calling this method- Returns:
- returns the webbable URL
-
getBrowsableURL
checkisBrowsable()before calling this method- Returns:
- returns the browsable URL
- Throws:
MalformedURLException
-
upload
void upload(File source, BiFunction<Path, String, throws UploadException, IOExceptionBoolean> removeExistingFilter, ProgressCallback progress) Upload using this service.- Throws:
UploadExceptionIOException
-
getUploadService
Class<? extends UploadService> getUploadService() -
testConnection
default boolean testConnection() -
finalizeUpload
default void finalizeUpload() -
setBrowsablePath
-