wt.tools.boot
Class StandardizeJarLocalesTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended bywt.tools.boot.StandardizeJarLocalesTask

public class StandardizeJarLocalesTask
extends org.apache.tools.ant.Task

This Ant task allows one to remove all but one locale-specific resources for each resource bundle (i.e. the null-locale resource is also retained) from a jar content list. Where possible a single "preferred" locale's entry is retained for consistency. Locales are removed in order to make the jar contents lighter-weight, i.e. for those not interested in certain locales. A single locale-specific resource is retained as it is much easier to recognize bundles of localized resources from a locale-specific resource as opposed to null-locale resources. ExpandJarLocalesTask is responsible for producing content lists containing resources specific to desired locale's.


Field Summary
private  File codebaseDir
           
private static String DEFAULT_PREFERRED_LOCALE
           
private  File jarContentsDir
           
private  File localeListFile
           
private  String logicalJarNames
           
private  String preferredLocale
           
private  boolean traceOnly
           
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
StandardizeJarLocalesTask()
           
 
Method Summary
 void execute()
           
private  void execute(File file, Collection localeSubstrings)
           
 void setCodebaseDir(File codebaseDir)
           
 void setJarContentsDir(File jarContentsDir)
           
 void setLocaleListFile(File localeListFile)
           
 void setLogicalJarNames(String logicalJarNames)
           
 void setPreferredLocale(String preferredLocale)
           
 void setTraceOnly(boolean traceOnly)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PREFERRED_LOCALE

private static final String DEFAULT_PREFERRED_LOCALE
See Also:
Constant Field Values

codebaseDir

private File codebaseDir

jarContentsDir

private File jarContentsDir

logicalJarNames

private String logicalJarNames

localeListFile

private File localeListFile

preferredLocale

private String preferredLocale

traceOnly

private boolean traceOnly
Constructor Detail

StandardizeJarLocalesTask

public StandardizeJarLocalesTask()
Method Detail

setCodebaseDir

public void setCodebaseDir(File codebaseDir)

setJarContentsDir

public void setJarContentsDir(File jarContentsDir)

setLogicalJarNames

public void setLogicalJarNames(String logicalJarNames)

setLocaleListFile

public void setLocaleListFile(File localeListFile)

setPreferredLocale

public void setPreferredLocale(String preferredLocale)

setTraceOnly

public void setTraceOnly(boolean traceOnly)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

execute

private void execute(File file,
                     Collection localeSubstrings)
              throws IOException
Throws:
IOException