Class RepoUsage

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

public class RepoUsage extends Object
Bean holding the known or unknown usage values of the repository.
Since:
3.4
Author:
Derek Hulley
  • Constructor Details

    • RepoUsage

      public RepoUsage(Long lastUpdate, Long users, Long documents, RepoUsage.LicenseMode licenseMode, 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 Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLastUpdate

      public Long getLastUpdate()
      Get the time (ms since epoch) that the repository usage was last updated.
      Returns:
      time of last usage update
    • getUsers

      public Long getUsers()
      Get the number of users or null if unknown
      Returns:
      the number of users or null if unknown
    • getDocuments

      public 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 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