Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.util
Class GlobHelper

    java.lang.Object
      com.beasys.commerce.util.GlobHelper

All Implemented Interfaces
  FilenameFilter

Deprecated Use `GlobHelper`

    @Deprecated
    public class GlobHelper

extends Object
implements FilenameFilter

A utility class for doing DOS-style pattern matching (GLOBing).

This supports only '`?`' and '`*`' pattern characters. No bounded (e.g. "`[abcd] file`") patterns are supported.

To do a simple pattern match, you can use the `matches` class method. Additionally, GlobHelper is a `FilenameFilter`.

This requires the OROMatcher regular expression libraries, which are bundled with WebLogic Server.

Since:
  2.0

Field Summary
`protected List` | `patterns` Deprecated See BEA Commerce product offering

Constructor Summary
`GlobHelper()` Deprecated See BEA Commerce product offering
`GlobHelper(Collection c)` Deprecated See BEA Commerce product offering
`GlobHelper(Iterator i)` Deprecated See BEA Commerce product offering
`GlobHelper(String pattern)` Deprecated See BEA Commerce product offering
`GlobHelper(String[] patterns)` Deprecated See BEA Commerce product offering

Method Summary
`boolean` | `accept(File dir, String name)` Deprecated See BEA Commerce product offering
`void` | `addPattern(String pat)` Deprecated See BEA Commerce product offering
`static com.oroinc.text.regex.Pattern` | `getPattern(String patStr)` Deprecated See BEA Commerce product offering
`List` | `getPatterns()` Deprecated See BEA Commerce product offering
`static boolean` | `matches(String patStr, String str)` Deprecated See BEA Commerce product offering
`boolean` | `removePattern(String pat)` Deprecated See BEA Commerce product offering

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### patterns

    protected List patterns

  Deprecated See BEA Commerce product offering
  Our list of file patterns to match.

Constructor Detail

### GlobHelper

    public GlobHelper()

  Deprecated See BEA Commerce product offering

  Constructor.

### GlobHelper

    public GlobHelper(String pattern)

  Deprecated See BEA Commerce product offering

  Constructor with pattern.

### GlobHelper

    public GlobHelper(String[] patterns)

  Deprecated See BEA Commerce product offering

  Constructor with patterns.

### GlobHelper

    public GlobHelper(Collection c)

  Deprecated See BEA Commerce product offering

  Constructor with patterns.

### GlobHelper

    public GlobHelper(Iterator i)

  Deprecated See BEA Commerce product offering

  Constructor with patterns.

Method Detail

### addPattern

    public void addPattern(String pat)

  Deprecated See BEA Commerce product offering

  Add a pattern.

### removePattern

    public boolean removePattern(String pat)

  Deprecated See BEA Commerce product offering

  Remove a pattern.

### getPatterns

    public List getPatterns()

  Deprecated See BEA Commerce product offering

  Get the patterns.

### accept

    public boolean accept(File dir,
                          String name)

  Deprecated See BEA Commerce product offering

  Tell if the specified directory and filename matches our current list patterns.

  Specified by:
    `accept` in interface `FilenameFilter`

### matches

    public static boolean matches(String patStr,
                                  String str)
                           throws IllegalArgumentException

  Deprecated See BEA Commerce product offering

  Determine if the given input string matches the specified input pattern.

  Parameters
    `pat` - the pattern (e.g. "`Some*Cl?.java`").
    `str` - the input string.
  Returns
    true if the input string matches the pattern, false if not
  Throws
    `IllegalArgumentException` - thrown on a bad pattern string.

### getPattern

    public static com.oroinc.text.regex.Pattern getPattern(String patStr)
                                                    throws com.oroinc.text.regex.MalformedPatternException

  Deprecated See BEA Commerce product offering

  Get a pattern from the pattern cache, which is a soft reference map of pattern string to Pattern.

  By using a sort reference map, the garbage collector can clean it out as needed because we can always recreate the Pattern objects from the strings.

  Throws
    `com.oroinc.text.regex.MalformedPatternException` - thrown on a bad pattern string

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved