Package hudson.model
Class UsageStatistics
- All Implemented Interfaces:
ExtensionPoint
,Describable<PageDecorator>
,PersistentDescriptor
,Saveable
,Loadable
,OnMaster
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
The opposite of theUsageStatistics.CombinedCipherOutputStream
.static final class
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 inherited from class hudson.model.PageDecorator
ALL
Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
ConstructorDescriptionUsageStatistics
(String keyImage) Creates an instance with a specific public key image. -
Method Summary
Modifier and TypeMethodDescriptionboolean
configure
(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) Invoked when the global configuration page is submitted.Returns the permission type needed in order to access theDescriptor.getGlobalConfigPage()
for this descriptor.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, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, 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, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, 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
-
Field Details
-
DISABLED
public static boolean DISABLED
-
-
Constructor Details
-
UsageStatistics
public UsageStatistics() -
UsageStatistics
Creates an instance with a specific public key image.
-
-
Method Details
-
isDue
public boolean isDue()Returns true if it's time for us to check for new version. -
getStatData
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
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.StaplerRequest2 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
-