Package tigase.http.upload.logic
Class DefaultLogic
- java.lang.Object
-
- tigase.http.upload.logic.DefaultLogic
-
- All Implemented Interfaces:
Logic
@Bean(name="logic", parent=FileUploadComponent.class, active=true, exportable=true) public class DefaultLogic extends Object implements Logic
Created by andrzej on 07.08.2016.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultLogic.HttpProtocol
-
Constructor Summary
Constructors Constructor Description DefaultLogic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generateSlotId()
protected String
generateURI(UriFormat format, tigase.xmpp.jid.JID requester, String slotId, String filename)
String
getDownloadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)
String
getDownloadUriFormat()
UriFormat
getDownloadURIFormat()
long
getMaxFileSize()
String
getUploadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)
String
getUploadUriFormat()
UriFormat
getUploadURIFormat()
void
removeExpired(Duration expirationTime, int limit)
String
requestSlot(tigase.xmpp.jid.JID requester, String filename, long filesize, String contentType)
void
setDownloadUriFormat(String format)
void
setUploadUriFormat(String format)
-
-
-
Method Detail
-
getUploadUriFormat
public String getUploadUriFormat()
-
setUploadUriFormat
public void setUploadUriFormat(String format)
-
getDownloadUriFormat
public String getDownloadUriFormat()
-
setDownloadUriFormat
public void setDownloadUriFormat(String format)
-
getMaxFileSize
public long getMaxFileSize()
- Specified by:
getMaxFileSize
in interfaceLogic
-
requestSlot
public String requestSlot(tigase.xmpp.jid.JID requester, String filename, long filesize, String contentType) throws tigase.component.exceptions.ComponentException
- Specified by:
requestSlot
in interfaceLogic
- Throws:
tigase.component.exceptions.ComponentException
-
getUploadURI
public String getUploadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)
- Specified by:
getUploadURI
in interfaceLogic
-
getDownloadURI
public String getDownloadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)
- Specified by:
getDownloadURI
in interfaceLogic
-
generateSlotId
public String generateSlotId()
- Specified by:
generateSlotId
in interfaceLogic
-
getUploadURIFormat
public UriFormat getUploadURIFormat()
- Specified by:
getUploadURIFormat
in interfaceLogic
-
getDownloadURIFormat
public UriFormat getDownloadURIFormat()
- Specified by:
getDownloadURIFormat
in interfaceLogic
-
removeExpired
public void removeExpired(Duration expirationTime, int limit)
- Specified by:
removeExpired
in interfaceLogic
-
-