org.mobicents.slee.management.rules
Class RulesFileFilter

java.lang.Object
  extended by org.mobicents.slee.management.rules.RulesFileFilter
All Implemented Interfaces:
java.io.FileFilter, org.jboss.net.protocol.URLLister.URLFilter

public class RulesFileFilter
extends java.lang.Object
implements java.io.FileFilter, org.jboss.net.protocol.URLLister.URLFilter


Constructor Summary
RulesFileFilter()
          Use the default values for suffixes, prefixes, and matches
RulesFileFilter(java.lang.String[] matches, java.lang.String[] prefixes, java.lang.String[] suffixes, java.lang.String[] acceptedRulesSuffixes)
          Create using a custom set of matches, prefixes, and suffixes.
 
Method Summary
 boolean accept(java.io.File file)
          If the filename matches any string in the prefix, suffix, or matches array, return false.
 boolean accept(java.net.URL baseURL, java.lang.String memberName)
           
 void addPrefix(java.lang.String prefix)
           
 void addPrefixes(java.lang.String[] prefixes)
           
 void addSuffix(java.lang.String suffix)
           
 void addSuffixes(java.lang.String[] suffixes)
           
 void delPrefix(java.lang.String prefix)
           
 void delPrefixes(java.lang.String[] prefixes)
           
 void delSuffix(java.lang.String suffix)
           
 void delSuffixes(java.lang.String[] suffixes)
           
 java.lang.String[] getMatches()
           
 java.lang.String[] getPrefixes()
           
 java.lang.String[] getSuffixes()
           
 void setMatches(java.lang.String[] matches)
           
 void setPrefixes(java.lang.String[] prefixes)
           
 void setSuffixes(java.lang.String[] suffixes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RulesFileFilter

public RulesFileFilter()
Use the default values for suffixes, prefixes, and matches


RulesFileFilter

public RulesFileFilter(java.lang.String[] matches,
                       java.lang.String[] prefixes,
                       java.lang.String[] suffixes,
                       java.lang.String[] acceptedRulesSuffixes)
Create using a custom set of matches, prefixes, and suffixes. If any of these arrays are null, then the corresponding default will be substituted.

Method Detail

addPrefix

public void addPrefix(java.lang.String prefix)

addPrefixes

public void addPrefixes(java.lang.String[] prefixes)

delPrefix

public void delPrefix(java.lang.String prefix)

delPrefixes

public void delPrefixes(java.lang.String[] prefixes)

addSuffix

public void addSuffix(java.lang.String suffix)

addSuffixes

public void addSuffixes(java.lang.String[] suffixes)

delSuffix

public void delSuffix(java.lang.String suffix)

delSuffixes

public void delSuffixes(java.lang.String[] suffixes)

getSuffixes

public java.lang.String[] getSuffixes()

setSuffixes

public void setSuffixes(java.lang.String[] suffixes)

getPrefixes

public java.lang.String[] getPrefixes()

setPrefixes

public void setPrefixes(java.lang.String[] prefixes)

getMatches

public java.lang.String[] getMatches()

setMatches

public void setMatches(java.lang.String[] matches)

accept

public boolean accept(java.io.File file)
If the filename matches any string in the prefix, suffix, or matches array, return false. Perhaps a bit of overkill, but this method operates in log(n) time, where n is the size of the arrays.

Specified by:
accept in interface java.io.FileFilter
Parameters:
file - The file to be tested
Returns:
false if the filename matches any of the prefixes, suffixes, or matches.

accept

public boolean accept(java.net.URL baseURL,
                      java.lang.String memberName)
Specified by:
accept in interface org.jboss.net.protocol.URLLister.URLFilter


Copyright © 2009. All Rights Reserved.