Java 类org.kohsuke.stapler.export.Exported 实例源码

项目:flaky-test-handler-plugin    文件:FlakyCaseResult.java   
@Exported(name="status",visibility=9) // because stapler notices suffix 's' and remove it
public Status getStatus() {
  if (skipped) {
    return Status.SKIPPED;
  }
  FlakyCaseResult pr = getPreviousResult();
  if(pr==null) {
    return isPassed() ? Status.PASSED : Status.FAILED;
  }

  if(pr.isPassed()) {
    return isPassed() ? Status.PASSED : Status.REGRESSION;
  } else {
    return isPassed() ? Status.FIXED : Status.FAILED;
  }
}
项目:deployer-framework-plugin    文件:DeployNowProjectAction.java   
/**
 * Returns {@code true} if and only if a one click deployment is valid. In other words
 * {@link #isOneClickDeployPossible()} says there are artifacts for deployment. {@link #isOneClickDeployValid()}
 * says the configured one click deploy is fully defined and {@link #isOneClickDeploy()} says that the user
 * has enabled one click deploy for the project.
 *
 * @return {@code true} if and only if a one click deployment is valid.
 */
@SuppressWarnings("unused") // used by stapler
@Exported(name = "oneClickDeployValid", visibility = 2)
public boolean isOneClickDeployValid() {
    if (owner != null && owner.hasPermission(DEPLOY)) {
        DeployNowJobProperty property = owner.getProperty(DeployNowJobProperty.class);
        if (property != null) {
            if (property.isOneClickDeploy()) {
                if (owner.hasPermission(OWN_AUTH) && DeployHost.isValid(property.getHosts(), owner,
                        Hudson.getAuthentication())) {
                    return true;
                }
                if (owner.hasPermission(JOB_AUTH) && DeployHost.isValid(property.getHosts(), owner,
                        ACL.SYSTEM)) {
                    return true;
                }
            }
        }
    }
    return false;
}
项目:deployer-framework-plugin    文件:DeployNowRunAction.java   
@Exported(name = "oneClickDeployValid", visibility = 2)
public boolean isOneClickDeployValid() {
    if (owner != null && owner.getParent().hasPermission(DEPLOY)) {
        DeployNowJobProperty property = owner.getParent().getProperty(DeployNowJobProperty.class);
        if (property != null) {
            if (property.isOneClickDeploy()) {
                List<? extends DeployHost<?, ?>> sets = property.getHosts();
                if (owner.getParent().hasPermission(OWN_AUTH) && DeployHost
                        .isValid(sets, owner, Hudson.getAuthentication())) {
                    return true;
                }
                if (owner.getParent().hasPermission(JOB_AUTH) && DeployHost.isValid(sets, owner, ACL.SYSTEM)) {
                    return true;
                }
            }
        }
    }
    return false;
}
项目:persistent-parameter-plugin    文件:PersistentChoiceParameterDefinition.java   
@Exported
public List<String> getChoices()
{
  String def = defaultValue;
  try
  {
    AbstractProject project = CurrentProject.getCurrentProject(this);
    AbstractBuild build = (successfulOnly ? (AbstractBuild)project.getLastSuccessfulBuild() : project.getLastBuild());
    def = build.getBuildVariables().get(getName()).toString();
  }
  catch(Exception ex)
  {
  }

  if(def != null && choices.indexOf(def) != 0)
  {
    List<String> c = new ArrayList<String>(choices);
    c.remove(def);
    c.add(0, def);
    return c;
  }

  return choices;
}
项目:DotCi    文件:DbBackedBuild.java   
@Override
@Exported
public Executor getExecutor() {
    final Jenkins jenkins = Jenkins.getInstance();
    if (jenkins == null) {
        return null;
    }
    for (final Computer computer : jenkins.getComputers()) {
        for (final Executor executor : computer.getExecutors()) {
            if (isCurrent(executor)) {
                return executor;
            }
        }
    }
    return null;
}
项目:DotCi    文件:ProcessedBuild.java   
@Exported
public Iterable<Map> getAxisList() {

    final Iterable<Combination> layoutList = this.build.getLayouter().list();
    final Iterable<Map> subBuildInfo = Iterables.transform(layoutList, new Function<Combination, Map>() {
        @Override
        public Map apply(@Nullable final Combination combination) {
            final HashMap subBuild = new HashMap();
            subBuild.putAll(combination);
            final hudson.model.Build run = ProcessedBuild.this.build.getRun(combination);
            subBuild.putAll(getSubBuildInfo((DbBackedBuild) run));
            return subBuild;
        }
    });

    final ArrayList<Map> subBuilds = Iterables.size(layoutList) > 1 ? Lists.newArrayList(subBuildInfo) : new ArrayList<>();
    subBuilds.add(getMainBuildInfo(this.build));
    return subBuilds;
}
项目:browserstack-integration-plugin    文件:AutomateTestAction.java   
@Exported
public Session getSession() {
    if (sessionId == null || sessionId.isEmpty() || run == null) {
        return null;
    }

    BuildWrapperItem<BrowserStackBuildWrapper> wrapperItem = BrowserStackBuildWrapper.findBrowserStackBuildWrapper(run.getParent());
    if (wrapperItem == null || wrapperItem.buildWrapper == null) {
        return null;
    }

    BrowserStackCredentials credentials = BrowserStackCredentials.getCredentials(wrapperItem.buildItem, wrapperItem.buildWrapper.getCredentialsId());
    if (credentials == null) {
        return null;
    }

    AutomateClient automateClient = new AutomateClient(credentials.getUsername(), credentials.getDecryptedAccesskey());
    Session activeSession = null;

    try {
        activeSession = automateClient.getSession(this.sessionId);
        Analytics.trackIframeRequest();
    } catch (AutomateException aex) {
        lastException = aex;
        return null;
    } catch (SessionNotFound snfEx) {
        lastException = snfEx;
        return null;
    }

    return activeSession;
}
项目:CI-Jenkins-Plugin    文件:GitHubTargetParameterAction.java   
@Exported
public String getAccessToken() {
    MaidsafeJenkinsBuilder.DescriptorImpl descriptor;
    descriptor = (MaidsafeJenkinsBuilder.DescriptorImpl) Jenkins.getInstance().getDescriptor(
        MaidsafeJenkinsBuilder.class);
    return descriptor.getGithubToken();
}
项目:docker-traceability-plugin    文件:DockerAPIReport.java   
@Exported(visibility = 999)
public Hashtable<String, RangeSet> getUsages() {
    Hashtable<String, RangeSet> res = new Hashtable<String, RangeSet>(fingerprint.getUsages().size());
    for (Map.Entry<String, Fingerprint.RangeSet> set : fingerprint.getUsages().entrySet()) {
        res.put(set.getKey(), new RangeSet(set.getValue()));
    }
    return res;
}
项目:docker-traceability-plugin    文件:DockerTraceabilityRootAction.java   
@Exported
public synchronized @Nonnull List<DockerAPIReport> records() {
    if (containerIDs == null) {
        return Collections.emptyList();
    }

    final List<DockerAPIReport> res = new ArrayList<DockerAPIReport>(containerIDs.size());
    for (String containerId : containerIDs) {
        DockerAPIReport apiReport = DockerAPIReport.forContainer(containerId);
        if (apiReport != null) {
            res.add(apiReport);
        }
    }
    return res;
}
项目:flaky-test-handler-plugin    文件:FlakyCaseResult.java   
/**
 * The stderr of this test.
 *
 * @see #getStdout()
 * @since 1.294
 */
