Interface AttachmentTypeBlacklistService
-
public interface AttachmentTypeBlacklistService
A service to provide a sensible default list of file extensions to be blacklisted.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]
getBlacklist(java.lang.String[] overrideBlacklist)
Returns the default blacklist, or the supplied override blacklist.boolean
reject(AttachmentDataSource attachmentDataSource)
Checks the attachment against the blacklist.
-
-
-
Field Detail
-
DEFAULT
static final java.lang.String DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBlacklist
java.lang.String[] getBlacklist(java.lang.String[] overrideBlacklist)
Returns the default blacklist, or the supplied override blacklist.- Parameters:
overrideBlacklist
- any existing blacklist which should override the default.- Returns:
- If overrideBlacklist is the single value "DEFAULT" then the blacklist configured for this service will be returned. Otherwise the overrideBlacklist will be returned.
-
reject
boolean reject(AttachmentDataSource attachmentDataSource)
Checks the attachment against the blacklist.- Parameters:
attachmentDataSource
- the attachment to check.- Returns:
- true if the attachment should be rejected, false if the attachment is acceptable.
-
-