Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (C) 2011 JFrog Ltd.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.jfrog.hudson.util;
 
Container class for build context fields

Author(s):
Tomer Cohen
 
 public class PublisherContext {
 
     private ServerDetails serverDetails;
     private boolean runChecks;
     private boolean includePublishArtifacts;
     private String violationRecipients;
     private String scopes;
     private boolean licenseAutoDiscovery;
     private boolean discardOldBuilds;
     private boolean discardBuildArtifacts;
     private boolean deployArtifacts;
     private boolean skipBuildInfoDeploy;
     private boolean includeEnvVars;
     private boolean evenIfUnstable;
     private boolean deployMaven;
     private boolean deployIvy;
     private String artifactsPattern = "";
     private String ivyPattern = "";
     private String matrixParams;
     private boolean maven2Compatible;
     private boolean enableIssueTrackerIntegration;
     private boolean aggregateBuildIssues;
     private String aggregationBuildStatus;
 
     private PublisherContext() {
     }
 
         return ;
     }
 
     public String getArtifactsPattern() {
         return getCleanString();
     }
 
     public String getMatrixParams() {
         return ;
     }
 
     public String getIvyPattern() {
         return getCleanString();
     }
 
     public boolean isDiscardBuildArtifacts() {
         return ;
     }
 
     public ServerDetails getServerDetails() {
         return ;
     }
 
     public IncludesExcludes getIncludesExcludes() {
         return ;
     }
 
     public boolean isSkipBuildInfoDeploy() {
         return ;
     }
 
     public boolean isIncludeEnvVars() {
         return ;
     }
 
         return ;
     }
 
     public String getScopes() {
        return ;
    }
    public boolean isRunChecks() {
        return ;
    }
    public boolean isIncludePublishArtifacts() {
        return ;
    }
    public String getViolationRecipients() {
        return ;
    }
    public boolean isLicenseAutoDiscovery() {
        return ;
    }
    public boolean isDiscardOldBuilds() {
        return ;
    }
    public boolean isDeployArtifacts() {
        return ;
    }
    public final String getArtifactoryName() {
        return  != null ? . : null;
    }
    public boolean isDeployMaven() {
        return ;
    }
    public boolean isDeployIvy() {
        return ;
    }
    public boolean isEvenIfUnstable() {
        return ;
    }
    private String getCleanString(String stringToClean) {
        return StringUtils.removeEnd(StringUtils.removeStart(stringToClean"\""), "\"");
    }
    public boolean isMaven2Compatible() {
        return ;
    }
    public boolean isEnableIssueTrackerIntegration() {
        return ;
    }
    public boolean isAggregateBuildIssues() {
        return ;
    }
    public String getAggregationBuildStatus() {
        return ;
    }
    public static class Builder {
        PublisherContext publisher = new PublisherContext();
        public PublisherContext build() {
            if (. == null) {
                throw new IllegalArgumentException("artifactoryServer cannot be null");
            }
            if (. == null) {
                throw new IllegalArgumentException("serverDetails cannot be null");
            }
            return ;
        }
        public Builder artifactoryServer(ArtifactoryServer artifactoryServer) {
            . = artifactoryServer;
            return this;
        }
        public Builder serverDetails(ServerDetails serverDetails) {
            . = serverDetails;
            return this;
        }
        public Builder deployerOverrider(DeployerOverrider deployerOverrider) {
            . = deployerOverrider;
            return this;
        }
        public Builder runChecks(boolean runChecks) {
            . = runChecks;
            return this;
        }
        public Builder includePublishArtifacts(boolean includePublishArtifacts) {
            . = includePublishArtifacts;
            return this;
        }
        public Builder violationRecipients(String violationRecipients) {
            . = violationRecipients;
            return this;
        }
        public Builder scopes(String scopes) {
            . = scopes;
            return this;
        }
        public Builder licenseAutoDiscovery(boolean licenseAutoDiscovery) {
            . = licenseAutoDiscovery;
            return this;
        }
        public Builder discardOldBuilds(boolean discardOldBuilds) {
            . = discardOldBuilds;
            return this;
        }
        public Builder deployArtifacts(boolean deployArtifacts) {
            . = deployArtifacts;
            return this;
        }
        public Builder includesExcludes(IncludesExcludes includesExcludes) {
            . = includesExcludes;
            return this;
        }
        public Builder skipBuildInfoDeploy(boolean skipBuildInfoDeploy) {
            . = skipBuildInfoDeploy;
            return this;
        }
        public Builder includeEnvVars(boolean includeEnvVars) {
            . = includeEnvVars;
            return this;
        }
        public Builder discardBuildArtifacts(boolean discardBuildArtifacts) {
            . = discardBuildArtifacts;
            return this;
        }
        public Builder matrixParams(String matrixParams) {
            . = matrixParams;
            return this;
        }
        public Builder artifactsPattern(String artifactsPattern) {
            . = artifactsPattern;
            return this;
        }
        public Builder ivyPattern(String ivyPattern) {
            . = ivyPattern;
            return this;
        }
        public Builder deployMaven(boolean deployMaven) {
            . = deployMaven;
            return this;
        }
        public Builder deployIvy(boolean deployIvy) {
            . = deployIvy;
            return this;
        }
        public Builder evenIfUnstable(boolean evenIfUnstable) {
            . = evenIfUnstable;
            return this;
        }
        public Builder maven2Compatible(boolean maven2Compatible) {
            . = maven2Compatible;
            return this;
        }
        public Builder enableIssueTrackerIntegration(boolean enableIssueTrackerIntegration) {
            . = enableIssueTrackerIntegration;
            return this;
        }
        public Builder aggregateBuildIssues(boolean aggregateBuildIssues) {
            . = aggregateBuildIssues;
            return this;
        }
        public Builder aggregationBuildStatus(String aggregationBuildStatus) {
            . = aggregationBuildStatus;
            return this;
        }
    }
New to GrepCode? Check out our FAQ X