Class Workspace
- java.lang.Object
-
- org.jenkinsci.plugins.p4.workspace.Workspace
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Workspace>
,Serializable
,Cloneable
- Direct Known Subclasses:
ManualWorkspaceImpl
,SpecWorkspaceImpl
,StaticWorkspaceImpl
,StreamWorkspaceImpl
,TemplateWorkspaceImpl
public abstract class Workspace extends Object implements Cloneable, ExtensionPoint, Describable<Workspace>, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addEnv(String tag, String value)
static DescriptorExtensionList<Workspace,WorkspaceDescriptor>
all()
protected Object
clone()
Workspace
deepClone()
String
getCharset()
WorkspaceDescriptor
getDescriptor()
Expand
getExpand()
String
getFullName()
Returns the fully expanded client workspace name.String
getHostName()
abstract String
getName()
Returns the client workspace name as defined in the configuration.String
getRootPath()
String
getSyncID()
abstract WorkspaceType
getType()
boolean
isCleanup()
boolean
isPinHost()
abstract com.perforce.p4java.client.IClient
setClient(com.perforce.p4java.server.IOptionsServer connection, String user)
Setup/Create a Perforce workspace for this mode.void
setExpand(Map<String,String> map)
void
setHostName(String hostname)
abstract void
setName(String name)
void
setRootPath(String rootPath)
void
setSyncID(String syncID)
-
-
-
Constructor Detail
-
Workspace
public Workspace(String charset, boolean pinHost, boolean cleanup)
-
-
Method Detail
-
getType
public abstract WorkspaceType getType()
-
getName
public abstract String getName()
Returns the client workspace name as defined in the configuration. This may include ${tag} that have not been expanded.- Returns:
- Client name
-
setName
public abstract void setName(String name)
-
getCharset
public String getCharset()
-
isPinHost
public boolean isPinHost()
-
setClient
public abstract com.perforce.p4java.client.IClient setClient(com.perforce.p4java.server.IOptionsServer connection, String user) throws Exception
Setup/Create a Perforce workspace for this mode.- Parameters:
connection
- Server connectionuser
- Perforce user- Returns:
- Perforce client
- Throws:
Exception
- push up stack
-
getDescriptor
public WorkspaceDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Workspace>
-
all
public static DescriptorExtensionList<Workspace,WorkspaceDescriptor> all()
-
getRootPath
public String getRootPath()
-
setHostName
public void setHostName(String hostname)
-
getHostName
public String getHostName()
-
setRootPath
public void setRootPath(String rootPath)
-
getExpand
public Expand getExpand()
-
getFullName
public String getFullName()
Returns the fully expanded client workspace name.- Returns:
- Client name
-
getSyncID
public String getSyncID()
-
setSyncID
@DataBoundSetter public void setSyncID(String syncID)
-
isCleanup
public boolean isCleanup()
-
clone
protected Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
deepClone
public Workspace deepClone() throws AbortException
- Throws:
AbortException
-
-