Package com.jalios.jcms.upload
Class QuotaPolicyFilter
java.lang.Object
com.jalios.jcms.policy.AbstractPolicyFilter
com.jalios.jcms.policy.BasicRightPolicyFilter
com.jalios.jcms.upload.QuotaPolicyFilter
- All Implemented Interfaces:
PluginComponent,PolicyFilter,RightPolicyFilter,Comparable
-
Field Summary
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
orderFields inherited from interface com.jalios.jcms.policy.RightPolicyFilter
CTXT_CATEGORIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the uploaded file must be accepted or rejected.booleancheckBeforeUpload(String fieldName, String contentType, String fileName) Checks if the uploaded file must be accepted or rejected.Methods inherited from class com.jalios.jcms.policy.BasicRightPolicyFilter
callCanBeReadBy, callCanBeReadBy, canBeReadBy, canBeReadBy, canBeReadBy, canBeReadBy, canBeReadBy, canCreateContact, canCreateWorkspace, canDeleteOther, canDeleteOther, canManageCategory, canPublish, canUpdateOther, canUpdateOther, canUseCategory, canWorkOn, canWorkOn, checkAccess, checkHtml, getWorkspaceSet, init, isAdmin, isWorkerMethods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrderMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.jalios.jcms.policy.RightPolicyFilter
getOrder
-
Constructor Details
-
QuotaPolicyFilter
public QuotaPolicyFilter()
-
-
Method Details
-
checkBeforeUpload
Description copied from interface:RightPolicyFilterChecks if the uploaded file must be accepted or rejected. This method is called by sub classes of MultiPartFilter AFTER InitFilter BUT BEFORE doInitPage.jsp. The file has not been uploaded. The JcmsContext returned by Channel.getCurrentJcmsContext() is not completly initialized.- Specified by:
checkBeforeUploadin interfaceRightPolicyFilter- Overrides:
checkBeforeUploadin classBasicRightPolicyFilter- Parameters:
fieldName- the name of the field for the given filecontentType- the content type of the filefileName- the name of the file- Returns:
- true if the file is accepted
- See Also:
-
checkAfterUpload
Description copied from interface:RightPolicyFilterChecks if the uploaded file must be accepted or rejected. This method is called by DocUploadInfo.doUpload() called by DocUploadHandler and EditDataHandler for MultiPartRequest BEFORE JavaBean validation. The method Channel.getCurrentJcmsContext() must be called to get more information about Member and Workspace.A DataController must be used to check Document during validation.- Specified by:
checkAfterUploadin interfaceRightPolicyFilter- Overrides:
checkAfterUploadin classBasicRightPolicyFilter- Parameters:
info- information about the uploaded file- Returns:
- true if the file is accepted
- See Also:
-