public NumberTextFormField withInitialValue( final Number initialValue ) { setInitialValue( initialValue ); return this; }
public RemoveSnapshotsTaskDescriptor() { super(TYPE_ID, RemoveSnapshotsTask.class, "Maven - Delete SNAPSHOT", VISIBLE, EXPOSED, new RepositoryCombobox(REPOSITORY_NAME_FIELD_ID, "Repository", "Select the Maven repository or repository group to remove snapshots from.", true).includingAnyOfFacets(RemoveSnapshotsFacet.class) .excludingAnyOfVersionPolicies(VersionPolicy.RELEASE.name()) .includeAnEntryForAllRepositories(), new NumberTextFormField(MINIMUM_SNAPSHOT_RETAINED_COUNT, "Minimum snapshot count", "Minimum number of snapshots to keep for one GAV.", true).withInitialValue(1).withMinimumValue(-1), new NumberTextFormField(SNAPSHOT_RETENTION_DAYS, "Snapshot retention (days)", "Delete all snapshots older than this, provided we still keep the minimum number specified.", true).withInitialValue(30).withMinimumValue(0), new CheckboxFormField(REMOVE_IF_RELEASED, "Remove if released", "Delete all snapshots that have a corresponding release", false), new NumberTextFormField(GRACE_PERIOD, "Grace period after release (days)", "The grace period during which snapshots with an associated release will not be deleted.", false).withMinimumValue(0)); } }
FormField.OPTIONAL ).withInitialValue(RaptureSettings.DEFAULT_DEBUG_ALLOWED), new NumberTextFormField( SettingsCapabilityConfiguration.STATUS_INTERVAL_AUTHENTICATED, messages.statusIntervalAuthenticatedLabel(), messages.statusIntervalAuthenticatedHelp(), FormField.MANDATORY ).withInitialValue(RaptureSettings.DEFAULT_STATUS_INTERVAL_AUTHENTICATED), new NumberTextFormField( SettingsCapabilityConfiguration.STATUS_INTERVAL_ANONYMOUS, messages.statusIntervalAnonymousLabel(), messages.statusIntervalAnonymousHelp(), FormField.MANDATORY ).withInitialValue(RaptureSettings.DEFAULT_STATUS_INTERVAL_ANONYMOUS), new NumberTextFormField( SettingsCapabilityConfiguration.SESSION_TIMEOUT, messages.sessionTimeoutLabel(), messages.sessionTimeoutHelp(), FormField.MANDATORY ).withInitialValue(RaptureSettings.DEFAULT_SESSION_TIMEOUT) );
formFields.add( new NumberTextFormField( prop.getId(), prop.getName(), prop.getHelpText(), prop.isRequired(), prop.getRegexValidation() ) );
public PurgeUnusedTaskDescriptor() { super(TYPE_ID, PurgeUnusedTask.class, TASK_NAME, VISIBLE, EXPOSED, new RepositoryCombobox( REPOSITORY_NAME_FIELD_ID, "Repository", "Select the repository to purge components/assets from", FormField.MANDATORY ).includingAnyOfFacets(PurgeUnusedFacet.class).includeAnEntryForAllRepositories(), new NumberTextFormField( LAST_USED_FIELD_ID, "Last used in days", "Purge all components and assets that were last used before given number of days", FormField.MANDATORY ).withInitialValue(LAST_USED_INIT_VALUE).withMinimumValue(LAST_USED_MIN_VALUE) ); } }
@Inject public YumCapabilityDescriptor(final Validators validators) { this.validators = validators; this.formFields = Lists.<FormField>newArrayList( new NumberTextFormField( YumCapabilityConfiguration.MAX_NUMBER_PARALLEL_THREADS, messages.maxNumberParallelThreadsLabel(), messages.maxNumberParallelThreadsHelp(), FormField.OPTIONAL ).withInitialValue(10), new StringTextFormField( YumCapabilityConfiguration.CREATEREPO_PATH, messages.createrepoPathLabel(), messages.createrepoPathHelp(), FormField.OPTIONAL ), new StringTextFormField( YumCapabilityConfiguration.MERGEREPO_PATH, messages.mergerepoPathLabel(), messages.mergerepoPathHelp(), FormField.OPTIONAL ) ); }
public PurgeMavenUnusedSnapshotsTaskDescriptor() { super(TYPE_ID, PurgeMavenUnusedSnapshotsTask.class, TASK_NAME, VISIBLE, EXPOSED, new RepositoryCombobox( REPOSITORY_NAME_FIELD_ID, "Repository", "Select the repository to delete unused snapshot versions from", FormField.MANDATORY ).includingAnyOfFacets(PurgeUnusedSnapshotsFacet.class).includeAnEntryForAllRepositories(), new NumberTextFormField( LAST_USED_FIELD_ID, "Last used in days", "Delete all snapshots that were last used before given number of days", FormField.MANDATORY ).withInitialValue(LAST_USED_INIT_VALUE).withMinimumValue(LAST_USED_MIN_VALUE) ); } }
FormField.OPTIONAL ).withInitialValue(true), new NumberTextFormField( GenerateMetadataCapabilityConfiguration.DELETE_PROCESSING_DELAY, "Delete process delay", + " (default 10 seconds)", FormField.OPTIONAL ).withInitialValue(10), new StringTextFormField( GenerateMetadataCapabilityConfiguration.YUM_GROUPS_DEFINITION_FILE,
public NumberTextFormField withInitialValue(final Number initialValue) { setInitialValue(initialValue); return this; }