Examples of validate()


Examples of org.apache.oltu.jose.jws.JWS.validate()

                         .setType("JWT")
                         .setAlgorithm("TEST")
                         .setPayload(payload)
                         .sign(method, key)
                         .build();
        assertTrue(jws.validate(method, key));
    }

}
View Full Code Here

Examples of org.apache.oodt.cas.cli.option.validator.AllowedArgsCmdLineOptionValidator.validate()

      AllowedArgsCmdLineOptionValidator validator = new AllowedArgsCmdLineOptionValidator();
      validator.setAllowedArgs(Lists.newArrayList("value1", "value2"));

      // Test no null option instance allowed.
      try {
         validator.validate(null);
         fail("Should have thrown IllegalArgumentException");
      } catch (IllegalArgumentException ignore) { /* expect throw */
      }

      // Test should fail case.
View Full Code Here

Examples of org.apache.oodt.cas.cli.option.validator.ArgRegExpCmdLineOptionValidator.validate()

      ArgRegExpCmdLineOptionValidator validator = new ArgRegExpCmdLineOptionValidator();
      validator.setAllowedArgs(Lists.newArrayList("v.*?1", "v.*?2"));

      // Test no null option instance allowed.
      try {
         validator.validate(null);
         fail("Should have thrown IllegalArgumentException");
      } catch (IllegalArgumentException ignore) { /* expect throw */
      }

      // Test should fail case.
View Full Code Here

Examples of org.apache.oodt.cas.crawl.action.CrawlerAction.validate()

      // Test case invalid action.
      ProductCrawler pc = createDummyCrawler();
      pc.actionRepo = createMock(CrawlerActionRepo.class);

      CrawlerAction action = createMock(CrawlerAction.class);
      action.validate();
      expectLastCall().andThrow(new CrawlerActionException());
      expect(action.getId()).andReturn("ActionId");
      replay(action);

      expect(pc.actionRepo.getActions()).andReturn(
View Full Code Here

Examples of org.apache.oozie.dependency.URIHandler.validate()

            }

            String uriPath = CoordELFunctions.evalAndWrap(eval, event.getChild("dataset", event.getNamespace())
                    .getChild("uri-template", event.getNamespace()).getTextTrim());
            URIHandler uriHandler = uriService.getURIHandler(uriPath);
            uriHandler.validate(uriPath);
            uris.append(uriPath);
            urisWithDoneFlag.append(uriHandler.getURIWithDoneFlag(uriPath, CoordUtils.getDoneFlag(doneFlagElement)));
        }
        return uris.toString();
    }
View Full Code Here

Examples of org.apache.oozie.service.ProxyUserService.validate()

        String doAsUserName = request.getParameter(RestConstants.DO_AS_PARAM);
        if (doAsUserName != null && !doAsUserName.equals(userName)) {
            ProxyUserService proxyUser = Services.get().get(ProxyUserService.class);
            try {
                proxyUser.validate(userName, HostnameFilter.get(), doAsUserName);
            }
            catch (IOException ex) {
                throw new RuntimeException(ex);
            }
            auditLog.info("Proxy user [{0}] DoAs user [{1}] Request [{2}]", userName, doAsUserName,
View Full Code Here

Examples of org.apache.padaf.preflight.PdfAValidator.validate()

   
    int size = lfd.size();
    for (int i = 0 ; i < loop ; i++) {
      File file = lfd.get(i%size);
      long startLTime = System.currentTimeMillis();
      ValidationResult result = validator.validate(new FileDataSource(file));
      if (!result.isValid()) {
        resFile.write(file.getAbsolutePath() + " isn't PDF/A\n");
        for (ValidationError error : result.getErrorsList()) {
          resFile.write(error.getErrorCode() + " : " + error.getDetails() +"\n");
        }
View Full Code Here

Examples of org.apache.padaf.preflight.annotation.AnnotationValidator.validate()

    // ---- The widget validation will be done by the widget annotation, a
    // widget contained in a Field can't have action.
    PDAnnotationWidget widget = aField.getWidget();
    if (res && widget != null) {
      AnnotationValidator widgetVal = annotFact.getAnnotationValidator( widget.getDictionary(), handler, error);
      widgetVal.validate(error);

      COSBase act = widget.getDictionary().getDictionaryObject(DICTIONARY_KEY_ACTION);
      if (act != null) {
        error.add(new ValidationError(
            ERROR_ACTION_FORBIDDEN_WIDGET_ACTION_FIELD, "\"A\" must not be used in a Field dictionary"));
View Full Code Here

Examples of org.apache.padaf.preflight.graphics.ShadingPattern.validate()

    if (shadings != null) {
      for (Object key : shadings.keySet()) {
        COSDictionary aShading = (COSDictionary) shadings
            .getDictionaryObject((COSName) key);
        ShadingPattern sp = new ShadingPattern(handler, aShading);
        List<ValidationError> lErrors = sp.validate();
        if (lErrors != null && !lErrors.isEmpty()) {
          result.addAll(lErrors);
          res = false;
        }
      }
View Full Code Here

Examples of org.apache.padaf.preflight.graphics.XObjectValidator.validate()

      break;
    default:
      throw new ValidationException("Unkown pattern type : " + ptype);
    }

    return validator.validate();
  }

  public List<ValidationError> validateXObject(DocumentHandler handler,
      COSObject cObj) throws ValidationException {
    XObjectValidator xObjVal = null;
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.