Package overit.geocall.aws.servlet.wr
Class S3WebResource
java.lang.Object
overit.geocall.servlet.WebResource
overit.geocall.aws.servlet.wr.S3WebResource
- All Implemented Interfaces:
DataSource,Serializable,Cloneable,overit.geocall.clipboard.ClipboardObject,overit.geocall.marks.NameExposer
Implementation of a web resource managed by the AWS S3's service.
- See Also:
-
Field Summary
FieldsFields inherited from class overit.geocall.servlet.WebResource
DOCUMENTS, S, TMP -
Constructor Summary
ConstructorsConstructorDescriptionS3WebResource(S3WebResourceFactory factory, String path) Create a new reference of a hypothetical web resource identified by the passed path. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToDBView(software.amazon.awssdk.services.s3.model.S3Object o, DBView dbv, Matcher m, int cols) anotherFile(String name) Creates another fileclone()copyTo(WebResource wr) Copy a filedate()Returns the Datedelete()Delete a filebooleanexists()Returntrueif exist,falseotherwisebooleanCopies the input File in the output FileReturns the base nameReturns the containerReturns aDBViewgetDirectDownloadUrl(overit.geocall.servlet.WebResourceUrl wru) returns a direct resource download url or null if not possiblegetDirectUploadUrl(overit.geocall.servlet.WebResourceUrl wru) returns a direct resource upload url or null if not possibleReturns the foldergetName()getOutputStream(boolean append) Returns the OutputStreamgetResource(String resource) Returns a resource with a given nameReturns theSourcebooleanisFile()Returntrueif is a file,falseotherwisebooleanisFolder()Returntrueif is a folder,falseotherwisebooleanReturntrueif the folder is empty,falseotherwisebooleanisRoot()Returntrueif is the root,falseotherwiselonglength()Gets the length of the pathoverit.geocall.clipboard.ClipboardObjectonCopy()overit.geocall.clipboard.ClipboardObjectonCut()voidonLost(boolean wasCut) overit.geocall.clipboard.ClipboardObjectonPaste(overit.geocall.clipboard.PasteEvent pe, boolean wasCut) Renames a fileSaves anUpFilebooleanCopies the input File in the output FiletoString()Methods inherited from class overit.geocall.servlet.WebResource
encodePart, getContentType, getFolder, getFolder, getIcon, getMimeType, getOutputStream, getResource, getResource, locateFolder, locateFolder, locateResource
-
Field Details
-
fullName
-
factory
-
-
Constructor Details
-
S3WebResource
Create a new reference of a hypothetical web resource identified by the passed path.- Parameters:
factory- the reference of the factory objectpath- the full path of the resource
-
-
Method Details
-
exists
public boolean exists()Description copied from class:WebResourceReturntrueif exist,falseotherwise- Specified by:
existsin classWebResource- Returns:
trueif exist,falseotherwise
-
isFile
public boolean isFile()Description copied from class:WebResourceReturntrueif is a file,falseotherwise- Specified by:
isFilein classWebResource- Returns:
trueif is a file,falseotherwise
-
isFolder
public boolean isFolder()Description copied from class:WebResourceReturntrueif is a folder,falseotherwise- Specified by:
isFolderin classWebResource- Returns:
trueif is a folder,falseotherwise
-
isFolderEmpty
public boolean isFolderEmpty()Description copied from class:WebResourceReturntrueif the folder is empty,falseotherwise- Specified by:
isFolderEmptyin classWebResource- Returns:
trueif the folder is empty,falseotherwise
-
isRoot
public boolean isRoot()Description copied from class:WebResourceReturntrueif is the root,falseotherwise- Specified by:
isRootin classWebResource- Returns:
trueif is the root,falseotherwise
-
getContainer
Description copied from class:WebResourceReturns the container- Specified by:
getContainerin classWebResource- Returns:
- The container
-
getResource
Description copied from class:WebResourceReturns a resource with a given name- Specified by:
getResourcein classWebResource- Parameters:
resource- The name of the resource- Returns:
- The WebResource
-
getFolder
Description copied from class:WebResourceReturns the folder- Specified by:
getFolderin classWebResource- Parameters:
folder- The name of the foldercreate- Boolean indicating if the folder should be created or not- Returns:
- The WebResource
-
anotherFile
Description copied from class:WebResourceCreates another file- Specified by:
anotherFilein classWebResource- Parameters:
name- Name of the file- Returns:
- The WebResource
-
delete
Description copied from class:WebResourceDelete a file- Specified by:
deletein classWebResource- Returns:
- A string indicating why is failing
-
save
Description copied from class:WebResourceSaves anUpFile- Specified by:
savein classWebResource- Parameters:
uf- TheUpFileto save- Returns:
- A string indicating why is failing
-
renameTo
Description copied from class:WebResourceRenames a file- Specified by:
renameToin classWebResource- Parameters:
newName- The new name- Returns:
- A string indicating why is failing
-
copyTo
Description copied from class:WebResourceCopy a file- Specified by:
copyToin classWebResource- Parameters:
wr- The WebResource- Returns:
- A string indicating why is failing
-
getDBView
Description copied from class:WebResourceReturns aDBView- Specified by:
getDBViewin classWebResource- Parameters:
s- String containing the regular expression- Returns:
- A string indicating why is failing
-
addToDBView
-
getBasename
Description copied from class:WebResourceReturns the base name- Specified by:
getBasenamein classWebResource- Returns:
- Returns the base name
-
toString
- Specified by:
toStringin classWebResource
-
clone
- Specified by:
clonein classWebResource
-
getOutputStream
Description copied from class:WebResourceReturns the OutputStream- Specified by:
getOutputStreamin classWebResource- Parameters:
append- Boolean indicating if append should be enabled or not- Returns:
- The OutpurStream
-
getInputStream
- Specified by:
getInputStreamin interfaceDataSource- Specified by:
getInputStreamin classWebResource
-
toFile
Description copied from class:WebResourceCopies the input File in the output File- Specified by:
toFilein classWebResource- Parameters:
file- String containing the path of the file- Returns:
trueif the copy was successful,falseotherwise
-
fromFile
Description copied from class:WebResourceCopies the input File in the output File- Specified by:
fromFilein classWebResource- Parameters:
file- String containing the path of the file- Returns:
trueif the copy was successful,falseotherwise
-
length
public long length()Description copied from class:WebResourceGets the length of the path- Specified by:
lengthin classWebResource- Returns:
- The lenght of the path
-
date
Description copied from class:WebResourceReturns the Date- Specified by:
datein classWebResource- Returns:
- The Date
-
getSource
Description copied from class:WebResourceReturns theSource- Specified by:
getSourcein classWebResource- Returns:
- The
Source
-
onLost
public void onLost(boolean wasCut) -
onCopy
public overit.geocall.clipboard.ClipboardObject onCopy() -
onCut
public overit.geocall.clipboard.ClipboardObject onCut() -
onPaste
public overit.geocall.clipboard.ClipboardObject onPaste(overit.geocall.clipboard.PasteEvent pe, boolean wasCut) throws overit.geocall.clipboard.ClipboardException - Throws:
overit.geocall.clipboard.ClipboardException
-
getName
-
getDirectDownloadUrl
Description copied from class:WebResourcereturns a direct resource download url or null if not possible- Specified by:
getDirectDownloadUrlin classWebResource- Parameters:
wru- the webresource for which the direct download URL is requested- Returns:
- a pre-signed url for downloading the resource if supported by the implementation, or null if not supported
-
getDirectUploadUrl
Description copied from class:WebResourcereturns a direct resource upload url or null if not possible- Specified by:
getDirectUploadUrlin classWebResource- Parameters:
wru- the webresource for which the direct upload URL is requested- Returns:
- a pre-signed url for uploading the resource if supported by the implementation, or null if not supported
-