Package org.jenkinsci.plugins.ewm.model
Class ExternalWorkspace
- java.lang.Object
-
- org.jenkinsci.plugins.ewm.model.ExternalWorkspace
-
- All Implemented Interfaces:
ModelObject
,Serializable
public class ExternalWorkspace extends Object implements Serializable, ModelObject
ModelObject
used to hold relevant information about the External Workspace.- Author:
- Alexandru Somai
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExternalWorkspace(String diskPoolId, String diskId, String masterMountPoint, String pathOnDisk)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectoryBrowserSupport
doWs(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
String
getBrowseUrl()
Computes the browsing url from which this workspace can be accessed from.String
getCompleteWorkspacePath()
Computes the complete workspace path, by appendingpathOnDisk
to themasterMountPoint
.String
getDiskId()
String
getDiskPoolId()
String
getDisplayName()
String
getId()
String
getMasterMountPoint()
String
getPathOnDisk()
-
-
-
Method Detail
-
getId
@Nonnull public String getId()
-
getDiskPoolId
@Nonnull public String getDiskPoolId()
-
getDiskId
@Nonnull public String getDiskId()
-
getMasterMountPoint
@Nonnull public String getMasterMountPoint()
-
getPathOnDisk
@Nonnull public String getPathOnDisk()
-
getCompleteWorkspacePath
@Nonnull public String getCompleteWorkspacePath()
Computes the complete workspace path, by appendingpathOnDisk
to themasterMountPoint
. It's recommended to use this method when the complete workspace path is needed, instead of manually appending the two strings, with separator between.- Returns:
- the complete workspace path from Jenkins master
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
-
doWs
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public DirectoryBrowserSupport doWs(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, InterruptedException
- Throws:
IOException
javax.servlet.ServletException
InterruptedException
-
getBrowseUrl
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nonnull public String getBrowseUrl()
Computes the browsing url from which this workspace can be accessed from. The url follows the next pattern: JENKINS_ROOT_URL/exws/browse/workspaceId/ws/- Returns:
- the workspace's browsing url
-
-