Examples of match()


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

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

        cookie.setDomain("somedomain.com");
        assertTrue(h.match(cookie, origin));
       
        cookie.setDomain(".somedomain.com");
        assertTrue(h.match(cookie, origin));
    }

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

        cookie.setPath("/");
        cookie.setAttribute(ClientCookie.PATH_ATTR, cookie.getPath());

        CookieSpec cookiespec = new BrowserCompatSpec();
        CookieOrigin origin = new CookieOrigin("sourceforge.net", 80, "/", false);
        assertTrue(cookiespec.match(cookie, origin));
    }

    public void testSecondDomainLevelCookieMatch2() throws Exception {
        BasicClientCookie cookie = new BasicClientCookie("name", null);
        cookie.setDomain("sourceforge.net");

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

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

        cookie.setDomain("somedomain.com");
        assertTrue(h.match(cookie, origin));
       
        cookie.setDomain(".somedomain.com");
        assertTrue(h.match(cookie, origin));
    }

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

    public void testBasicPathMatch1() throws Exception {
        BasicClientCookie cookie = new BasicClientCookie("name", "value");
        CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff", false);
        CookieAttributeHandler h = new BasicPathHandler();
        cookie.setPath("/stuff");
        assertTrue(h.match(cookie, origin));
    }
   
    public void testBasicPathMatch2() throws Exception {
        BasicClientCookie cookie = new BasicClientCookie("name", "value");
        CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff/", false);

Examples of org.apache.http.impl.cookie.BasicSecureHandler.match()

        BasicClientCookie cookie = new BasicClientCookie("name", "value");
        CookieAttributeHandler h = new BasicSecureHandler();

        CookieOrigin origin1 = new CookieOrigin("somehost", 80, "/stuff", false);
        cookie.setSecure(false);
        assertTrue(h.match(cookie, origin1));
        cookie.setSecure(true);
        assertFalse(h.match(cookie, origin1));

        CookieOrigin origin2 = new CookieOrigin("somehost", 80, "/stuff", true);
        cookie.setSecure(false);

Examples of org.apache.http.impl.cookie.PublicSuffixFilter.match()

       
        PublicSuffixFilter h = new PublicSuffixFilter(new RFC2109DomainHandler());
        h.setPublicSuffixes(Arrays.asList(new String[] { "co.uk", "com" }));
       
        cookie.setDomain(".co.uk");
        assertFalse(h.match(cookie, new CookieOrigin("apache.co.uk", 80, "/stuff", false)));
       
        cookie.setDomain("co.uk");
        assertFalse(h.match(cookie, new CookieOrigin("apache.co.uk", 80, "/stuff", false)));
       
        cookie.setDomain(".com");

Examples of org.apache.jena.atlas.web.AcceptList.match()

    /** Match a single media type against a header string */
    public static String match(String headerString, String mediaRangeStr)
    {
        AcceptList l = new AcceptList(headerString) ;
        MediaRange aItem = new MediaRange(mediaRangeStr) // MediaType
        MediaType m = l.match(aItem) ;
        if ( m == null )
            return null ;
        return m.toHeaderString() ;
    }
   

Examples of org.apache.karaf.features.internal.resolver.CapabilitySet.match()

            Map<String, Object> attrs = new HashMap<String, Object>();
            attrs.put(CAPABILITY_TYPE_ATTRIBUTE, type);
            attrs.put(IDENTITY_NAMESPACE, name);
            attrs.put(CAPABILITY_VERSION_ATTRIBUTE, version);
            SimpleFilter sf = SimpleFilter.convert(attrs);
            return !set.match(sf, true).isEmpty();
        } else {
            return false;
        }
    }

Examples of org.apache.mailet.Matcher.match()

            // log("Matching with "
            // + matcher
            // .getMatcherConfig()
            // .getMatcherName()
            // );
            Collection result = matcher.match(mail);
            if (first) {
                if (result == null) {
                    result = new ArrayList(0);
                }
                finalResult = result;

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath.match()

        getLogger().info( "remove [" + path + "] from legacy artifact path resolution" );
        Configuration configuration = archivaConfiguration.getConfiguration();
        for ( Iterator iterator = configuration.getLegacyArtifactPaths().iterator(); iterator.hasNext(); )
        {
            LegacyArtifactPath legacyArtifactPath = (LegacyArtifactPath) iterator.next();
            if (legacyArtifactPath.match( path ))
            {
                iterator.remove();
            }
        }
        return saveConfiguration( configuration );
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.