org.alfresco.repo.usage
Interface RepoUsageComponent

All Known Implementing Classes:
RepoUsageComponentImpl

public interface RepoUsageComponent

Low-level interface to answer repository usage queries

Since:
3.5

Nested Class Summary
static interface RepoUsageComponent.RestrictionObserver
          Interface for observers of repository restriction changes
 
Field Summary
static java.lang.String KEY_USAGE_CURRENT
           
static java.lang.String KEY_USAGE_DOCUMENTS
           
static java.lang.String KEY_USAGE_LAST_UPDATE_DOCUMENTS
           
static java.lang.String KEY_USAGE_LAST_UPDATE_USERS
           
static java.lang.String KEY_USAGE_ROOT
           
static java.lang.String KEY_USAGE_USERS
           
static java.lang.Long LOCK_TTL
           
static org.alfresco.service.namespace.QName LOCK_USAGE
           
static org.alfresco.service.namespace.QName LOCK_USAGE_DOCUMENTS
           
static org.alfresco.service.namespace.QName LOCK_USAGE_USERS
           
 
Method Summary
 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 observeRestrictions(RepoUsageComponent.RestrictionObserver observer)
          Observe when restrictions change
 void setRestrictions(RepoUsage restrictions)
          Record changes to the restrictions imposed on the repository.
 boolean updateUsage(RepoUsage.UsageType usageType)
          Force an update of the current repository usage.
 

Field Detail

LOCK_TTL

static final java.lang.Long LOCK_TTL

LOCK_USAGE

static final org.alfresco.service.namespace.QName LOCK_USAGE

LOCK_USAGE_USERS

static final org.alfresco.service.namespace.QName LOCK_USAGE_USERS

LOCK_USAGE_DOCUMENTS

static final org.alfresco.service.namespace.QName LOCK_USAGE_DOCUMENTS

KEY_USAGE_ROOT

static final java.lang.String KEY_USAGE_ROOT
See Also:
Constant Field Values

KEY_USAGE_CURRENT

static final java.lang.String KEY_USAGE_CURRENT
See Also:
Constant Field Values

KEY_USAGE_LAST_UPDATE_USERS

static final java.lang.String KEY_USAGE_LAST_UPDATE_USERS
See Also:
Constant Field Values

KEY_USAGE_USERS

static final java.lang.String KEY_USAGE_USERS
See Also:
Constant Field Values

KEY_USAGE_LAST_UPDATE_DOCUMENTS

static final java.lang.String KEY_USAGE_LAST_UPDATE_DOCUMENTS
See Also:
Constant Field Values

KEY_USAGE_DOCUMENTS

static final java.lang.String KEY_USAGE_DOCUMENTS
See Also:
Constant Field Values
Method Detail

observeRestrictions

void observeRestrictions(RepoUsageComponent.RestrictionObserver observer)
Observe when restrictions change


setRestrictions

void setRestrictions(RepoUsage restrictions)
Record changes to the restrictions imposed on the repository. These may be cached for fast access. This method should only be called if the current restrictions have changed.

Parameters:
restrictions - the new restrictions imposed on the repository

getRestrictions

RepoUsage getRestrictions()
Returns:
Returns the restrictions currently in play for the repository

updateUsage

boolean updateUsage(RepoUsage.UsageType usageType)
Force an update of the current repository usage. Usage data will be gathered and stored as required.

Parameters:
usageType - the type of usage data that must be updated
Returns:
true if the update succeeded or false if some other client was already performing the same update

getUsage

RepoUsage getUsage()
Get the current repository usage data. This will not trigger an update of the data if it is not available; only pre-loaded data will be used.

Returns:
Returns the repository-specific current usage data.

getUsageStatus

RepoUsageStatus getUsageStatus()
Calculate and retrieve full status alerts based on the usage and license expiry state.

Returns:
Returns the usage status bean


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.