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 voidaddEnv(String tag, String value)static DescriptorExtensionList<Workspace,WorkspaceDescriptor>all()protected Objectclone()WorkspacedeepClone()StringgetCharset()WorkspaceDescriptorgetDescriptor()ExpandgetExpand()StringgetFullName()Returns the fully expanded client workspace name.StringgetHostName()abstract StringgetName()Returns the client workspace name as defined in the configuration.StringgetRootPath()StringgetSyncID()abstract WorkspaceTypegetType()booleanisCleanup()booleanisPinHost()abstract com.perforce.p4java.client.IClientsetClient(com.perforce.p4java.server.IOptionsServer connection, String user)Setup/Create a Perforce workspace for this mode.voidsetExpand(Map<String,String> map)voidsetHostName(String hostname)abstract voidsetName(String name)voidsetRootPath(String rootPath)voidsetSyncID(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 ExceptionSetup/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:
getDescriptorin 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:
clonein classObject- Throws:
CloneNotSupportedException
-
deepClone
public Workspace deepClone() throws AbortException
- Throws:
AbortException
-
-