Examples of validate()


Examples of com.serotonin.m2m2.reports.vo.ReportVO.validate()

            importContext.getReader().readInto(report, reportJson);

            // Now validate it. Use a new response object so we can distinguish errors in this user from other
            // errors.
            ProcessResult reportResponse = new ProcessResult();
            report.validate(reportResponse);
            if (reportResponse.getHasMessages())
                // Too bad. Copy the errors into the actual response.
                importContext.copyValidationMessages(reportResponse, "emport.report.prefix", xid);
            else {
                // Sweet. Save it.
View Full Code Here

Examples of com.serotonin.m2m2.virtual.vo.VirtualDataSourceVO.validate()

    ds.setEnabled(true);
    ds.setUpdatePeriods(5);
    ds.setUpdatePeriodType(TimePeriods.SECONDS);
   
    ProcessResult response = new ProcessResult();
    ds.validate(response);
    if(!response.getHasMessages())
      Common.runtimeManager.saveDataSource(ds);
    else
      throw new RuntimeException("Invalid data!");
   
View Full Code Here

Examples of com.serotonin.m2m2.vo.DataPointVO.validate()

            dp.setPointLocator(pointLocator);
      dp.setEnabled(true);
      dp.setSettable(true);
      dp.setDefaultCacheSize(0);     
     
      dp.validate(response);
      if(!response.getHasMessages())
        Common.runtimeManager.saveDataPoint(dp);
      else
        throw new RuntimeException("Invalid data!");
     
View Full Code Here

Examples of com.smartgwt.client.widgets.form.DynamicForm.validate()

    IButton addBtn = new IButton(messages.favouritesControllerAddAdd());
    addBtn.setIcon(BTN_ADD_IMG);
    addBtn.setAutoFit(true);
    addBtn.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        if (form.validate()) {
          addWindow.hide();
          fav.setName(nameItem.getValueAsString());
          fav.setShared(sharedItem.getValueAsBoolean());
          FavouritesCommService.saveSearchFavourite(fav, new DataCallback<SearchFavourite>() {
            public void execute(SearchFavourite result) {
View Full Code Here

Examples of com.smartgwt.client.widgets.form.ValuesManager.validate()

       
        IButton submit = new IButton();
        submit.setTitle("Submit");
        submit.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        vm.validate();
        if (form1.hasErrors()) {
          theTabs.selectTab(1);
        } else {
          theTabs.selectTab(0);
        }
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.IntegerItem.validate()

        }
    }

    private Long getInterval() {
        IntegerItem item = (IntegerItem) this.form.getItem(ITEM_INTERVAL);
        if (item.getValue() == null || !item.validate()) {
            return null;
        }
        String stringValue = this.form.getValueAsString(ITEM_INTERVAL);
        long longValue = Long.valueOf(stringValue);
View Full Code Here

Examples of com.spatial4j.core.shape.jts.JtsGeometry.validate()

    final boolean dateline180Check = getDatelineRule() != DatelineRule.none;
    JtsGeometry jtsGeom;
    try {
      jtsGeom = ctx.makeShape(geometry, dateline180Check, ctx.isAllowMultiOverlap());
      if (isAutoValidate())
        jtsGeom.validate();
    } catch (RuntimeException e) {
      //repair:
      if (validationRule == ValidationRule.repairConvexHull) {
        jtsGeom = ctx.makeShape(geometry.convexHull(), dateline180Check, ctx.isAllowMultiOverlap());
      } else if (validationRule == ValidationRule.repairBuffer0) {
View Full Code Here

Examples of com.spoledge.util.xml.XMLValidator.validate()

    /**
     * Validates source XML.
     */
    public void validate( Reader reader ) throws Exception {
        XMLValidator xv = getXMLValidator();
        XMLValidatorInstance xvi = xv.validate( reader );

        if (xvi.isInvalid()) throw xvi.getParseException();
    }


View Full Code Here

Examples of com.subgraph.vega.impl.scanner.modules.scripting.ModuleValidator.validate()

  }
 
  private ModuleValidator validateModule(Scriptable module, String modulePath) {
    final ModuleValidator validator = new ModuleValidator(module);
    try {
      validator.validate();
      return validator;
    } catch (ModuleValidationException e) {
      logger.warning("Failed to validate test module "+ modulePath +" :"+ e.getMessage());
      return null;
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate()

            }
            archivist.setDescriptor(application);

            // use temp CL that is set in the application. For details,
            // see https://glassfish.dev.java.net/issues/show_bug.cgi?id=223
            archivist.validate(application.getClassLoader());
           
            application.setGeneratedXMLDirectory(getGeneratedXMLLocation(appId));
           
            if (!application.getWebServiceDescriptors().isEmpty()) {
                ModuleContentLinker visitor = new ModuleContentLinker(in);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.