Class ScheduleBuildUserProperty
java.lang.Object
hudson.model.UserProperty
org.jenkinsci.plugins.schedulebuild.ScheduleBuildUserProperty
- All Implemented Interfaces:
ExtensionPoint,Describable<UserProperty>,ReconfigurableDescribable<UserProperty>
User property to store schedule build timezone preferences.
Allows users to choose between using Jenkins core personal timezone or global timezone setting.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.UserProperty
user -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the ZoneId for the user's preferred timezone.booleanCheck if the user has enabled personal timezone preference.booleanCheck if the user wants to use their personal timezone from Jenkins core.voidsetUsePersonalTimeZone(boolean usePersonalTimeZone) Methods inherited from class hudson.model.UserProperty
all, allByCategoryClass, getDescriptor, reconfigure, reconfigure, setUser
-
Constructor Details
-
ScheduleBuildUserProperty
@DataBoundConstructor public ScheduleBuildUserProperty() -
ScheduleBuildUserProperty
public ScheduleBuildUserProperty(boolean usePersonalTimeZone)
-
-
Method Details
-
isUsePersonalTimeZone
public boolean isUsePersonalTimeZone()Check if the user wants to use their personal timezone from Jenkins core.- Returns:
- true if using personal timezone, false if using global setting
-
setUsePersonalTimeZone
@DataBoundSetter public void setUsePersonalTimeZone(boolean usePersonalTimeZone) -
getZoneId
Get the ZoneId for the user's preferred timezone. Uses system default timezone if personal timezone is enabled, otherwise falls back to global setting.- Returns:
- the ZoneId to use for schedule builds
-
hasCustomTimeZone
public boolean hasCustomTimeZone()Check if the user has enabled personal timezone preference.- Returns:
- true if user wants to use personal timezone, false otherwise
-