Examples of Validity


Examples of org.apache.harmony.security.x509.Validity

        // make the TBSCertificate for Certificate
        int version = 2; //v3
        BigInteger serialNumber = BigInteger.valueOf(555L);
        AlgorithmIdentifier signature = new AlgorithmIdentifier("1.2.3.44.555");
        Name issuer = new Name("O=Certificate Issuer");
        Validity validity = new Validity(new Date(100000000),
                                         new Date(200000000));
        SubjectPublicKeyInfo subjectPublicKeyInfo =
            new SubjectPublicKeyInfo(
                    new AlgorithmIdentifier("1.2.840.113549.1.1.2"),
                                            new byte[10]);
View Full Code Here

Examples of org.apache.harmony.security.x509.Validity

        try {
            X509CertImpl cert1 = new X509CertImpl(
                new Certificate(
                    new TBSCertificate(2, certSerialNumber1, signature,
                        new Name(certIssuerName),
                        new Validity(new Date(), new Date()),
                    new Name(certIssuerName),
                    new SubjectPublicKeyInfo(signature, new byte[10]),
                    null, null, null),
                signature, new byte[10]));
            X509CertImpl cert2 = new X509CertImpl(
                new Certificate(
                    new TBSCertificate(2, certSerialNumber2, signature,
                        new Name(certIssuerName),
                        new Validity(new Date(), new Date()),
                    new Name(certIssuerName),
                    new SubjectPublicKeyInfo(signature, new byte[10]),
                    null, null, null),
                signature, new byte[10]));
            X509CertImpl cert3 = new X509CertImpl(
                new Certificate(
                    new TBSCertificate(2, certSerialNumber3, signature,
                        new Name("O=Another Cert Issuer"),
                        new Validity(new Date(), new Date()),
                    new Name(certIssuerName),
                    new SubjectPublicKeyInfo(signature, new byte[10]),
                    null, null, null),
                signature, new byte[10]));
            assertNull("Certificate should not be presented in CRL "
View Full Code Here

Examples of org.apache.harmony.security.x509.Validity

        try {
            X509CertImpl cert1 = new X509CertImpl(
                new Certificate(
                    new TBSCertificate(2, certSerialNumber1, signature,
                        new Name(certIssuerName),
                        new Validity(new Date(), new Date()),
                    new Name(certIssuerName),
                    new SubjectPublicKeyInfo(signature, new byte[10]),
                    null, null, null),
                signature, new byte[10]));
            X509CertImpl cert2 = new X509CertImpl(
                new Certificate(
                    new TBSCertificate(2, certSerialNumber2, signature,
                        new Name(certIssuerName),
                        new Validity(new Date(), new Date()),
                    new Name(certIssuerName),
                    new SubjectPublicKeyInfo(signature, new byte[10]),
                    null, null, null),
                signature, new byte[10]));
            X509CertImpl cert3 = new X509CertImpl(
                new Certificate(
                    new TBSCertificate(2, certSerialNumber3, signature,
                        new Name("O=Another Cert Issuer"),
                        new Validity(new Date(), new Date()),
                    new Name(certIssuerName),
                    new SubjectPublicKeyInfo(signature, new byte[10]),
                    null, null, null),
                signature, new byte[10]));
            assertFalse("Certificate should not be presented in CRL "
View Full Code Here

Examples of org.apache.harmony.security.x509.Validity

                // signature algorithm identifier
                algId,
                // issuer
                issuerDName,
                // validity
                new Validity(new Date(System.currentTimeMillis()), // notBefore
                        new Date(System.currentTimeMillis()
                        // 86400000 milliseconds in a day
                                + validity * 86400000)), // notAfter
                // subject
                subjectDName,
View Full Code Here

Examples of org.apache.ivory.entity.v0.feed.Validity

        parser.validate(feed);
  }

  @Test
  public void testInvalidClusterValidityTime() {
    Validity validity = modifiableFeed.getClusters().getClusters().get(0)
        .getValidity();
    try {
      validity.setStart(SchemaHelper.parseDateUTC("2007-02-29T00:00Z"));
      modifiableFeed.getClusters().getClusters().get(0)
          .setValidity(validity);
      parser.parseAndValidate(marshallEntity(modifiableFeed));
      Assert.fail("Cluster validity failed");
    } catch (Exception e) {
      System.out.println(e.getMessage());
      validity.setStart(SchemaHelper.parseDateUTC("2011-11-01T00:00Z"));
      modifiableFeed.getClusters().getClusters().get(0)
          .setValidity(validity);
    }

    try {
      validity.setEnd(SchemaHelper.parseDateUTC("2010-04-31T00:00Z"));
      modifiableFeed.getClusters().getClusters().get(0)
          .setValidity(validity);
      parser.parseAndValidate(marshallEntity(modifiableFeed));
      Assert.fail("Cluster validity failed");
    } catch (Exception e) {
      System.out.println(e.getMessage());
      validity.setEnd(SchemaHelper.parseDateUTC("2011-12-31T00:00Z"));
      modifiableFeed.getClusters().getClusters().get(0)
          .setValidity(validity);
    }
  }
View Full Code Here

Examples of org.apache.ivory.entity.v0.process.Validity

                String instStartEL = input.getStart();
                String instEndEL = input.getEnd();
                ExpressionHelper evaluator = ExpressionHelper.get();

                Validity processValidity = ProcessHelper.getCluster(process, clusterName).getValidity();
                ExpressionHelper.setReferenceDate(processValidity.getStart());
                Date instStart = evaluator.evaluate(instStartEL, Date.class);
                if (instStart.before(feedStart))
                    throw new ValidationException("Start instance  " + instStartEL + " of feed " + feed.getName()
                            + " is before the start of feed " + feedValidity.getStart() + " for cluster " + clusterName);
View Full Code Here

Examples of org.apache.ivory.entity.v0.process.Validity

                Date feedStart = feedValidity.getStart();
                Date feedEnd = feedValidity.getEnd();

                String instEL = output.getInstance();
                ExpressionHelper evaluator = ExpressionHelper.get();
                Validity processValidity = ProcessHelper.getCluster(process, clusterName).getValidity();
                ExpressionHelper.setReferenceDate(processValidity.getStart());
                Date inst = evaluator.evaluate(instEL, Date.class);
                if (inst.before(feedStart))
                    throw new ValidationException("Instance  " + instEL + " of feed " + feed.getName()
                            + " is before the start of feed " + feedValidity.getStart() + " for cluster" + clusterName);
View Full Code Here

Examples of org.apache.ivory.entity.v0.process.Validity

        assert new Path(hdfsUrl).getFileSystem(new Configuration()).mkdirs(wfpath);
    }
   
    public void testDefCoordMap(Process process, COORDINATORAPP coord) throws Exception {
        assertEquals("IVORY_PROCESS_DEFAULT_" + process.getName(), coord.getName());
        Validity processValidity = process.getClusters().getClusters().get(0).getValidity();
        assertEquals(SchemaHelper.formatDateUTC(processValidity.getStart()), coord.getStart());
        assertEquals(SchemaHelper.formatDateUTC(processValidity.getEnd()), coord.getEnd());
        assertEquals("${coord:"+process.getFrequency().toString()+"}", coord.getFrequency());
        assertEquals(process.getTimezone().getID(), coord.getTimezone());

        assertEquals(process.getParallel()+"", coord.getControls().getConcurrency());
        assertEquals(process.getOrder().name(), coord.getControls().getExecution());
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.