Class ManualWorkspaceImpl
- java.lang.Object
-
- org.jenkinsci.plugins.p4.workspace.Workspace
-
- org.jenkinsci.plugins.p4.workspace.ManualWorkspaceImpl
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Workspace>
,Serializable
,Cloneable
public class ManualWorkspaceImpl extends Workspace implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ManualWorkspaceImpl.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ManualWorkspaceImpl(String charset, boolean pinHost, String name, WorkspaceSpec spec)
Deprecated.ManualWorkspaceImpl(String charset, boolean pinHost, String name, WorkspaceSpec spec, boolean cleanup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
adjustViewLine(String line, String clientName, boolean adjustClientName)
Support for old plugin view mappings, see JENKINS-69491.Object
clone()
String
getName()
Returns the client workspace name as defined in the configuration.WorkspaceSpec
getSpec()
net.sf.json.JSONObject
getSpecJSON(String client)
WorkspaceType
getType()
com.perforce.p4java.client.IClient
setClient(com.perforce.p4java.server.IOptionsServer connection, String user)
Setup/Create a Perforce workspace for this mode.void
setName(String name)
void
setSpec(WorkspaceSpec spec)
-
Methods inherited from class org.jenkinsci.plugins.p4.workspace.Workspace
addEnv, all, deepClone, getCharset, getDescriptor, getExpand, getFullName, getHostName, getRootPath, getSyncID, isCleanup, isPinHost, setExpand, setHostName, setRootPath, setSyncID
-
-
-
-
Constructor Detail
-
ManualWorkspaceImpl
@DataBoundConstructor public ManualWorkspaceImpl(String charset, boolean pinHost, String name, WorkspaceSpec spec, boolean cleanup)
-
ManualWorkspaceImpl
@Deprecated public ManualWorkspaceImpl(String charset, boolean pinHost, String name, WorkspaceSpec spec)
Deprecated.
-
-
Method Detail
-
getName
public String getName()
Description copied from class:Workspace
Returns the client workspace name as defined in the configuration. This may include ${tag} that have not been expanded.
-
getSpec
public WorkspaceSpec getSpec()
-
setSpec
public void setSpec(WorkspaceSpec spec)
-
getType
public WorkspaceType getType()
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classWorkspace
- Throws:
CloneNotSupportedException
-
adjustViewLine
public String adjustViewLine(String line, String clientName, boolean adjustClientName)
Support for old plugin view mappings, see JENKINS-69491. Two possible actions: 1) If view has only a LHS, construct a RHS.//depot/path/to/product/...
becomes://depot/path/to/product/... //CLIENT/path/to/product/...
Note that this is different from a p4sync constructed RHS. 2) if view came from a file, substitute the clientName in the RHS. p4sync has already created the RHS correctly so don't alter.- Parameters:
line
- one line of a viewclientName
- client name for RHSadjustClientName
- use true to fix clientName in RHS (for when RHS comes from a file)- Returns:
-
setClient
public com.perforce.p4java.client.IClient setClient(com.perforce.p4java.server.IOptionsServer connection, String user) throws Exception
Description copied from class:Workspace
Setup/Create a Perforce workspace for this mode.
-
getSpecJSON
@JavaScriptMethod public net.sf.json.JSONObject getSpecJSON(String client)
-
-