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 LogicCreated by andrzej on 07.08.2016.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultLogic.HttpProtocol
-
Constructor Summary
Constructors Constructor Description DefaultLogic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateSlotId()protected StringgenerateURI(UriFormat format, tigase.xmpp.jid.JID requester, String slotId, String filename)StringgetDownloadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)StringgetDownloadUriFormat()UriFormatgetDownloadURIFormat()longgetMaxFileSize()StringgetUploadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)StringgetUploadUriFormat()UriFormatgetUploadURIFormat()voidremoveExpired(Duration expirationTime, int limit)StringrequestSlot(tigase.xmpp.jid.JID requester, String filename, long filesize, String contentType)voidsetDownloadUriFormat(String format)voidsetUploadUriFormat(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:
getMaxFileSizein interfaceLogic
-
requestSlot
public String requestSlot(tigase.xmpp.jid.JID requester, String filename, long filesize, String contentType) throws tigase.component.exceptions.ComponentException
- Specified by:
requestSlotin interfaceLogic- Throws:
tigase.component.exceptions.ComponentException
-
getUploadURI
public String getUploadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)
- Specified by:
getUploadURIin interfaceLogic
-
getDownloadURI
public String getDownloadURI(tigase.xmpp.jid.JID requester, String slotId, String filename)
- Specified by:
getDownloadURIin interfaceLogic
-
generateSlotId
public String generateSlotId()
- Specified by:
generateSlotIdin interfaceLogic
-
getUploadURIFormat
public UriFormat getUploadURIFormat()
- Specified by:
getUploadURIFormatin interfaceLogic
-
getDownloadURIFormat
public UriFormat getDownloadURIFormat()
- Specified by:
getDownloadURIFormatin interfaceLogic
-
removeExpired
public void removeExpired(Duration expirationTime, int limit)
- Specified by:
removeExpiredin interfaceLogic
-
-