本文整理汇总了Java中org.jenkinsci.remoting.RoleChecker类的典型用法代码示例。如果您正苦于以下问题:Java RoleChecker类的具体用法?Java RoleChecker怎么用?Java RoleChecker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RoleChecker类属于org.jenkinsci.remoting包,在下文中一共展示了RoleChecker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initiateDownloadsAtWorkspace
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
private void initiateDownloadsAtWorkspace(
final GoogleRobotCredentials credentials,
final Run run, final List<StorageObjectId> objects,
final FilePath localDir, final TaskListener listener,
final String version, final String resolvedPrefix)
throws IOException, InterruptedException {
try {
// Use remotable credential to access the storage service from the
// remote machine.
final GoogleRobotCredentials remoteCredentials =
checkNotNull(credentials).forRemote(module.getRequirement());
localDir.act(
new Callable<Void, IOException>() {
@Override
public Void call() throws IOException {
performDownloads(remoteCredentials, localDir, objects, listener,
version, resolvedPrefix);
return (Void) null;
}
@Override
public void checkRoles(RoleChecker checker)
throws SecurityException {
// We know by definition that this is the correct role;
// the callable exists only in this method context.
}
});
} catch (GeneralSecurityException e) {
throw new IOException(
Messages.AbstractUpload_RemoteCredentialError(), e);
}
}
示例2: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker roleChecker) throws SecurityException {
// normally parameters will be executed on the master, but in the
// future we may start evaluating on slaves as well, with a custom
// classpath as in dynamic-parameter-plugin
roleChecker.check((RoleSensitive) this, Role.UNKNOWN);
}
示例3: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker checker)
{
// Implementation required by interface, but not using
}
示例4: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker arg0) throws SecurityException {}
示例5: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker checker) throws SecurityException {
}
示例6: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker checker) throws SecurityException {
// OK to execute it anywhere
checker.check(this, Arrays.asList(Roles.MASTER, Roles.SLAVE));
}
示例7: doFillFilenameLoadSessionItems
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
/**
* List model to choose the ZAP session to use. It's called on the remote machine (if present)
* to load all session files in the build's workspace.
*
* @return a {@link ListBoxModel}. It can be empty if the workspace doesn't contain any ZAP sessions.
* @throws InterruptedException
* @throws IOException
*/
public ListBoxModel doFillFilenameLoadSessionItems() throws IOException, InterruptedException {
ListBoxModel items = new ListBoxModel();
// No workspace before the first build, so workspace is null
if(workspace != null) {
Collection<String> sessionsInString = workspace.act(new FileCallable<Collection<String>>() {
private static final long serialVersionUID = 1328740269013881941L;
public Collection<String> invoke(File f, VirtualChannel channel) {
// List all files with FILE_SESSION_EXTENSION on the machine where the workspace is located
Collection<File> colFiles = FileUtils.listFiles(f,
FileFilterUtils.suffixFileFilter(FILE_SESSION_EXTENSION),
TrueFileFilter.INSTANCE);
Collection<String> colString = new ArrayList<String>();
// "Transform" File into String
for (File file : colFiles) {
colString.add(file.getAbsolutePath());
// The following line is to remove the full path to the workspace,
// keep just the relative path to the session
//colString.add(file.getAbsolutePath().replace(workspace.getRemote() + File.separatorChar, ""));
}
return colString;
}
@Override
public void checkRoles(RoleChecker checker) throws SecurityException {
// Nothing to do
}
});
items.add(""); // To not load a session, add a blank choice
for (String s : sessionsInString) {
items.add(s);
}
}
return items;
}
示例8: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker checker) throws SecurityException {
// Nothing to do
}
示例9: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker roleChecker) throws SecurityException {
}
示例10: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
public void checkRoles(RoleChecker arg0) throws SecurityException {
}
示例11: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker roleChecker) throws SecurityException {
//ignore for now
}
示例12: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker roleChecker) throws SecurityException {
//We don't require any roles to be checked?
}
示例13: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker checker) throws SecurityException {
// TODO Auto-generated method stub
}
示例14: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
public void checkRoles(RoleChecker checker) throws SecurityException {
checker.check((RoleSensitive) this, Roles.SLAVE);
}
示例15: checkRoles
import org.jenkinsci.remoting.RoleChecker; //导入依赖的package包/类
@Override
public void checkRoles(RoleChecker checker) throws SecurityException {
checker.check((RoleSensitive) this, Roles.SLAVE);
}