Package org.alfresco.service.cmr.admin
Class RepoUsage
java.lang.Object
org.alfresco.service.cmr.admin.RepoUsage
Bean holding the known or unknown usage values of the repository.
- Since:
- 3.4
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of the server license modes.static enumEnumeration of the common usage types -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the number of documents or null if not knownGet the time (ms since epoch) that the repository usage was last updated.Get the server license expiry date.Get the server license mode.getUsers()Get the number of users or null if unknownbooleanGet the read-write state of the repositorytoString()
-
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 updatedusers- the number of users or null if not knowndocuments- the number of documents or null if not knownlicenseMode- the server license mode in effect at runtimelicenseExpiryDate- the date that the license expires or null if it doesn'treadOnly- true if the server is currently read-only
-
-
Method Details
-
equals
-
toString
-
getLastUpdate
Get the time (ms since epoch) that the repository usage was last updated.- Returns:
- time of last usage update
-
getUsers
Get the number of users or null if unknown- Returns:
- the number of users or null if unknown
-
getDocuments
Get the number of documents or null if not known- Returns:
- document count or null if not known
-
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
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
-