org.alfresco.service.cmr.admin
Class RepoUsage

java.lang.Object
  extended by org.alfresco.service.cmr.admin.RepoUsage

public class RepoUsage
extends java.lang.Object

Bean holding the known or unknown usage values of the repository.

Since:
3.4

Nested Class Summary
static class RepoUsage.LicenseMode
          Enumeration of the server license modes.
static class RepoUsage.UsageType
          Enumeration of the common usage types
 
Constructor Summary
RepoUsage(java.lang.Long lastUpdate, java.lang.Long users, java.lang.Long documents, RepoUsage.LicenseMode licenseMode, java.lang.Long licenseExpiryDate, boolean readOnly)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Long getDocuments()
          Get the number of documents or null if not known
 java.lang.Long getLastUpdate()
          Get the time (ms since epoch) that the repository usage was last updated.
 java.lang.Long getLicenseExpiryDate()
          Get the server license expiry date.
 RepoUsage.LicenseMode getLicenseMode()
          Get the server license mode.
 java.lang.Long getUsers()
          Get the number of users or null if unknown
 boolean isReadOnly()
          Get the read-write state of the repository
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepoUsage

public RepoUsage(java.lang.Long lastUpdate,
                 java.lang.Long users,
                 java.lang.Long documents,
                 RepoUsage.LicenseMode licenseMode,
                 java.lang.Long licenseExpiryDate,
                 boolean readOnly)
Parameters:
lastUpdate - the time the repository usage was last updated
users - the number of users or null if not known
documents - the number of documents or null if not known
licenseMode - the server license mode in effect at runtime
licenseExpiryDate - the date that the license expires or null if it doesn't
readOnly - true if the server is currently read-only
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getLastUpdate

public java.lang.Long getLastUpdate()
Get the time (ms since epoch) that the repository usage was last updated.

Returns:
time of last usage update

getUsers

public java.lang.Long getUsers()
Get the number of users or null if unknown

Returns:
the number of users or null if unknown

getDocuments

public java.lang.Long getDocuments()
Get the number of documents or null if not known

Returns:
document count or null if not known

getLicenseMode

public RepoUsage.LicenseMode getLicenseMode()
Get the server license mode. This is determined by (a) the build in use and (b) the installed license.

Returns:
the license mode (never null)

getLicenseExpiryDate

public java.lang.Long getLicenseExpiryDate()
Get the server license expiry date. This is determined by the license and is null if there is no expiry or if it is unknown.

Returns:
the license expiry date or null

isReadOnly

public boolean isReadOnly()
Get the read-write state of the repository

Returns:
true if the server is in read-only mode otherwise false


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