コード例 #1
0
 /**
  * Save the descriptor configuration.
  *
  * <p>{@inheritDoc}
  */
 @Override
 public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {
   // Get the values and check them.
   String deploy =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.deployState"), null);
   String action =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.actionState"), null);
   this.save();
   return super.configure(req, formData);
 }
コード例 #2
0
 @Override
 public Notifier newInstance(StaplerRequest req, JSONObject formData) throws FormException {
   // Get variables and then construct a new object.
   boolean canDeploy =
       Values.booleanOrElse(
           req.getParameter("dimensionsbuildnotifier.canBaselineDeploy"), false);
   boolean canBuild =
       Values.booleanOrElse(req.getParameter("dimensionsbuildnotifier.canBaselineBuild"), false);
   boolean canAction =
       Values.booleanOrElse(
           req.getParameter("dimensionsbuildnotifier.canBaselineAction"), false);
   boolean batch =
       Values.booleanOrElse(req.getParameter("dimensionsbuildnotifier.batch"), false);
   boolean buildClean =
       Values.booleanOrElse(req.getParameter("dimensionsbuildnotifier.buildClean"), false);
   boolean capture =
       Values.booleanOrElse(req.getParameter("dimensionsbuildnotifier.capture"), false);
   String deploy =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.deployState"), null);
   String action =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.actionState"), null);
   String area = Values.textOrElse(req.getParameter("dimensionsbuildnotifier.area"), null);
   String buildConfig =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.buildConfig"), null);
   String buildOptions =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.buildOptions"), null);
   String buildTargets =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.buildTargets"), null);
   String blnScope =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.blnScope"), null);
   String blnTemplate =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.blnTemplate"), null);
   String blnOwningPart =
       Values.textOrElse(req.getParameter("dimensionsbuildnotifier.blnOwningPart"), null);
   String blnType = Values.textOrElse(req.getParameter("dimensionsbuildnotifier.blnType"), null);
   String blnName = Values.textOrElse(req.getParameter("dimensionsbuildnotifier.blnName"), null);
   DimensionsBuildNotifier notif =
       new DimensionsBuildNotifier(
           canDeploy,
           deploy,
           canAction,
           action,
           canBuild,
           area,
           buildConfig,
           buildOptions,
           buildTargets,
           blnScope,
           blnTemplate,
           blnOwningPart,
           blnType,
           blnName,
           batch,
           buildClean,
           capture);
   return notif;
 }