Package org.rhq.augeas.util

Examples of org.rhq.augeas.util.GlobFilter


            this.expectedResults = new HashSet<String>(Arrays.asList(expectedResults));
        }

        void execute() {
            Set<String> collectedResults = new HashSet<String>();
            GlobFilter filter = new GlobFilter(glob);

            for (String fileName : testFileNames) {
                File f = new File(fileName);
                if (filter.accept(f)) {
                    collectedResults.add(fileName);
                }
            }

            assertEqualsNoOrder(collectedResults.toArray(), expectedResults.toArray(), "The glob '" + glob
View Full Code Here


            .getSimple(AugeasConfigurationComponent.EXCLUDE_GLOBS_PROP));

        boolean isIncluded = false;

        for (String include : includeGlobs) {
            if (new GlobFilter(include).accept(crontabFile)) {
                isIncluded = true;
                break;
            }
        }

        String errorText = "Given Cron tab file name would be created outside of mapped filters. See the Cron resource connection properties for the inclusion and exclusion filters set up.";
        if (!isIncluded) {
            throw new IllegalArgumentException(errorText);
        }

        for (String exclude : excludeGlobs) {
            if (new GlobFilter(exclude).accept(crontabFile)) {
                throw new IllegalArgumentException(errorText);
            }
        }

        updateCrontab(resourceName, configurationDefinition, resourceConfiguration);
View Full Code Here

TOP

Related Classes of org.rhq.augeas.util.GlobFilter

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.