Package org.jasig.portal.utils

Examples of org.jasig.portal.utils.PropsMatcher


            }

            if(upl==null) {
                // try guessing the profile through pattern matching

                final PropsMatcher userAgentMatcher = getUserAgentMatcher();

                if(userAgentMatcher!=null) {
                    // try matching
                    String profileFname=userAgentMatcher.match(userAgent);
                    if(profileFname!=null) {
                        // user agent has been matched
                        if (log.isDebugEnabled())
                            log.debug("GuestUserPreferencesManager::GuestUserPreferencesManager() : " +
                                    "userAgent \"" + userAgent + "\" has matched to a profile " + profileFname);
View Full Code Here


                userProfile = this.userLayoutStore.getSystemProfile(userAgent);
            }
           
            // try guessing the profile through pattern matching
            if(userProfile==null) {
                final PropsMatcher userAgentMatcher = getUserAgentMatcher();
                if (userAgentMatcher != null) {
                    // try matching
                    final String profileFname = userAgentMatcher.match(userAgent);
                   
                    // user agent has been matched
                    if (profileFname != null) {
                     
                      userProfile = userLayoutStore.getUserProfileByFname(person, profileFname);
View Full Code Here

    public static synchronized PropsMatcher getUserAgentMatcher() {
        if (userAgentMatcher == null) {
            InputStream userAgentMatcherStream = null;
            try {
                userAgentMatcherStream = UserPreferencesManager.class.getResourceAsStream(BROWSER_MAPPINGS_PROPERTIES);
                userAgentMatcher = new PropsMatcher(userAgentMatcherStream);
            }
            catch (IOException ioe) {
                logger.error("Failed to load browser mapping file: '" + BROWSER_MAPPINGS_PROPERTIES + "'", ioe);
            }
            finally {
View Full Code Here

                    try {
                        url = this.getClass().getResource("/properties/browser.mappings");
                        if (url != null) {
                          InputStream in = url.openStream();
                          try {
                            uaMatcher = new PropsMatcher(in);
                          } finally {
                            in.close();
                          }
                        }
                    } catch (IOException ioe) {
View Full Code Here

                    // init user agent matcher
                    URL url = null;
                    try {
                        url = this.getClass().getResource("/properties/browser.mappings");
                        if (url != null) {
                            uaMatcher = new PropsMatcher(url.openStream());
                        }
                    } catch (IOException ioe) {
                        log.error( "GuestUserPreferencesManager::GuestUserPreferencesManager() : Exception occurred while loading browser mapping file: " + url + ". " + ioe);
                    }
                }
View Full Code Here

TOP

Related Classes of org.jasig.portal.utils.PropsMatcher

Copyright © 2018 www.massapicom. 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.