Package io.milton.http.fs
Class FsFileResource
java.lang.Object
io.milton.http.fs.FsResource
io.milton.http.fs.FsFileResource
- All Implemented Interfaces:
CopyableResource,DeletableResource,DigestResource,GetableResource,LockableResource,MoveableResource,MultiNamespaceCustomPropertyResource,PropFindableResource,ReplaceableResource,Resource
public class FsFileResource
extends FsResource
implements CopyableResource, DeletableResource, GetableResource, MoveableResource, PropFindableResource, ReplaceableResource, MultiNamespaceCustomPropertyResource
-
Constructor Summary
ConstructorsConstructorDescriptionFsFileResource(String host, FileSystemResourceFactory factory, File file, FileContentService contentService) -
Method Summary
Modifier and TypeMethodDescriptioncheckRedirect(Request arg0) protected voidgetContentType(String preferredList) getMaxAgeSeconds(Auth auth) getProperty(QName name) getPropertyMetaData(QName name) voidreplaceContent(InputStream in, Long length) voidsendContent(OutputStream out, Range range, Map<String, String> params, String contentType) voidsetProperty(QName name, Object value) Methods inherited from class io.milton.http.fs.FsResource
authenticate, authenticate, authorise, compareTo, copyTo, delete, getCreateDate, getCurrentLock, getFile, getModifiedDate, getName, getRealm, getUniqueId, isDigestAllowed, lock, moveTo, refreshLock, unlockMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.milton.resource.CopyableResource
copyToMethods inherited from interface io.milton.resource.DeletableResource
deleteMethods inherited from interface io.milton.resource.MoveableResource
moveToMethods inherited from interface io.milton.resource.PropFindableResource
getCreateDateMethods inherited from interface io.milton.resource.Resource
authenticate, authorise, getModifiedDate, getName, getRealm, getUniqueId
-
Constructor Details
-
FsFileResource
public FsFileResource(String host, FileSystemResourceFactory factory, File file, FileContentService contentService) - Parameters:
host- - the requested host. E.g. www.mycompany.comfactory-file-
-
-
Method Details
-
getContentLength
- Specified by:
getContentLengthin interfaceGetableResource
-
getContentType
- Specified by:
getContentTypein interfaceGetableResource
-
checkRedirect
- Specified by:
checkRedirectin interfaceResource
-
sendContent
public void sendContent(OutputStream out, Range range, Map<String, String> params, String contentType) throws IOException, NotFoundException- Specified by:
sendContentin interfaceGetableResource- Throws:
IOExceptionNotFoundException
-
getMaxAgeSeconds
- Specified by:
getMaxAgeSecondsin interfaceGetableResource
-
doCopy
- Specified by:
doCopyin classFsResource
-
replaceContent
public void replaceContent(InputStream in, Long length) throws BadRequestException, ConflictException, NotAuthorizedException - Specified by:
replaceContentin interfaceReplaceableResource- Throws:
BadRequestExceptionConflictExceptionNotAuthorizedException
-
getProperty
- Specified by:
getPropertyin interfaceMultiNamespaceCustomPropertyResource
-
setProperty
public void setProperty(QName name, Object value) throws PropertySource.PropertySetException, NotAuthorizedException - Specified by:
setPropertyin interfaceMultiNamespaceCustomPropertyResource- Throws:
PropertySource.PropertySetExceptionNotAuthorizedException
-
getPropertyMetaData
- Specified by:
getPropertyMetaDatain interfaceMultiNamespaceCustomPropertyResource
-
getAllPropertyNames
- Specified by:
getAllPropertyNamesin interfaceMultiNamespaceCustomPropertyResource
-