| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFactorySet
edu.indiana.dlib.metsnav.struts.tiles.MetsNavI18nFactorySet
public class MetsNavI18nFactorySet
| Field Summary | |
|---|---|
static String[] | 
DEFAULT_DEFINITION_FILENAMES
Possible definition filenames.  | 
protected  MetsNavDefinitionsFactory | 
defaultFactory
Default factory.  | 
static String | 
DEFINITIONS_CONFIG_PARAMETER_NAME
Config file parameter name.  | 
static String | 
FILENAME_EXTENSION
Default filenames extension.  | 
protected  boolean | 
isValidatingParser
Do we want validating parser.  | 
protected static Log | 
log
Commons Logging instance.  | 
static String | 
PARSER_DETAILS_PARAMETER_NAME
Config file parameter name.  | 
static String | 
PARSER_VALIDATE_PARAMETER_NAME
Config file parameter name.  | 
protected  int | 
parserDetailLevel
Parser detail level.  | 
protected  XmlParser | 
xmlParser
XML parser used.  | 
| Constructor Summary | |
|---|---|
MetsNavI18nFactorySet()
Parameterless Constructor.  | 
|
MetsNavI18nFactorySet(ServletContext servletContext,
                      Map properties)
Constructor.  | 
|
| Method Summary | |
|---|---|
protected  MetsNavDefinitionsFactory | 
createDefaultFactory(ServletContext servletContext)
Create default factory .  | 
protected  DefinitionsFactory | 
createFactory(Object key,
              ServletRequest request,
              ServletContext servletContext)
Create a factory for specified key.  | 
 DefinitionsFactory | 
getDefaultFactory()
Get default factory.  | 
 ComponentDefinition | 
getDefinition(String name,
              ServletRequest request,
              ServletContext servletContext)
Get a definition by its name.  | 
protected  Object | 
getDefinitionsFactoryKey(String name,
                         ServletRequest request,
                         ServletContext servletContext)
Extract key that will be used to get the sub factory.  | 
 void | 
initFactory(ServletContext servletContext,
            Map properties)
Initialization method.  | 
protected  void | 
initFactory(ServletContext servletContext,
            String proposedFilename)
Initialization method.  | 
 String | 
toString()
Return String representation.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final String[] DEFAULT_DEFINITION_FILENAMES
public static final String DEFINITIONS_CONFIG_PARAMETER_NAME
public static final String FILENAME_EXTENSION
protected static Log log
public static final String PARSER_DETAILS_PARAMETER_NAME
public static final String PARSER_VALIDATE_PARAMETER_NAME
protected MetsNavDefinitionsFactory defaultFactory
protected boolean isValidatingParser
false. Can be
 set from servlet config file.
protected int parserDetailLevel
protected transient XmlParser xmlParser
| Constructor Detail | 
|---|
public MetsNavI18nFactorySet()
initFactory(ServletContext, java.util.Map)must be called
 prior to any use of created factory.
public MetsNavI18nFactorySet(ServletContext servletContext,
                             Map properties)
                      throws DefinitionsFactoryException
servletContext - Servlet context.properties - Map containing all properties.
FactoryNotFoundException - Can't find factory configuration file.
DefinitionsFactoryException| Method Detail | 
|---|
protected MetsNavDefinitionsFactory createDefaultFactory(ServletContext servletContext)
                                                  throws DefinitionsFactoryException,
                                                         FileNotFoundException
servletContext - Current servlet context. Used to open file.
DefinitionsFactoryException - If an error occur while creating factory.
FileNotFoundException - if factory can't be loaded from filenames.
protected DefinitionsFactory createFactory(Object key,
                                           ServletRequest request,
                                           ServletContext servletContext)
                                    throws DefinitionsFactoryException
key - The key.request - Servlet request.servletContext - Servlet context.
DefinitionsFactoryException - If an error occur while creating factory.public DefinitionsFactory getDefaultFactory()
public ComponentDefinition getDefinition(String name,
                                         ServletRequest request,
                                         ServletContext servletContext)
                                  throws NoSuchDefinitionException,
                                         DefinitionsFactoryException
name - Name of requested definition.request - Current servlet request.servletContext - Current servlet context.
NoSuchDefinitionException - No definition found for specified name
DefinitionsFactoryException - General exception
protected Object getDefinitionsFactoryKey(String name,
                                          ServletRequest request,
                                          ServletContext servletContext)
name - Name of requested definitionrequest - Current servlet request.servletContext - Current servlet context.
null if not found.
public void initFactory(ServletContext servletContext,
                        Map properties)
                 throws DefinitionsFactoryException
servletContext - Servlet Context passed to newly created factory.properties - Map of name/property passed to newly created factory. Map can
            contains more properties than requested.
DefinitionsFactoryException - An error occur during initialization.
protected void initFactory(ServletContext servletContext,
                           String proposedFilename)
                    throws DefinitionsFactoryException,
                           FileNotFoundException
servletContext - Servlet Context passed to newly created factory.proposedFilename - File names, comma separated, to use as base file names.
DefinitionsFactoryException - An error occur during initialization.
FileNotFoundExceptionpublic String toString()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||