Class GraphConfigurationDetail

  • All Implemented Interfaces:
    ModelObject

    public class GraphConfigurationDetail
    extends Object
    implements ModelObject
    Configures the trend graph of this plug-in.
    • Constructor Detail

      • GraphConfigurationDetail

        public GraphConfigurationDetail​(Job<?,​?> project,
                                        String pluginName,
                                        org.kohsuke.stapler.StaplerRequest request)
    • Method Detail

      • isNone

        public boolean isNone()
      • isBuildCount

        public boolean isBuildCount()
      • isBuildNth

        public boolean isBuildNth()
      • isDate

        public boolean isDate()
      • isDefaultDates

        public boolean isDefaultDates()
      • doSave

        public void doSave​(org.kohsuke.stapler.StaplerRequest request,
                           org.kohsuke.stapler.StaplerResponse response)
        Saves the configured values. Subclasses need to implement the actual persistence.
        Parameters:
        request - Stapler request
        response - Stapler response
      • persistValue

        protected void persistValue​(String value,
                                    org.kohsuke.stapler.StaplerRequest request,
                                    org.kohsuke.stapler.StaplerResponse response)
      • serializeToString

        protected String serializeToString​(String configType,
                                           int buildCount,
                                           String firstDayCount,
                                           String lastDayCount,
                                           int buildStep)
      • createDefaultsFile

        protected static File createDefaultsFile​(Job<?,​?> project,
                                                 String pluginName)
        Creates a file with for the default values.
        Parameters:
        project - the project used as directory for the file
        pluginName - the name of the plug-in
        Returns:
        the created file
      • getGregorianCalendarFromString

        public static GregorianCalendar getGregorianCalendarFromString​(String dateString)
                                                                throws ParseException

        Get a gregorian calendar from a String of type : DD/MM/YYYY

        Parameters:
        dateString -
        Returns:
        GregorianCalendar
        Throws:
        ParseException
      • getBuildCount

        public int getBuildCount()
      • setBuildCount

        public void setBuildCount​(int buildCount)
      • getBuildStep

        public int getBuildStep()
      • setBuildStep

        public void setBuildStep​(int buildStep)
      • getFirstDayCount

        public String getFirstDayCount()
      • setFirstDayCount

        public void setFirstDayCount​(String firstDayCount)
      • getLastDayCount

        public String getLastDayCount()
      • setLastDayCount

        public void setLastDayCount​(String lastDayCount)
      • getConfigType

        public String getConfigType()
      • setConfigType

        public void setConfigType​(String configType)