Package hudson.model
Class UsageStatistics
- java.lang.Object
-
- hudson.model.Descriptor<PageDecorator>
-
- hudson.model.PageDecorator
-
- hudson.model.UsageStatistics
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PageDecorator>
,PersistentDescriptor
,Saveable
,OnMaster
@Extension public class UsageStatistics extends PageDecorator implements PersistentDescriptor
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UsageStatistics.CombinedCipherInputStream
The opposite of theUsageStatistics.CombinedCipherOutputStream
.static class
UsageStatistics.CombinedCipherOutputStream
Asymmetric cipher is slow and in case of Sun RSA implementation it can only encrypt the first block.-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DISABLED
-
Fields inherited from class hudson.model.PageDecorator
ALL
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description UsageStatistics()
UsageStatistics(String keyImage)
Creates an instance with a specific public key image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
Invoked when the global configuration page is submitted.Permission
getRequiredGlobalConfigPagePermission()
Returns the permission type needed in order to access theDescriptor.getGlobalConfigPage()
for this descriptor.String
getStatData()
Gets the encrypted usage stat data to be sent to the Hudson server.boolean
isDue()
Returns true if it's time for us to check for new version.-
Methods inherited from class hudson.model.PageDecorator
all, getDescriptor, getUrl
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.model.PersistentDescriptor
load
-
-
-
-
Constructor Detail
-
UsageStatistics
public UsageStatistics()
-
UsageStatistics
public UsageStatistics(String keyImage)
Creates an instance with a specific public key image.
-
-
Method Detail
-
isDue
public boolean isDue()
Returns true if it's time for us to check for new version.
-
getStatData
public String getStatData() throws IOException
Gets the encrypted usage stat data to be sent to the Hudson server. Used exclusively by jelly: resources/hudson/model/UsageStatistics/footer.jelly- Throws:
IOException
-
getRequiredGlobalConfigPagePermission
@NonNull public Permission getRequiredGlobalConfigPagePermission()
Description copied from class:Descriptor
Returns the permission type needed in order to access theDescriptor.getGlobalConfigPage()
for this descriptor. By default, requiresJenkins.ADMINISTER
permission. For now this only applies to descriptors configured through the global (GlobalConfigurationCategory.Unclassified
) configuration. Override to return something different if appropriate. The only currently supported alternative return value isJenkins.MANAGE
.- Overrides:
getRequiredGlobalConfigPagePermission
in classDescriptor<PageDecorator>
- Returns:
- Permission required to globally configure this descriptor.
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
Description copied from class:Descriptor
Invoked when the global configuration page is submitted. Can be overridden to store descriptor-specific information.- Overrides:
configure
in classDescriptor<PageDecorator>
json
- The JSON object that captures the configuration data for thisDescriptor
. See the developer documentation.- Returns:
- false to keep the client in the same config page.
- Throws:
Descriptor.FormException
-
-