@Exported
public String getStderr() {
  if(stderr!=null)    return stderr;
  FlakySuiteResult sr = getSuiteResult();
  if (sr==null) return "";
  return getSuiteResult().getStderr();
}
项目:flaky-test-handler-plugin    文件:FlakyClassResult.java   
@Exported(visibility = 999)
public String getName() {
  int idx = className.lastIndexOf('.');
  if (idx < 0) {
    return className;
  } else {
    return className.substring(idx + 1);
  }
}
项目:flaky-test-handler-plugin    文件:FlakyTestResult.java   
@Exported(visibility=999)
@Override
public int getFailCount() {
  if(failedTests==null)
    return 0;
  else
    return failedTests.size();
}
项目:multi-branch-project-plugin    文件:TemplateDrivenMultiBranchProject.java   
/**
 * Returns the last successful build, if any. Otherwise null. A successful build would include
 * either {@link Result#SUCCESS} or {@link Result#UNSTABLE}.
 *
 * @return the build or null
 * @see #getLastStableBuild()
 */
@SuppressWarnings(UNUSED)
@CheckForNull
@Exported
public Run getLastSuccessfulBuild() {
    Run retVal = null;
    for (Job job : getAllJobs()) {
        retVal = takeLast(retVal, job.getLastSuccessfulBuild());
    }
    return retVal;
}
项目:multi-branch-project-plugin    文件:TemplateDrivenMultiBranchProject.java   
/**
 * Returns the last build that was anything but stable, if any. Otherwise null.
 *
 * @return the build or null
 * @see #getLastSuccessfulBuild
 */
@SuppressWarnings(UNUSED)
@CheckForNull
@Exported
public Run getLastUnsuccessfulBuild() {
    Run retVal = null;
    for (Job job : getAllJobs()) {
        retVal = takeLast(retVal, job.getLastUnsuccessfulBuild());
    }
    return retVal;
}
项目:multi-branch-project-plugin    文件:TemplateDrivenMultiBranchProject.java   
/**
 * Returns the last unstable build, if any. Otherwise null.
 *
 * @return the build or null
 * @see #getLastSuccessfulBuild
 */
@SuppressWarnings(UNUSED)
@CheckForNull
@Exported
public Run getLastUnstableBuild() {
    Run retVal = null;
    for (Job job : getAllJobs()) {
        retVal = takeLast(retVal, job.getLastUnstableBuild());
    }
    return retVal;
}
项目:multi-branch-project-plugin    文件:TemplateDrivenMultiBranchProject.java   
/**
 * Returns the last completed build, if any. Otherwise null.
 *
 * @return the build or null
 */
