org.silverpeas.admin.space.mock
Class DefaultComponentSpaceQuotaService

java.lang.Object
  extended by org.silverpeas.admin.space.mock.DefaultComponentSpaceQuotaService
All Implemented Interfaces:
ComponentSpaceQuotaService, SpaceQuotaService<ComponentSpaceQuotaKey>, QuotaService<ComponentSpaceQuotaKey>

@Service
public class DefaultComponentSpaceQuotaService
extends Object
implements ComponentSpaceQuotaService

No quota handling into unit tests

Author:
Yohann Chastagnier

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

Constructor Detail

DefaultComponentSpaceQuotaService

public DefaultComponentSpaceQuotaService()
Method Detail

getCurrentCount

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

initialize

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

initialize

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

initialize

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

get

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

verify

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

verify

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

remove

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

getQuotaReachedFromSpacePath

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


Copyright © 2016 Silverpeas. All Rights Reserved.