Package hudson.model
Class UsageStatistics
- All Implemented Interfaces:
ExtensionPoint,Describable<PageDecorator>,PersistentDescriptor,Saveable,Loadable,OnMaster
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe opposite of theUsageStatistics.CombinedCipherOutputStream.static final classAsymmetric 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.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class hudson.model.PageDecorator
ALLFields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
ConstructorsConstructorDescriptionUsageStatistics(String keyImage) Creates an instance with a specific public key image. -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(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.booleanisDue()Returns true if it's time for us to check for new version.Methods inherited from class hudson.model.PageDecorator
all, getDescriptor, getUrlMethods 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, toMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:DescriptorReturns the permission type needed in order to access theDescriptor.getGlobalConfigPage()for this descriptor. By default, requiresJenkins.ADMINISTERpermission. 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:
getRequiredGlobalConfigPagePermissionin 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:DescriptorInvoked when the global configuration page is submitted. Can be overridden to store descriptor-specific information.- Overrides:
configurein classDescriptor<PageDecorator>- Parameters:
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
-