| Modifier and Type | Field and Description |
|---|---|
protected Map<Folder,List<Resource>> |
cache |
displayName, name, parent| Constructor and Description |
|---|
Folder(Folder parent,
PropFindResponse resp,
Map<Folder,List<Resource>> cache) |
Folder(Folder parent,
String name,
Map<Folder,List<Resource>> cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(FolderListener l) |
Resource |
child(String childName) |
List<? extends Resource> |
children() |
Folder |
createFolder(String name) |
File |
downloadTo(File destFolder,
ProgressListener listener) |
String |
encodedUrl() |
void |
flush()
Empty the cached children for this folder
|
Resource |
getChild(int num) |
boolean |
hasChildren() |
String |
href()
Returns the UN-encoded url
|
int |
numChildren() |
String |
post(String relativePath,
Map<String,String> params) |
void |
removeListener(FolderListener folderListener) |
String |
toString() |
void |
upload(File f) |
void |
upload(File f,
ProgressListener listener) |
File |
upload(String name,
InputStream content,
Integer contentLength,
ProgressListener listener) |
File |
upload(String name,
InputStream content,
Long contentLength,
ProgressListener listener)
Upload a new file
|
File |
upload(String name,
InputStream content,
Long contentLength,
String contentType,
IfMatchCheck matchCheck,
ProgressListener listener) |
File |
uploadFile(File f) |
File |
uploadFile(File f,
ProgressListener listener)
Load a new file into this folder, and return a reference
|
File |
uploadFile(String newName,
File f,
ProgressListener listener)
Upload a new file
|
protected void |
uploadFolder(File folder,
ProgressListener listener) |
addListener, copyTo, copyTo, decodePath, delete, encodedName, finalize, getCount, getCreatedDate, getLockOwner, getLockToken, getModifiedDate, host, lock, lock, moveTo, moveTo, path, post, removeListener, rename, unlockpublic void addListener(FolderListener l) throws IOException, HttpException, NotAuthorizedException, BadRequestException
public String post(String relativePath, Map<String,String> params) throws HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
relativePath - - encoded but relative path. Must not start with a
slashparams - HttpExceptionNotAuthorizedExceptionConflictExceptionBadRequestExceptionNotFoundExceptionpublic File downloadTo(File destFolder, ProgressListener listener) throws IOException, HttpException, NotAuthorizedException, BadRequestException
downloadTo in class ResourceIOExceptionHttpExceptionNotAuthorizedExceptionBadRequestExceptionpublic void flush()
throws IOException
IOExceptionpublic boolean hasChildren()
throws IOException,
HttpException,
NotAuthorizedException,
BadRequestException
public int numChildren()
throws IOException,
HttpException,
NotAuthorizedException,
BadRequestException
public List<? extends Resource> children() throws IOException, HttpException, NotAuthorizedException, BadRequestException
public Resource getChild(int num) throws IOException, HttpException, NotAuthorizedException, BadRequestException
public void removeListener(FolderListener folderListener)
public void upload(File f) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
public void upload(File f, ProgressListener listener) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
f - listener - throttle - - optional, can be used to slow down the transferIOExceptionHttpExceptionNotAuthorizedExceptionConflictExceptionBadRequestExceptionNotFoundExceptionpublic File uploadFile(File f) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
public File uploadFile(File f, ProgressListener listener) throws FileNotFoundException, IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
f - listener - FileNotFoundExceptionIOExceptionHttpExceptionNotAuthorizedExceptionConflictExceptionBadRequestExceptionNotFoundExceptionpublic File uploadFile(String newName, File f, ProgressListener listener) throws FileNotFoundException, IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
newName - f - listener - FileNotFoundExceptionIOExceptionHttpExceptionNotAuthorizedExceptionConflictExceptionBadRequestExceptionNotFoundExceptionprotected void uploadFolder(File folder, ProgressListener listener) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
public File upload(String name, InputStream content, Integer contentLength, ProgressListener listener) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
public File upload(String name, InputStream content, Long contentLength, ProgressListener listener) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
name - content - contentLength - listener - IOExceptionHttpExceptionNotAuthorizedExceptionConflictExceptionBadRequestExceptionNotFoundExceptionpublic File upload(String name, InputStream content, Long contentLength, String contentType, IfMatchCheck matchCheck, ProgressListener listener) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
name - content - contentLength - contentType - etag - - the expected etag of the file being overwritten, or null if
expecting to create newlistener - IOExceptionHttpExceptionNotAuthorizedExceptionConflictExceptionBadRequestExceptionNotFoundExceptionpublic Folder createFolder(String name) throws IOException, HttpException, NotAuthorizedException, ConflictException, BadRequestException, NotFoundException
public Resource child(String childName) throws IOException, HttpException, NotAuthorizedException, BadRequestException
public String encodedUrl()
encodedUrl in class ResourceCopyright © 2021 McEvoy Software Ltd. All rights reserved.