Package com.volantis.mcs.devices.policy

Examples of com.volantis.mcs.devices.policy.PolicyDescriptor


            final String language = (String) entry.getKey();
            final Properties properties = (Properties) entry.getValue();
            if (properties.containsKey(nameProperty)) {
                final Locale locale =
                    convertPropertiesLanguageToLocale(language);
                final PolicyDescriptor policyDescriptor =
                    retrievePolicyDescriptor(connection, policyName, locale);
                if (policyDescriptor != null) {
                    result.add(policyDescriptor);
                }
            }
        }
        if(result.size() == 0){
            // property not found in any locale so wee need to add at least
            // default one
            final Locale locale =
                    convertPropertiesLanguageToLocale("");
            final PolicyDescriptor policyDescriptor =
                retrievePolicyDescriptor(connection, policyName, locale);
            if (policyDescriptor != null) {
                result.add(policyDescriptor);
            }           
        }
View Full Code Here


                final RepositoryConnection connection = createConnection();

                final List descriptors =
                    accessor.retrievePolicyDescriptors(connection, "J2MEconf");
                assertEquals(2, descriptors.size());
                final PolicyDescriptor descriptor1 =
                    (PolicyDescriptor) descriptors.get(0);
                checkLanguage(descriptor1);
                final PolicyDescriptor descriptor2 =
                    (PolicyDescriptor) descriptors.get(1);
                checkLanguage(descriptor2);
                assertNotEquals(descriptor1.getLanguage(),
                    descriptor2.getLanguage());
            }

            private void checkLanguage(final PolicyDescriptor descriptor) {
                final String language = descriptor.getLanguage();
                if (language.equals("__")) {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.devices.policy.PolicyDescriptor

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.