public class RepoUsageComponentImpl extends Object implements RepoUsageComponent
RepoUsageComponent.RestrictionObserver
KEY_USAGE_CURRENT, KEY_USAGE_DOCUMENTS, KEY_USAGE_LAST_UPDATE_DOCUMENTS, KEY_USAGE_LAST_UPDATE_USERS, KEY_USAGE_ROOT, KEY_USAGE_USERS
Constructor and Description |
---|
RepoUsageComponentImpl()
Defaults
|
Modifier and Type | Method and Description |
---|---|
RepoUsage |
getRestrictions() |
RepoUsage |
getUsage()
Get the current repository usage data.
|
RepoUsageStatus |
getUsageStatus()
Calculate and retrieve full status alerts based on the usage and license expiry state.
|
void |
init()
Check that all properties are properly set
|
void |
observeRestrictions(RepoUsageComponent.RestrictionObserver observer)
Observe when restrictions change
|
boolean |
resetUsage(RepoUsage.UsageType usageType)
Force a reset of the current repository usage.
|
void |
setAttributeService(AttributeService attributeService) |
void |
setAuthorityService(AuthorityService authorityService) |
void |
setCannedQueryDAO(CannedQueryDAO cannedQueryDAO) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setQnameDAO(QNameDAO qnameDAO) |
void |
setRestrictions(RepoUsage restrictions)
Record changes to the restrictions imposed on the repository.
|
void |
setTransactionService(TransactionService transactionService) |
boolean |
updateUsage(RepoUsage.UsageType usageType)
Force an update of the current repository usage.
|
public void setTransactionService(TransactionService transactionService)
transactionService
- service that tells if the server is read-only or notpublic void setAuthorityService(AuthorityService authorityService)
authorityService
- service to check for admin rightspublic void setAttributeService(AttributeService attributeService)
attributeService
- service used to store usage attributespublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService
- component to resolve types and subtypespublic void setCannedQueryDAO(CannedQueryDAO cannedQueryDAO)
cannedQueryDAO
- DAO for executing queriespublic void setQnameDAO(QNameDAO qnameDAO)
qnameDAO
- DAO for getting IDs of QNamespublic void observeRestrictions(RepoUsageComponent.RestrictionObserver observer)
RepoUsageComponent
observeRestrictions
in interface RepoUsageComponent
public void init()
public void setRestrictions(RepoUsage restrictions)
RepoUsageComponent
current restrictions
have changed.setRestrictions
in interface RepoUsageComponent
restrictions
- the new restrictions imposed on the repositorypublic RepoUsage getRestrictions()
getRestrictions
in interface RepoUsageComponent
public boolean updateUsage(RepoUsage.UsageType usageType)
RepoUsageComponent
updateUsage
in interface RepoUsageComponent
usageType
- the type of usage data that must be updatedpublic boolean resetUsage(RepoUsage.UsageType usageType)
RepoUsageComponent
resetUsage
in interface RepoUsageComponent
usageType
- the type of usage data that must be resetpublic RepoUsage getUsage()
RepoUsageComponent
getUsage
in interface RepoUsageComponent
public RepoUsageStatus getUsageStatus()
getUsageStatus
in interface RepoUsageComponent
Copyright © 2005–2017 Alfresco Software. All rights reserved.