Examples of validate()


Examples of org.apache.http.cookie.CookieAttributeHandler.validate()

        BasicClientCookie cookie = new BasicClientCookie("name", "value");
        CookieOrigin origin = new CookieOrigin("somehost", 80, "/", false);
        CookieAttributeHandler h = new RFC2109DomainHandler();
       
        cookie.setDomain("somehost");
        h.validate(cookie, origin);

        cookie.setDomain("otherhost");
        try {
            h.validate(cookie, origin);
            fail("MalformedCookieException should have been thrown");
View Full Code Here

Examples of org.apache.http.cookie.CookieSpec.validate()

        CookieSpec cookiespec = new BrowserCompatSpec();
        CookieOrigin origin = new CookieOrigin("www.WhatEver.com", 80, "/", false);
        List<Cookie> cookies = cookiespec.parse(header, origin);
        for (int i = 0; i < cookies.size(); i++) {
            cookiespec.validate(cookies.get(i), origin);
        }
        assertNotNull(cookies);
        assertEquals(1, cookies.size());
        assertEquals(".whatever.com", cookies.get(0).getDomain());
    }
View Full Code Here

Examples of org.apache.http.impl.cookie.BasicDomainHandler.validate()

        BasicClientCookie cookie = new BasicClientCookie("name", "value");
        CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", false);
        CookieAttributeHandler h = new BasicDomainHandler();
       
        cookie.setDomain(".somedomain.com");
        h.validate(cookie, origin);

        cookie.setDomain(".otherdomain.com");
        try {
            h.validate(cookie, origin);
            fail("MalformedCookieException should have been thrown");
View Full Code Here

Examples of org.apache.http.impl.cookie.BasicPathHandler.validate()

    public void testBasicPathValidate() throws Exception {
        BasicClientCookie cookie = new BasicClientCookie("name", "value");
        CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff", false);
        CookieAttributeHandler h = new BasicPathHandler();
        cookie.setPath("/stuff");
        h.validate(cookie, origin);
        cookie.setPath("/stuffed");
        try {
            h.validate(cookie, origin);
            fail("MalformedCookieException must have been thrown");
        } catch (MalformedCookieException ex) {
View Full Code Here

Examples of org.apache.imperius.spl.parser.compiler.IdentPrimaryTuple.validate()

                            .next();
                    if (i++ == 0)
                    {
                        ipt.setSymbolTable(_symTable);
                    }
                    returnType = ipt.validate(referenceTypeName);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.incubator.uima.DictionaryDocument.validate()

      // validate input file
      ArrayList<XmlError> validationErrors = new ArrayList<XmlError>();
      XmlOptions validationOptions = new XmlOptions();
      validationOptions.setErrorListener(validationErrors);

      boolean isValid = dictionaryDoc.validate(validationOptions);

      // output the errors if the XML is invalid.
      if (!isValid) {
         Iterator<XmlError> iter = validationErrors.iterator();
         StringBuffer errorMessages = new StringBuffer();
View Full Code Here

Examples of org.apache.incubator.uima.regex.ConceptSetDocument.validate()

      // validate input file
      ArrayList<XmlError> validationErrors = new ArrayList<XmlError>();
      XmlOptions validationOptions = new XmlOptions();
      validationOptions.setErrorListener(validationErrors);

      boolean isValid = conceptSetDoc.validate(validationOptions);

      // output the errors if the XML is invalid.
      if (!isValid) {
         Iterator<XmlError> iter = validationErrors.iterator();
         StringBuffer errorMessages = new StringBuffer();
View Full Code Here

Examples of org.apache.isis.core.metamodel.specloader.ServiceInitializer.validate()

        servicesInjector.setServices(services);
        servicesInjector.init();

        // validate
        final ServiceInitializer serviceInitializer = new ServiceInitializer();
        serviceInitializer.validate(getConfiguration(), container, services);

        // call @PostConstruct (in a session)
        IsisContext.openSession(new InitialisationSession());
        try {
            IsisContext.getTransactionManager().startTransaction();
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.ScalarModel.validate()

            private static final long serialVersionUID = 1L;

            @Override
            public void validate(final IValidatable<ObjectAdapter> validatable) {
                final ObjectAdapter proposedAdapter = validatable.getValue();
                final String reasonIfAny = scalarModel.validate(proposedAdapter);
                if (reasonIfAny != null) {
                    final ValidationError error = new ValidationError();
                    error.setMessage(reasonIfAny);
                    validatable.error(error);
                }
View Full Code Here

Examples of org.apache.ivory.client.IvoryClient.validate()

      validateColo(optionsList);
      result = client.submitAndSchedule(entityType, filePath);
    } else if (optionsList.contains(VALIDATE_OPT)) {
      validateFilePath(optionsList, filePath);
      validateColo(optionsList);
      result = client.validate(entityType, filePath);
    } else if (optionsList.contains(SCHEDULE_OPT)) {
      validateEntityName(optionsList, entityName);
      colo = getColo(colo);
      result = client.schedule(entityType, entityName, colo);
    } else if (optionsList.contains(SUSPEND_OPT)) {
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.