Class DefaultDataStorageSpaceQuotaService
- java.lang.Object
-
- org.silverpeas.core.admin.quota.service.AbstractQuotaService<T>
-
- org.silverpeas.core.admin.space.quota.AbstractSpaceQuotaService<DataStorageSpaceQuotaKey>
-
- org.silverpeas.core.admin.space.quota.DefaultDataStorageSpaceQuotaService
-
- All Implemented Interfaces:
QuotaService<DataStorageSpaceQuotaKey>
,DataStorageSpaceQuotaService
,SpaceQuotaService<DataStorageSpaceQuotaKey>
@Service @Singleton public class DefaultDataStorageSpaceQuotaService extends AbstractSpaceQuotaService<DataStorageSpaceQuotaKey> implements DataStorageSpaceQuotaService
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description DefaultDataStorageSpaceQuotaService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DataStorageSpaceQuotaKey
createKeyFrom(SpaceInst space)
Creates a quota key for the specified space.Quota
get(DataStorageSpaceQuotaKey key)
Gets the quota of the resource from a given quota key.long
getCurrentCount(DataStorageSpaceQuotaKey key)
Gets the current count from a given quota keyprotected boolean
isActivated()
Indicates if the type of quota is activated-
Methods inherited from class org.silverpeas.core.admin.space.quota.AbstractSpaceQuotaService
getQuotaReachedFromSpacePath, verify
-
Methods inherited from class org.silverpeas.core.admin.quota.service.AbstractQuotaService
initialize, initialize, initialize, remove, verify, verify, verify, verifyQuota
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.admin.quota.service.QuotaService
initialize, initialize, initialize, remove, verify, verify, verify, verify
-
Methods inherited from interface org.silverpeas.core.admin.space.quota.SpaceQuotaService
getQuotaReachedFromSpacePath
-
-
-
-
Method Detail
-
get
public Quota get(DataStorageSpaceQuotaKey key) throws QuotaException
Description copied from interface:QuotaService
Gets the quota of the resource from a given quota key. A save operation is done if the current count has changed.- Specified by:
get
in interfaceQuotaService<DataStorageSpaceQuotaKey>
- Overrides:
get
in classAbstractQuotaService<DataStorageSpaceQuotaKey>
- Parameters:
key
- the key- Returns:
- the quota mapped with the key
- Throws:
QuotaException
-
createKeyFrom
protected DataStorageSpaceQuotaKey createKeyFrom(SpaceInst space)
Description copied from class:AbstractSpaceQuotaService
Creates a quota key for the specified space.- Specified by:
createKeyFrom
in classAbstractSpaceQuotaService<DataStorageSpaceQuotaKey>
- Parameters:
space
- a space instance.- Returns:
- the key
-
getCurrentCount
public long getCurrentCount(DataStorageSpaceQuotaKey key)
Description copied from interface:QuotaService
Gets the current count from a given quota key- Specified by:
getCurrentCount
in interfaceQuotaService<DataStorageSpaceQuotaKey>
- Parameters:
key
- the key- Returns:
- the current count
-
isActivated
protected boolean isActivated()
Description copied from class:AbstractQuotaService
Indicates if the type of quota is activated- Specified by:
isActivated
in classAbstractQuotaService<DataStorageSpaceQuotaKey>
- Returns:
- true if activated, false otherwise
-
-