Package org.apache.ivy.util.filter

Examples of org.apache.ivy.util.filter.Filter


                    + ". Available options are " + getAllowedLogOptions());
        }

        pattern = getProperty(pattern, getSettings(), "ivy.retrieve.pattern");
        try {
            Filter artifactFilter = getArtifactFilter();
            RetrieveReport report = getIvyInstance().retrieve(
                getResolvedMrid(),
                ((RetrieveOptions) new RetrieveOptions().setLog(getLog()))
                        .setConfs(splitConfs(getConf())).setDestArtifactPattern(pattern)
                        .setDestIvyPattern(ivypattern).setArtifactFilter(artifactFilter)
View Full Code Here


        }
        return defaultResolver;
    }

    public synchronized String getResolverName(ModuleRevisionId mrid) {
        ModuleSettings ms = (ModuleSettings) moduleSettings.getRule(mrid, new Filter() {
            public boolean accept(Object o) {
                return ((ModuleSettings) o).getResolverName() != null;
            }
        });
        return ms == null ? defaultResolverName : ms.getResolverName();
View Full Code Here

        });
        return ms == null ? defaultResolverName : ms.getResolverName();
    }

    public synchronized String getDefaultBranch(ModuleId moduleId) {
        ModuleSettings ms = (ModuleSettings) moduleSettings.getRule(moduleId, new Filter() {
            public boolean accept(Object o) {
                return ((ModuleSettings) o).getBranch() != null;
            }
        });
        return ms == null ? getDefaultBranch() : ms.getBranch();
View Full Code Here

    public synchronized void setDefaultBranch(String defaultBranch) {
        this.defaultBranch = defaultBranch;
    }

    public synchronized ConflictManager getConflictManager(ModuleId moduleId) {
        ModuleSettings ms = (ModuleSettings) moduleSettings.getRule(moduleId, new Filter() {
            public boolean accept(Object o) {
                return ((ModuleSettings) o).getConflictManager() != null;
            }
        });
        if (ms == null) {
View Full Code Here

            return cm;
        }
    }

    public synchronized String getResolveMode(ModuleId moduleId) {
        ModuleSettings ms = (ModuleSettings) moduleSettings.getRule(moduleId, new Filter() {
            public boolean accept(Object o) {
                return ((ModuleSettings) o).getResolveMode() != null;
            }
        });
        return ms == null ? getDefaultResolveMode() : ms.getResolveMode();
View Full Code Here

        this.matcher = matcher == null ? ExactPatternMatcher.INSTANCE : matcher;
        if (event == null) {
            nameFilter = NoFilter.INSTANCE;
        } else {
            final Matcher eventNameMatcher = this.matcher.getMatcher(event);
            nameFilter = new Filter() {
                public boolean accept(Object o) {
                    IvyEvent e = (IvyEvent) o;
                    return eventNameMatcher.matches(e.getName());
                }
            };
View Full Code Here

                    String[] values = filterExpression.substring(index + 1).trim().split(",");
                    final Matcher[] matchers = new Matcher[values.length];
                    for (int i = 0; i < values.length; i++) {
                        matchers[i] = matcher.getMatcher(values[i].trim());
                    }
                    return new Filter() {
                        public boolean accept(Object o) {
                            IvyEvent e = (IvyEvent) o;
                            String val = (String) e.getAttributes().get(attname);
                            if (val == null) {
                                return false;
View Full Code Here

    }

    // test helpers

    private Filter acceptNone() {
        return new Filter() {
            public boolean accept(Object o) {
                return false;
            }

            public String toString() {
View Full Code Here

            }
        };
    }

    private Filter acceptSecond() {
        return new Filter() {
            private int cpt;

            public boolean accept(Object o) {
                return ++cpt == 2;
            }
View Full Code Here

        }
        return defaultResolver;
    }

    public String getResolverName(ModuleRevisionId mrid) {
        ModuleSettings ms = (ModuleSettings) moduleSettings.getRule(mrid, new Filter() {
            public boolean accept(Object o) {
                return ((ModuleSettings) o).getResolverName() != null;
            }
        });
        return ms == null ? defaultResolverName : ms.getResolverName();
View Full Code Here

TOP

Related Classes of org.apache.ivy.util.filter.Filter

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.