Package org.exoplatform.portal.mop.redirects

Examples of org.exoplatform.portal.mop.redirects.DeviceProperty


        }

        if (redirectConditionData.getDevicePropertyConditionData() != null) {
            for (RedirectDevicePropertyConditionData propertyConditionData : redirectConditionData
                    .getDevicePropertyConditionData()) {
                DeviceProperty deviceProperty = condition.getDeviceProperties().get(propertyConditionData.getPropertyName());
                if (deviceProperty == null) {
                    deviceProperty = condition.createDeviceProperty();
                    condition.getDeviceProperties().put(propertyConditionData.getPropertyName(), deviceProperty);
                }

                deviceProperty.setName(propertyConditionData.getPropertyName());

                if (propertyConditionData.getGreaterThan() != null) {
                    deviceProperty.setGreaterThan(propertyConditionData.getGreaterThan());
                }

                if (propertyConditionData.getLessThan() != null) {
                    deviceProperty.setLessThan(propertyConditionData.getLessThan());
                }

                if (propertyConditionData.getEquals() != null) {
                    deviceProperty.setEquals(propertyConditionData.getEquals());
                }

                if (propertyConditionData.getMatches() != null) {
                    deviceProperty.setPattern(propertyConditionData.getMatches().toString());
                }
            }
        }
    }
View Full Code Here


            Set<String> notFoundProperties = new HashSet<String>(condition.getDeviceProperties().keySet());

            for (RedirectDevicePropertyConditionData propertyConditionData : redirectConditionData
                    .getDevicePropertyConditionData()) {

                DeviceProperty deviceProperty = condition.getDeviceProperties().get(propertyConditionData.getPropertyName());
                // if not found, then create it
                if (deviceProperty == null) {
                    deviceProperty = condition.createDeviceProperty();
                    condition.getDeviceProperties().put(propertyConditionData.getPropertyName(), deviceProperty);
                } else {
                    // if found, remove from the nonFound list
                    notFoundProperties.remove(propertyConditionData.getPropertyName());
                }

                deviceProperty.setName(propertyConditionData.getPropertyName());

                if (propertyConditionData.getGreaterThan() != null) {
                    deviceProperty.setGreaterThan(propertyConditionData.getGreaterThan());
                }

                if (propertyConditionData.getLessThan() != null) {
                    deviceProperty.setLessThan(propertyConditionData.getLessThan());
                }

                if (propertyConditionData.getEquals() != null) {
                    deviceProperty.setEquals(propertyConditionData.getEquals());
                }

                if (propertyConditionData.getMatches() != null) {
                    deviceProperty.setPattern(propertyConditionData.getMatches().toString());
                }
            }

            // remove all the device conditions which were not in the RedirectConditionData list
            for (String devicePropertyName : notFoundProperties) {
View Full Code Here

        }

        if (redirectConditionData.getDevicePropertyConditionData() != null) {
            for (RedirectDevicePropertyConditionData propertyConditionData : redirectConditionData
                    .getDevicePropertyConditionData()) {
                DeviceProperty deviceProperty = condition.getDeviceProperties().get(propertyConditionData.getPropertyName());
                if (deviceProperty == null) {
                    deviceProperty = condition.createDeviceProperty();
                    condition.getDeviceProperties().put(propertyConditionData.getPropertyName(), deviceProperty);
                }

                deviceProperty.setName(propertyConditionData.getPropertyName());

                if (propertyConditionData.getGreaterThan() != null) {
                    deviceProperty.setGreaterThan(propertyConditionData.getGreaterThan());
                }

                if (propertyConditionData.getLessThan() != null) {
                    deviceProperty.setLessThan(propertyConditionData.getLessThan());
                }

                if (propertyConditionData.getEquals() != null) {
                    deviceProperty.setEquals(propertyConditionData.getEquals());
                }

                if (propertyConditionData.getMatches() != null) {
                    deviceProperty.setPattern(propertyConditionData.getMatches().toString());
                }
            }
        }
    }
View Full Code Here

            Set<String> notFoundProperties = new HashSet<String>(condition.getDeviceProperties().keySet());

            for (RedirectDevicePropertyConditionData propertyConditionData : redirectConditionData
                    .getDevicePropertyConditionData()) {

                DeviceProperty deviceProperty = condition.getDeviceProperties().get(propertyConditionData.getPropertyName());
                // if not found, then create it
                if (deviceProperty == null) {
                    deviceProperty = condition.createDeviceProperty();
                    condition.getDeviceProperties().put(propertyConditionData.getPropertyName(), deviceProperty);
                } else {
                    // if found, remove from the nonFound list
                    notFoundProperties.remove(propertyConditionData.getPropertyName());
                }

                deviceProperty.setName(propertyConditionData.getPropertyName());

                if (propertyConditionData.getGreaterThan() != null) {
                    deviceProperty.setGreaterThan(propertyConditionData.getGreaterThan());
                }

                if (propertyConditionData.getLessThan() != null) {
                    deviceProperty.setLessThan(propertyConditionData.getLessThan());
                }

                if (propertyConditionData.getEquals() != null) {
                    deviceProperty.setEquals(propertyConditionData.getEquals());
                }

                if (propertyConditionData.getMatches() != null) {
                    deviceProperty.setPattern(propertyConditionData.getMatches().toString());
                }
            }

            // remove all the device conditions which were not in the RedirectConditionData list
            for (String devicePropertyName : notFoundProperties) {
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.redirects.DeviceProperty

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.