@SuppressWarnings(UNUSED)
@CheckForNull
@Exported
public Run getLastCompletedBuild() {
    Run retVal = null;
    for (Job job : getAllJobs()) {
        retVal = takeLast(retVal, job.getLastCompletedBuild());
    }
    return retVal;
}
项目:DotCi    文件:BuildCause.java   
@Exported
public String getAvatarUrl() {
    if (this.avatarUrl == null) {
        if (this.committerEmail == null) return null;
        final byte[] md5 = DigestUtils.md5(this.committerEmail);
        final String emailDigest = new BigInteger(1, md5).toString(16);
        return "https://secure.gravatar.com/avatar/" + emailDigest + ".png?";
    }
    return this.avatarUrl;
}
项目:codedx-plugin    文件:CodeDxReportStatistics.java   
@Exported(name="totalFindings")
public int getFindings() {
    int findings = 0;

    for(CodeDxGroupStatistics it : statistics) {
        findings += it.getFindings();
    }

    return findings;
}
项目:DotCi    文件:JobInfo.java   
@Exported
public List<JobMetric> getMetrics() {
    final StaplerRequest req = Stapler.getCurrent().getCurrentRequest();
    final String branchTab = req.getParameter("branchTab");
    final String buildCount = req.getParameter("count");
    return JobMetric.getApplicableJobMetrics(this.dynamicProject, branchTab, Integer.parseInt(buildCount));
}
项目:gitea-plugin    文件:PullRequestSCMRevision.java   
@Exported
@NonNull
public final BranchSCMRevision getOrigin() {
    return origin;
}
项目:warrior-jenkins-plugin    文件:WarriorRunFileParam.java   
@Exported
 public String getRunFile(){
    return runFile;
}
项目:jenkins-artifactory-polling-plugin    文件:ArtifactoryChangeLogSet.java   
@Exported
public int getVersion()
{
    return version;
}
项目:jenkins-artifactory-polling-plugin    文件:ArtifactoryChangeLogSet.java   
@Exported
public URL getURL()
{
    return url;
}
项目:jenkins-artifactory-polling-plugin    文件:ArtifactoryChangeLogSet.java   
@Override @Exported
public String getMsg()
{
    return new String("");
}
项目:restricted-register-plugin    文件:SecretKeyConfig.java   
@Exported
public String getSecretKey() {
    return secretKey;
}
项目:bandit-plugin-    文件:BanditResult.java   
@Exported
public java.util.Map warning_types(){
    return BanditPublisher.warning_types;
}
项目:browserstack-integration-plugin    文件:BrowserStackCredentials.java   
@Exported
public String getUsername() {
    return username;
}
项目:browserstack-integration-plugin    文件:BrowserStackCredentials.java   
@Exported
public Secret getAccesskey() {
    return accesskey;
}
项目:browserstack-integration-plugin    文件:BrowserStackCredentials.java   
@NonNull
@Exported
public String getDescription() {
    return description;
}
项目:browserstack-integration-plugin    文件:BrowserStackCredentials.java   
@NonNull
@Exported
public String getId() {
    return id;
}
项目:browserstack-integration-plugin    文件:AutomateTestAction.java   
@Exported
public String getLastError() {
    return (lastException != null) ? lastException.getMessage() : null;
}
项目:jenkins-deployment-manager-plugin    文件:GoogleCloudManagerDeployer.java   
@Exported
public AbstractCloudDeployment getDeployment() {
  return deployment;
}
项目:jenkins-deployment-manager-plugin    文件:GoogleCloudManagerBuildWrapper.java   
/**
 * The type of cloud deployment the user wants to deploy for the scope of the build.
 */
@Exported
public AbstractCloudDeployment getDeployment() {
  return deployment;
}
项目:CI-Jenkins-Plugin    文件:AggregatedCheckoutSummaryAction.java   
@Exported
public HashMap<String, Object> getCheckoutSummary() {
  return checkoutSummary;
}
项目:CI-Jenkins-Plugin    文件:GitHubTargetParameterAction.java   
@Exported
public String getProjectName() {
    return project.getName();
}
项目:CI-Jenkins-Plugin    文件:GitHubTargetParameterAction.java   
@Exported
public String getOrgName() {
    return getValueFromConfig("orgName");
}
项目:CI-Jenkins-Plugin    文件:GitHubTargetParameterAction.java   
@Exported
public String getSuperProjectName() {
    return getValueFromConfig("superProjectName");
}
项目:CI-Jenkins-Plugin    文件:GitHubTargetParameterAction.java   
@Exported
public String getDefaultBaseBranch() {
    return getValueFromConfig("defaultBaseBranch");
}
项目:CI-Jenkins-Plugin    文件:GithubCheckoutAction.java   
@Exported
public HashMap<String, Object> getGithubCheckoutAction() {
  return getSummary();
}