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:
  • Constructor Details

  • Method Details

    • 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.
      Specified by:
      getName in class Workspace
      Returns:
      Client name
    • setName

      public void setName(String name)
      Specified by:
      setName in class Workspace
    • getSpec

      public WorkspaceSpec getSpec()
    • setSpec

      public void setSpec(WorkspaceSpec spec)
    • getType

      public WorkspaceType getType()
      Specified by:
      getType in class Workspace
    • clone

      public Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Workspace
      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 view
      clientName - client name for RHS
      adjustClientName - 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.
      Specified by:
      setClient in class Workspace
      Parameters:
      connection - Server connection
      user - Perforce user
      Returns:
      Perforce client
      Throws:
      Exception - push up stack
    • getSpecJSON

      @JavaScriptMethod public net.sf.json.JSONObject getSpecJSON(String client)