org.silverpeas.admin.space.quota
Class AbstractSpaceQuotaService<T extends AbstractSpaceQuotaKey>
java.lang.Object
org.silverpeas.quota.service.AbstractQuotaService<T>
org.silverpeas.admin.space.quota.AbstractSpaceQuotaService<T>
- All Implemented Interfaces:
- SpaceQuotaService<T>, QuotaService<T>
- Direct Known Subclasses:
- DefaultComponentSpaceQuotaService, DefaultDataStorageSpaceQuotaService
public abstract class AbstractSpaceQuotaService<T extends AbstractSpaceQuotaKey>
- extends AbstractQuotaService<T>
- implements SpaceQuotaService<T>
- Author:
- Yohann Chastagnier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSpaceQuotaService
public AbstractSpaceQuotaService()
createKeyFrom
protected abstract T createKeyFrom(SpaceInst space)
- Creates a quota key
- Parameters:
space
-
- Returns:
getQuotaReachedFromSpacePath
public Quota getQuotaReachedFromSpacePath(T key)
- Description copied from interface:
SpaceQuotaService
- Gets the quota reached of the resource from a given quota key in recursively way.
- Specified by:
getQuotaReachedFromSpacePath
in interface SpaceQuotaService<T extends AbstractSpaceQuotaKey>
- Returns:
verify
public Quota verify(T key,
AbstractQuotaCountingOffset countingOffset)
throws QuotaException
- Description copied from interface:
QuotaService
- Verifies if the quota is full or not enough from a given quota key and adding a counting
offset.
If full then a quota full exception is throwed.
If not enough then a quota not enough exception is throwed.
- Specified by:
verify
in interface QuotaService<T extends AbstractSpaceQuotaKey>
- Overrides:
verify
in class AbstractQuotaService<T extends AbstractSpaceQuotaKey>
- Returns:
- the quota used by the verify treatment
- Throws:
QuotaException
Copyright © 2016 Silverpeas. All Rights Reserved.