Refine search
@Override /* * We need this for JENKINS-26143 -- reflective creation cannot handle setChoices(Object). See that method for context. */ public ParameterDefinition newInstance(@Nullable StaplerRequest req, @Nonnull JSONObject formData) throws FormException { String name = formData.getString("name"); String desc = formData.getString("description"); String choiceText = formData.getString("choices"); return new ChoiceParameterDefinition(name, choiceText, desc); }
/** * Replaces the occurrence of '$key' by {@code properties.get('key')}. * * <p> * Unlike shell, undefined variables are left as-is (this behavior is the same as Ant.) * */ @Nullable public static String replaceMacro( @CheckForNull String s, @Nonnull Map<String,String> properties) { return replaceMacro(s,new VariableResolver.ByMap<String>(properties)); }
/** * Obtains the ACL associated with this object. * * @return never null. */ @Nonnull ACL getACL();
@Restricted(NoExternalUse.class) public @Nullable ApiTokenProperty.TokenInfoAndStats getLegacyStatsOf(@Nonnull User user, @Nullable ApiTokenStore.HashedToken legacyToken) { ApiTokenProperty apiTokenProperty = user.getProperty(ApiTokenProperty.class); if (legacyToken != null) { ApiTokenStats.SingleTokenStats legacyStats = apiTokenProperty.getTokenStats().findTokenStatsById(legacyToken.getUuid()); ApiTokenProperty.TokenInfoAndStats tokenInfoAndStats = new ApiTokenProperty.TokenInfoAndStats(legacyToken, legacyStats); return tokenInfoAndStats; } // in case the legacy token was revoked during the request return null; }
/** * Fired when a user was successfully authenticated using credentials. It could be password or any other credentials. * This might be via the web UI, or via REST (using API token or Basic), or CLI (remoting, auth, ssh) * or any other way plugins can propose. * @param details details of the newly authenticated user, such as name and groups. */ protected void authenticated(@Nonnull UserDetails details){}
/** * Set the search string used to narrow the filtered set of builds. * @param searchString The search string. */ public void setSearchString(@Nonnull String searchString) { this.searchString = searchString; }
@Override @Nonnull public String getDisplayName() { return displayName; }
/** * @param fingerprint * {@link Fingerprint} object to which this facet is going to be added to. * @param timestamp * Timestamp when the use happened (when the facet has been created). */ protected FingerprintFacet(@Nonnull Fingerprint fingerprint, long timestamp) { assert fingerprint!=null; this.fingerprint = fingerprint; this.timestamp = timestamp; }
/** * Remove item from this view. * * @return false if item not present in view, true if removed. * @throws IOException Removal failed. * @throws IllegalArgumentException View rejected to remove an item. */ boolean remove(@Nonnull TopLevelItem item) throws IOException, IllegalArgumentException;
/** * Add item to this view. * * @throws IOException Adding failed. * @throws IllegalArgumentException View rejected to add an item. */ void add(@Nonnull TopLevelItem item) throws IOException, IllegalArgumentException;
/** * Returns a specialized copy of T for functioning in the given node. */ T forNode(@Nonnull Node node, TaskListener log) throws IOException, InterruptedException; }
/** * Called by {@link NodeProvisioner#update()} to apply this strategy against the specified state. * Any provisioning activities should be recorded by calling * {@link hudson.slaves.NodeProvisioner.StrategyState#recordPendingLaunches(java.util.Collection)} * This method will be called by a thread that is holding {@link hudson.slaves.NodeProvisioner#provisioningLock} * @param state the current state. * @return the decision. */ @Nonnull @GuardedBy("NodeProvisioner.this") public abstract StrategyDecision apply(@Nonnull StrategyState state);
public RemoteChannelLaunchCallable(@Nonnull String[] cmd, @Nonnull Pipe out, @Nonnull OutputStream err, @CheckForNull String workDir, @Nonnull Map<String,String> envOverrides) { this.cmd = cmd; this.out = out; this.err = new RemoteOutputStream(err); this.workDir = workDir; this.envOverrides = envOverrides; }