asia.redact.bracket.properties.mgmt
Class ServerLocalizedFileFinder

java.lang.Object
  extended by asia.redact.bracket.properties.mgmt.ServerLocalizedFileFinder

public class ServerLocalizedFileFinder
extends Object

 
 Suppose you have a set of server-localized properties files conforming to the schemata 
 described in ServerLocale class and located in various places on the server. Then, to find 
 all the associated files and put them in effective order, use something like:
 
 List folders = new ArrayList();
 folders.add("/Users/dave");
 folders.add("/etc/properties");
 folders.add("/opt/app/myapp");
 ...
 ServerLocalizedFileFinder finder = new ServerLocalizedFileFinder(folders, "myprops");
 finder.findFiles();
 
 

Author:
Dave

Nested Class Summary
(package private)  class ServerLocalizedFileFinder.MyComparator
          Do the work of comparing properties files which are in the ServerLocale schemata
(package private)  class ServerLocalizedFileFinder.MyFileFilter
          Files must meet the conditions of matching baseName and ending in .properties to qualify
 
Field Summary
(package private)  String baseName
           
(package private)  List<File> parentFolders
           
 
Constructor Summary
private ServerLocalizedFileFinder()
           
  ServerLocalizedFileFinder(File parentFolder, String baseName)
           
  ServerLocalizedFileFinder(List<File> parentFolders, String baseName)
           
 
Method Summary
 List<File> findFiles()
          Find all of the files in a given set for a baseName across a given set of parent folders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentFolders

List<File> parentFolders

baseName

String baseName
Constructor Detail

ServerLocalizedFileFinder

private ServerLocalizedFileFinder()

ServerLocalizedFileFinder

public ServerLocalizedFileFinder(File parentFolder,
                                 String baseName)

ServerLocalizedFileFinder

public ServerLocalizedFileFinder(List<File> parentFolders,
                                 String baseName)
Method Detail

findFiles

public List<File> findFiles()
Find all of the files in a given set for a baseName across a given set of parent folders. Return in appropriate order

Returns:


Copyright © 2011-2013 David R. Smith. All Rights Reserved.