Package org.exoplatform.portal.config.model

Examples of org.exoplatform.portal.config.model.UserAgentConditions


        }
        return userAgentDoesNotContain;
    }

    public UserAgentConditions build() {
        UserAgentConditions userAgentCondition = new UserAgentConditions();
        userAgentCondition.setStorageName(this.getStorageName());
        userAgentCondition.setContains((ArrayList) this.userAgentContains);
        userAgentCondition.setDoesNotContain((ArrayList) this.userAgentDoesNotContain);
        return userAgentCondition;
    }
View Full Code Here


        }
        return userAgentDoesNotContain;
    }

    public UserAgentConditions build() {
        UserAgentConditions userAgentCondition = new UserAgentConditions();
        userAgentCondition.setStorageName(this.getStorageName());
        userAgentCondition.setContains((ArrayList<String>) this.userAgentContains);
        userAgentCondition.setDoesNotContain((ArrayList<String>) this.userAgentDoesNotContain);
        return userAgentCondition;
    }
View Full Code Here

        if (navigator.getName() != Element.USER_AGENT) {
            throw unexpectedElement(navigator);
        }
        navigator.child();

        UserAgentConditions userAgentConditions = new UserAgentConditions();

        // contains
        ArrayList<String> contains = null;
        for (StaxNavigator<Element> fork : navigator.fork(Element.CONTAINS)) {
            if (contains == null) {
                contains = new ArrayList<String>();
            }
            contains.add(fork.getContent());
        }
        if (contains != null) {
            userAgentConditions.setContains(contains);
        }

        // does-not-contain
        ArrayList<String> doesNotContain = null;
        for (StaxNavigator<Element> fork : navigator.fork(Element.DOES_NOT_CONTAIN)) {
            if (doesNotContain == null) {
                doesNotContain = new ArrayList<String>();
            }
            doesNotContain.add(fork.getContent());
        }
        if (doesNotContain != null) {
            userAgentConditions.setDoesNotContain(doesNotContain);
        }

        return userAgentConditions;
    }
View Full Code Here

     */
    private RedirectCondition createNewCondition() {
        RedirectCondition newRC = new RedirectCondition();
        newRC.setName(this.siteName + "_" + redirectName +"_condition" + (pr.getConditions().size()+1));
        newRC.setDeviceProperties(new ArrayList<DevicePropertyCondition>());
        UserAgentConditions newUAC = new UserAgentConditions();
        ArrayList<String> emptyContains = new ArrayList<String>();
        emptyContains.add("");
        newUAC.setContains(emptyContains);
        ArrayList<String> emptyDoesNotContain = new ArrayList<String>();
        emptyDoesNotContain.add("");
        newUAC.setDoesNotContain(emptyDoesNotContain);
        newRC.setUserAgentConditions(newUAC);
        deviceProperties = new ArrayList<DevicePropertyConditionWrapper>();

        return newRC;
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.model.UserAgentConditions

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.