Examples of validate()


Examples of org.apache.ivory.entity.parser.EntityParser.validate()

    }

    @SuppressWarnings({ "unchecked", "rawtypes" })
    private void validate(Entity entity) throws IvoryException {
        EntityParser entityParser = EntityParserFactory.getParser(entity.getEntityType());
        entityParser.validate(entity);
    }

    private String getAsString(InputStream xmlStream) throws IOException {
        byte[] data = new byte[XML_DEBUG_LEN];
        IOUtils.readFully(xmlStream, data, 0, XML_DEBUG_LEN);
View Full Code Here

Examples of org.apache.james.jdkim.api.PublicKeyRecord.validate()

    }

    public void testGetFlags() {
        PublicKeyRecord pkr = new PublicKeyRecordImpl(
                "k=rsa; t=y:s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIhyR3oItOy22ZOaBrIVe9m/iME3RqOJeasANSpg2YTHTYV+Xtp4xwf5gTjCmHQEMOs0qYu0FYiNQPQogJ2t0Mfx9zNu06rfRBDjiIU9tpx2T+NGlWZ8qhbiLo5By8apJavLyqTLavyPSrvsx0B3YzC63T4Age2CDqZYA+OwSMWQIDAQAB");
        pkr.validate();
        List<CharSequence> flags = pkr.getFlags();
        assertEquals("[y, s]", flags.toString());
        pkr = new PublicKeyRecordImpl(
                "k=rsa; t=y; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIhyR3oItOy22ZOaBrIVe9m/iME3RqOJeasANSpg2YTHTYV+Xtp4xwf5gTjCmHQEMOs0qYu0FYiNQPQogJ2t0Mfx9zNu06rfRBDjiIU9tpx2T+NGlWZ8qhbiLo5By8apJavLyqTLavyPSrvsx0B3YzC63T4Age2CDqZYA+OwSMWQIDAQAB");
        pkr.validate();
View Full Code Here

Examples of org.apache.james.jdkim.api.SignatureRecord.validate()

    public void testExpired() {
        SignatureRecord sr = new SignatureRecordImpl(
                "v=1; c=simple; h=from:to; s=select; d=example.com; a=rsa-sha1; x=0; bh=abcdef; b=1235345987;");
        try {
            sr.validate();
            fail("expected failure");
        } catch (Exception e) {
            assertTrue(e.getMessage().indexOf("expired") != -1);
        }
    }
View Full Code Here

Examples of org.apache.james.jdkim.tagvalue.PublicKeyRecordImpl.validate()

public class PublicKeyRecordTest extends TestCase {

    public void testValidate() {
        PublicKeyRecord pkr = new PublicKeyRecordImpl("");
        try {
            pkr.validate();
            fail("Expected failure: missing mandatory parameters");
        } catch (IllegalStateException e) {
        }
        pkr = new PublicKeyRecordImpl("k=rsa; p=XXXXXXXX=;");
        pkr.validate();
View Full Code Here

Examples of org.apache.james.jdkim.tagvalue.SignatureRecordImpl.validate()

    public void testExpired() {
        SignatureRecord sr = new SignatureRecordImpl(
                "v=1; c=simple; h=from:to; s=select; d=example.com; a=rsa-sha1; x=0; bh=abcdef; b=1235345987;");
        try {
            sr.validate();
            fail("expected failure");
        } catch (Exception e) {
            assertTrue(e.getMessage().indexOf("expired") != -1);
        }
    }
View Full Code Here

Examples of org.apache.jetspeed.healthcheck.validators.HealthCheckValidator.validate()

                HealthCheckValidatorResult result = null;
                // execute the validator until it succeeds or until the
                // number of retries runs out
                for (int i = 0; i <= hcv.getNumberOfRetries(); i++)
                {
                    result = hcv.validate();
                    if (isDebugEnabled)
                    {
                        log.debug("Validator execution: " +
                                  (result.getHealthCheckResult() == HealthCheckValidatorResult.VALIDATOR_SUCCEEDED));
                    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.BaseFragmentValidationListener.validate()

        // validate fragments using validation listener
        AbstractBaseFragmentElement rootFragment = (AbstractBaseFragmentElement)getRootFragment();
        if (rootFragment != null)
        {
            BaseFragmentValidationListener validationListener = newBaseFragmentValidationListener();
            return (rootFragment.validateFragments(validationListener) && validationListener.validate());
        }
        return false;
    }
   
    /**
 
View Full Code Here

Examples of org.apache.jetspeed.util.descriptor.PortletApplicationWar.validate()

        checkWebSecurityRoles(webApp);
        checkPortletSecurityRoleRefs(portlet);
        boolean validateFailed = false;
        try
        {
            paWar.validate();
        }
        catch (PortletApplicationException e)
        {
            validateFailed = true;
        }
View Full Code Here

Examples of org.apache.kafka.common.protocol.types.Struct.validate()

    @Test
    public void testDefault() {
        Schema schema = new Schema(new Field("field", Type.INT32, "doc", 42));
        Struct struct = new Struct(schema);
        assertEquals("Should get the default value", 42, struct.get("field"));
        struct.validate(); // should be valid even with missing value
    }

    private Object roundtrip(Type type, Object obj) {
        ByteBuffer buffer = ByteBuffer.allocate(type.sizeOf(obj));
        type.write(buffer, obj);
View Full Code Here

Examples of org.apache.ldap.server.configuration.StartupConfiguration.validate()

        StartupConfiguration cfg = ( StartupConfiguration ) Configuration.toConfiguration( env );
        envCopy.put( Context.PROVIDER_URL, "" );
       
        try
        {
            cfg.validate();
        }
        catch( ConfigurationException e )
        {
            NamingException ne = new LdapConfigurationException( "Invalid configuration." );
            ne.initCause( e );
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.