org.silverpeas.admin.space.mock
Class DefaultDataStorageSpaceQuotaService

java.lang.Object
  extended by org.silverpeas.admin.space.mock.DefaultDataStorageSpaceQuotaService
All Implemented Interfaces:
DataStorageSpaceQuotaService, SpaceQuotaService<DataStorageSpaceQuotaKey>, QuotaService<DataStorageSpaceQuotaKey>

@Service
public class DefaultDataStorageSpaceQuotaService
extends Object
implements DataStorageSpaceQuotaService

No quota handling into unit tests

Author:
Yohann Chastagnier

Constructor Summary
DefaultDataStorageSpaceQuotaService()
           
 
Method Summary
 Quota get(DataStorageSpaceQuotaKey key)
           
 long getCurrentCount(DataStorageSpaceQuotaKey key)
           
 Quota getQuotaReachedFromSpacePath(DataStorageSpaceQuotaKey key)
           
 Quota initialize(DataStorageSpaceQuotaKey key, long maxCount)
           
 Quota initialize(DataStorageSpaceQuotaKey key, long minCount, long maxCount)
           
 Quota initialize(DataStorageSpaceQuotaKey key, Quota quota)
           
 void remove(DataStorageSpaceQuotaKey key)
           
 Quota verify(DataStorageSpaceQuotaKey key)
           
 Quota verify(DataStorageSpaceQuotaKey key, AbstractQuotaCountingOffset countingOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDataStorageSpaceQuotaService

public DefaultDataStorageSpaceQuotaService()
Method Detail

getCurrentCount

public long getCurrentCount(DataStorageSpaceQuotaKey key)
                     throws QuotaException
Specified by:
getCurrentCount in interface QuotaService<DataStorageSpaceQuotaKey>
Throws:
QuotaException

initialize

public Quota initialize(DataStorageSpaceQuotaKey key,
                        long maxCount)
                 throws QuotaException
Specified by:
initialize in interface QuotaService<DataStorageSpaceQuotaKey>
Throws:
QuotaException

initialize

public Quota initialize(DataStorageSpaceQuotaKey key,
                        long minCount,
                        long maxCount)
                 throws QuotaException
Specified by:
initialize in interface QuotaService<DataStorageSpaceQuotaKey>
Throws:
QuotaException

initialize

public Quota initialize(DataStorageSpaceQuotaKey key,
                        Quota quota)
                 throws QuotaException
Specified by:
initialize in interface QuotaService<DataStorageSpaceQuotaKey>
Throws:
QuotaException

get

public Quota get(DataStorageSpaceQuotaKey key)
          throws QuotaException
Specified by:
get in interface QuotaService<DataStorageSpaceQuotaKey>
Throws:
QuotaException

verify

public Quota verify(DataStorageSpaceQuotaKey key)
             throws QuotaException
Specified by:
verify in interface QuotaService<DataStorageSpaceQuotaKey>
Throws:
QuotaException

verify

public Quota verify(DataStorageSpaceQuotaKey key,
                    AbstractQuotaCountingOffset countingOffset)
             throws QuotaException
Specified by:
verify in interface QuotaService<DataStorageSpaceQuotaKey>
Throws:
QuotaException

remove

public void remove(DataStorageSpaceQuotaKey key)
Specified by:
remove in interface QuotaService<DataStorageSpaceQuotaKey>

getQuotaReachedFromSpacePath

public Quota getQuotaReachedFromSpacePath(DataStorageSpaceQuotaKey key)
Specified by:
getQuotaReachedFromSpacePath in interface SpaceQuotaService<DataStorageSpaceQuotaKey>


Copyright © 2016 Silverpeas. All Rights Reserved.