org.sourcejammer.client
Class HistoryTypeMapper

java.lang.Object
  |
  +--org.sourcejammer.client.HistoryTypeMapper

public class HistoryTypeMapper
extends java.lang.Object

Title: $FileName: HistoryTypeMapper.java$

Version:
$VerNum: 4$

$Description: $
$KeyWordsOff: $
Author:
$AuthorName: Rob MacGrogan$

Field Summary
static java.lang.String BIN_COMPRESSED_LIST
           
static java.lang.String BIN_CURR_ONLY_LIST
           
static java.lang.String BIN_DIFF_LIST
           
static java.lang.String BIN_FULL_LIST
           
private static java.lang.String DEFAULT
           
private  java.lang.String defaultType
           
static java.lang.String FILE_HIST_PROPS_NAME
           
private  java.util.Hashtable fileFilterList
           
static java.lang.String IGNORE_LIST
           
private  java.util.HashMap ignoreList
           
private static HistoryTypeMapper instance
           
static java.lang.String NO_EXT_VALUE
           
private static java.lang.String SEPARATOR
           
static java.lang.String TEXT_LIST
           
 
Constructor Summary
private HistoryTypeMapper()
           
 
Method Summary
private  void addFilters(java.util.Iterator itr, java.lang.String histType)
           
private  java.util.Properties addHashtableValuesToProperties()
           
private  void addListToHashtable(java.lang.String listIdentifier, java.util.Properties props)
           
 java.lang.String getDefaultHistoryTypeForFile(java.lang.String fileName)
          Return default file type/storage type for file.
 java.lang.String getDefaultType()
          Returns the defaultType.
static java.lang.String getExtension(java.lang.String fileName)
           
 java.lang.String getFilterList(java.lang.String type)
          Inefficient.
 java.util.Hashtable getFiltersForAllTypes()
          Hashtable keys are types.
 java.util.HashMap getIgnoreList()
           
static HistoryTypeMapper getInstance()
           
static HistoryTypeMapper initializeInstance()
           
private  java.util.Iterator parseList(java.lang.String list)
          Parse space separated list to Iterator.
 void save()
           
 void setDefaultType(java.lang.String defaultType)
          Sets the defaultType.
 void setFiltersForAllTypes(java.util.Hashtable allFilters)
          Must be a hashtable of objects where toString() is space separated string of filters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_HIST_PROPS_NAME

public static final java.lang.String FILE_HIST_PROPS_NAME
See Also:
Constant Field Values

TEXT_LIST

public static final java.lang.String TEXT_LIST
See Also:
Constant Field Values

BIN_COMPRESSED_LIST

public static final java.lang.String BIN_COMPRESSED_LIST
See Also:
Constant Field Values

BIN_FULL_LIST

public static final java.lang.String BIN_FULL_LIST
See Also:
Constant Field Values

BIN_DIFF_LIST

public static final java.lang.String BIN_DIFF_LIST
See Also:
Constant Field Values

BIN_CURR_ONLY_LIST

public static final java.lang.String BIN_CURR_ONLY_LIST
See Also:
Constant Field Values

IGNORE_LIST

public static final java.lang.String IGNORE_LIST
See Also:
Constant Field Values

DEFAULT

private static final java.lang.String DEFAULT
See Also:
Constant Field Values

SEPARATOR

private static final java.lang.String SEPARATOR
See Also:
Constant Field Values

NO_EXT_VALUE

public static final java.lang.String NO_EXT_VALUE
See Also:
Constant Field Values

fileFilterList

private java.util.Hashtable fileFilterList

ignoreList

private java.util.HashMap ignoreList

defaultType

private java.lang.String defaultType

instance

private static HistoryTypeMapper instance
Constructor Detail

HistoryTypeMapper

private HistoryTypeMapper()
                   throws java.io.IOException
Method Detail

getInstance

public static HistoryTypeMapper getInstance()

initializeInstance

public static HistoryTypeMapper initializeInstance()
                                            throws java.io.IOException
java.io.IOException

getIgnoreList

public java.util.HashMap getIgnoreList()

getDefaultHistoryTypeForFile

public java.lang.String getDefaultHistoryTypeForFile(java.lang.String fileName)
Return default file type/storage type for file.


getExtension

public static java.lang.String getExtension(java.lang.String fileName)

setFiltersForAllTypes

public void setFiltersForAllTypes(java.util.Hashtable allFilters)
Must be a hashtable of objects where toString() is space separated string of filters.


getFilterList

public java.lang.String getFilterList(java.lang.String type)
Inefficient. Use getFiltersForAllTypes() insead.


addListToHashtable

private void addListToHashtable(java.lang.String listIdentifier,
                                java.util.Properties props)

parseList

private java.util.Iterator parseList(java.lang.String list)
Parse space separated list to Iterator.


addFilters

private void addFilters(java.util.Iterator itr,
                        java.lang.String histType)

save

public void save()
          throws java.io.IOException
java.io.IOException

getFiltersForAllTypes

public java.util.Hashtable getFiltersForAllTypes()
Hashtable keys are types. Values are StringBuffers of each type's filters (extensions).


addHashtableValuesToProperties

private java.util.Properties addHashtableValuesToProperties()

getDefaultType

public java.lang.String getDefaultType()
Returns the defaultType.

Returns:
String

setDefaultType

public void setDefaultType(java.lang.String defaultType)
Sets the defaultType.

Parameters:
defaultType - The defaultType to set


Copyright 2003 Soucejammer project.