package org.jenkinsci.plugins.p4.workspace; import com.perforce.p4java.client.IClientSummary; import com.perforce.p4java.client.IClientSummary.ClientLineEnd; import hudson.Extension; import hudson.model.AbstractDescribableImpl; import hudson.model.AutoCompletionCandidates; import hudson.model.Descriptor; import hudson.util.ListBoxModel; import org.jenkinsci.Symbol; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; import java.io.Serializable; public class WorkspaceSpec extends AbstractDescribableImpl<WorkspaceSpec> implements Serializable { private static final long serialVersionUID = 1L; public final boolean allwrite; public final boolean clobber; public final boolean compress; public final boolean locked; public final boolean modtime; public final boolean rmdir; private final String streamName; private final String line; private final String view; private final String changeView; private final String type; private final String serverID; private final boolean backup; public String getStreamName() { return streamName; } public String getLine() { return line; } public String getView() { return view; } public String getChangeView() { return changeView; } public String getType() { return type; } public String getServerID() { return serverID; } public boolean isBackup() { return backup; } @DataBoundConstructor public WorkspaceSpec(boolean allwrite, boolean clobber, boolean compress, boolean locked, boolean modtime, boolean rmdir, String streamName, String line, String view, String changeView, String type, String serverID, boolean backup) { this.allwrite = allwrite; this.clobber = clobber; this.compress = compress; this.locked = locked; this.modtime = modtime; this.rmdir = rmdir; this.streamName = streamName; this.line = line; this.view = view; this.changeView = changeView; this.type = type; this.serverID = serverID; this.backup = backup; } @Deprecated public WorkspaceSpec(boolean allwrite, boolean clobber, boolean compress, boolean locked, boolean modtime, boolean rmdir, String streamName, String line, String view) { this(allwrite, clobber, compress, locked, modtime, rmdir, streamName, line, view, null, null, null, true); } @Extension @Symbol("clientSpec") public static class DescriptorImpl extends Descriptor<WorkspaceSpec> { @Override public String getDisplayName() { return "Perforce Client Spec"; } public ListBoxModel doFillLineItems() { ListBoxModel list = new ListBoxModel(); for (ClientLineEnd end : IClientSummary.ClientLineEnd.values()) { list.add(end.name()); } return list; } public ListBoxModel doFillTypeItems() { ListBoxModel list = new ListBoxModel(); for (WorkspaceSpecType type : WorkspaceSpecType.values()) { list.add(type.name()); } return list; } /** * Provides auto-completion for workspace names. Stapler finds this * method via the naming convention. * * @param value The text that the user entered. * @return suggestion */ public AutoCompletionCandidates doAutoCompleteStreamName( @QueryParameter String value) { return StreamDescImpl.doAutoCompleteStreamName(value); } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#13 | 29848 | Sandeep Kumar |
Merge pull request #195 from jenkinsci/StreamAtChange Support StreamAtChange for ManualWorkspace. |
||
#12 | 24942 | Paul Allen |
Deep clone of Workspace objects. WorkspaceSpec was not cloned and caused the View to change. JENKINS-54695 |
||
#11 | 23589 | Paul Allen |
Remove forced clobber and set default clobber option to true. JENKINS-49041 |
||
#10 | 23372 | Paul Allen | Add setter to modify workspace name and spec. | ||
#9 | 22866 | Paul Allen |
Merge pull request #55 from jenkinsci/hth Global Pipeline Library support. JENKINS-46121 JENKINS-46550 |
||
#8 | 22684 | Paul Allen | Added @Symbol to Extension classes for Pipeline Syntax. | ||
#7 | 22384 | Paul Allen | Remove duplicate code for Stream name auto completion. | ||
#6 | 22163 | Paul Allen |
Manual Workspace support for READONLY and PARTITIONED. Change Type to Enum. JENKINS-39753 |
||
#5 | 22128 | Paul Allen |
Helix Graph support for Jenkins. JENKINS-40354 |
||
#4 | 20308 | Paul Allen |
P4Groovy (experimental) Get a P4 object in groovy. Supporting basic functions: ’run’ (to run perforce commands), ‘fetch’ and ‘save’ (to access Perforce specs). |
||
#3 | 20179 | Paul Allen | Javadoc fixes for java 8 builds. | ||
#2 | 15138 | Paul Allen | Fix: StreamName not shown in Manual Workspace config. | ||
#1 | 9690 | Paul Allen |
[Branching using p4-jenkins] Release 1.0.1 |
||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4/workspace/WorkspaceSpec.java | |||||
#1 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4_client/workspace/WorkspaceSpec.java | |||||
#2 | 8756 | Paul Allen | Added Stream field to Manual Workspace config. | ||
#1 | 8749 | Paul Allen |
Split off Worksapce Spec from Manual Workspace configuration into a Property Jelly item. Plan to autoload values based on selected client. |