01: /*
02: * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.sra.admin.context;
07:
08: import java.io.File;
09: import java.io.FileFilter;
10:
11: //
12:
13: public class ConfigurationFileFilter implements FileFilter {
14: //
15: protected String prefix = null;
16: protected String suffix = null;
17:
18: public ConfigurationFileFilter(String prefix, String suffix) {
19: this .prefix = prefix;
20: this .suffix = suffix;
21: }
22:
23: //
24: //
25: //
26: public boolean accept(File f) {
27: Boolean result = Boolean.FALSE;
28:
29: if (!f.isDirectory()) {
30: String name = f.getName();
31: if (name.startsWith(prefix) && name.endsWith(suffix))
32: result = Boolean.TRUE;
33: }
34:
35: return result.booleanValue();
36: }
37: }
|