com.jalios.jcms.upload
Class QuotaPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.policy.BasicRightPolicyFilter
          extended by com.jalios.jcms.upload.QuotaPolicyFilter
All Implemented Interfaces:
PluginComponent, PolicyFilter, RightPolicyFilter, Comparable

public class QuotaPolicyFilter
extends BasicRightPolicyFilter


Field Summary
 
Fields inherited from class com.jalios.jcms.policy.BasicRightPolicyFilter
REVISION
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Constructor Summary
QuotaPolicyFilter()
           
 
Method Summary
 boolean checkAfterUpload(DocUploadInfo info)
          Checks if the uploaded file must be accepted or rejected.
 boolean checkBeforeUpload(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, canCreateWorkspace, canDeleteOther, canDeleteOther, canManageCategory, canPublish, canUpdateOther, canUpdateOther, canUseCategory, canWorkOn, canWorkOn, checkAccess, checkHtml, getWorkspaceSet, init, isAdmin, isWorker
 
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jalios.jcms.policy.RightPolicyFilter
getOrder
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

QuotaPolicyFilter

public QuotaPolicyFilter()
Method Detail

checkBeforeUpload

public boolean checkBeforeUpload(String fieldName,
                                 String contentType,
                                 String fileName)
Description copied from interface: RightPolicyFilter
Checks 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:
checkBeforeUpload in interface RightPolicyFilter
Overrides:
checkBeforeUpload in class BasicRightPolicyFilter
Parameters:
fieldName - the name of the field for the given file
contentType - the content type of the file
fileName - the name of the file
Returns:
true if the file is accepted
See Also:
RightPolicyFilter.checkBeforeUpload(String, String, String)

checkAfterUpload

public boolean checkAfterUpload(DocUploadInfo info)
Description copied from interface: RightPolicyFilter
Checks 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:
checkAfterUpload in interface RightPolicyFilter
Overrides:
checkAfterUpload in class BasicRightPolicyFilter
Parameters:
info - information about the uploaded file
Returns:
true if the file is accepted
See Also:
RightPolicyFilter.checkAfterUpload(DocUploadInfo)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.