Package com.bradmcevoy.http

Examples of com.bradmcevoy.http.QuotaResource


    private final static Logger log = LoggerFactory.getLogger( DefaultStorageChecker.class );

    public StorageErrorReason checkStorageOnReplace( Request request, CollectionResource parent, Resource replaced, String host ) {
        if( parent instanceof QuotaResource ) {
            QuotaResource qr = (QuotaResource) parent;
            Long llAvail = qr.getQuotaAvailable();
            if( llAvail == null ) {
                log.debug( "no quota data available" );
                return null;
            }
            if( llAvail <= 0 ) {
View Full Code Here


        }
    }

    public StorageErrorReason checkStorageOnAdd( Request request, CollectionResource nearestParent, Path parentPath, String host ) {
        if( nearestParent instanceof QuotaResource ) {
            QuotaResource qr = (QuotaResource) nearestParent;
            Long llAvail = qr.getQuotaAvailable();
            if( llAvail == null ) {
                log.debug( "no quota data available" );
                return null;
            }
            if( llAvail <= 0 ) {
View Full Code Here

*/
public class DefaultQuotaDataAccessor implements QuotaDataAccessor {

    public Long getQuotaAvailable( Resource res ) {
        if( res instanceof QuotaResource ) {
            QuotaResource quotaRes = (QuotaResource) res;
            Long l = quotaRes.getQuotaAvailable();
            return l;
        } else {
            return null;
        }

View Full Code Here

    }

    public Long getQuotaUsed( Resource res ) {
        if( res instanceof QuotaResource ) {
            QuotaResource quotaRes = (QuotaResource) res;
            Long l = quotaRes.getQuotaUsed();
            return l;
        } else {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.QuotaResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.