提交 a449d2a7 编写于 作者: K kohsuke

Added DescriptorImpl

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15918 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b72fa5ba
......@@ -190,10 +190,7 @@ public abstract class FileSystemProvisioner implements ExtensionPoint, Describab
* Default implementation that doesn't rely on any file system specific capability,
* and thus can be used anywhere that Hudson runs.
*/
@Extension
public static final class Default extends FileSystemProvisioner {
public Default() {}
public void prepareWorkspace(AbstractBuild<?, ?> build, FilePath ws, TaskListener listener) throws IOException, InterruptedException {
}
......@@ -220,5 +217,18 @@ public abstract class FileSystemProvisioner implements ExtensionPoint, Describab
new FilePath(wss).unzip(dst);
}
}
@Extension
public static final class DescriptorImpl extends FileSystemProvisionerDescriptor {
public boolean discard(FilePath ws, TaskListener listener) throws IOException, InterruptedException {
// the default provisioner doens't do anything special,
// so allow other types to manage it
return false;
}
public String getDisplayName() {
return "Default";
}
}
}
}
......@@ -27,6 +27,7 @@ import hudson.FileSystemProvisioner;
import hudson.FilePath;
import hudson.WorkspaceSnapshot;
import hudson.FileSystemProvisionerDescriptor;
import hudson.Extension;
import hudson.remoting.VirtualChannel;
import hudson.FilePath.FileCallable;
import hudson.model.AbstractBuild;
......@@ -98,5 +99,17 @@ public class ZFSProvisioner extends FileSystemProvisioner implements Serializabl
throw new UnsupportedOperationException();
}
@Extension
public static final class DescriptorImpl extends FileSystemProvisionerDescriptor {
public boolean discard(FilePath ws, TaskListener listener) throws IOException, InterruptedException {
// TODO
return false;
}
public String getDisplayName() {
return "ZFS";
}
}
private static final long serialVersionUID = 1L;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册