Save This Page
Home » tiles-2.2.1-src » org.apache » tiles » definition » [javadoc | source]
org.apache.tiles.definition
public class: UrlDefinitionsFactory [javadoc | source]
java.lang.Object
   org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory
      org.apache.tiles.definition.UrlDefinitionsFactory

All Implemented Interfaces:
    Refreshable, DefinitionsFactory, TilesApplicationContextAware

Deprecated! Use - UnresolvingLocaleDefinitionsFactory and using ResolvingLocaleUrlDefinitionDAO as Tiles DAO.

DefinitionsFactory implementation that manages Definitions configuration data from URLs, resolving inheritance when the URL is loaded.

The Definition objects are read from the DigesterDefinitionsReader class unless another implementation is specified.

Field Summary
protected  List<Object> sources    Contains the URL objects identifying where configuration data is found.
     
    protected  DefinitionsReader reader    Reader used to get definitions from the sources.
       
      protected  Map<String, Long> lastModifiedDates    Contains the dates that the URL sources were last modified.
         
        Fields inherited from org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory:
        definitionDao,  applicationContext,  localeResolver
        Method from org.apache.tiles.definition.UrlDefinitionsFactory Summary:
        addDefinitions,   addSource,   calculatePostfixes,   concatPostfix,   createDefaultDefinitionDAO,   createDefinitions,   getDefinitions,   getResourceNames,   getResourceString,   isContextProcessed,   readDefinitions,   refresh,   refreshRequired
        Methods from org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory:
        addSource,   getDefinition,   init,   readDefinitions,   setApplicationContext,   setDefinitionDAO,   setLocaleResolver
        Methods from java.lang.Object:
        clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
        Method from org.apache.tiles.definition.UrlDefinitionsFactory Detail:
         protected  void addDefinitions(Definitions definitions,
            TilesRequestContext tilesContext) 
        Deprecated! Let - the definitions be loaded by a DefinitionDAO .

              Deprecated!
          Appends locale-specific Definition objects to an existing Definitions set by reading locale-specific versions of the applied sources.
         public  void addSource(Object source) 
        Deprecated! Use - URLReader#addSourceURL(URL) .

              Deprecated!
          Adds a source where Definition objects are stored.

          Implementations should publish what type of source object they expect. The source should contain enough information to resolve a configuration source containing definitions. The source should be a "base" source for configurations. Internationalization and Localization properties will be applied by implementations to discriminate the correct data sources based on locale.

         protected static List<String> calculatePostfixes(Locale locale) 
        Deprecated! Use - LocaleUtil#calculatePostfixes(Locale) instead.

              Deprecated!
          Calculate the postfixes along the search path from the base bundle to the bundle specified by baseName and locale. Method copied from java.util.ResourceBundle
         protected static String concatPostfix(String name,
            String postfix) 
        Deprecated! Use - LocaleUtil#concatPostfix(String,String) instead

              Deprecated!
          Concat postfix to the name. Take care of existing filename extension. Transform the given name "name.ext" to have "name" + "postfix" + "ext". If there is no ext, return "name" + "postfix".
         protected DefinitionDAO<Locale> createDefaultDefinitionDAO() 
              Deprecated!
          Creates the default definition DAO, if it has not been specified outside.
         protected Definitions createDefinitions() 
        Deprecated! Do - not use! Deprecated with no replacement.

              Deprecated!
          Creates a new instance of Definitions. Override this method to provide your custom instance of Definitions.
         protected Definitions getDefinitions() 
        Deprecated! Do - not use! Deprecated with no replacement.

              Deprecated!
          Returns the definitions holder object.
         protected List<String> getResourceNames(String resourceString) 
        Deprecated! Deprecated - without replacement.

              Deprecated!
          Parse the resourceString into a list of resource paths which can be loaded by the application context.
         protected String getResourceString(Map<String, String> parms) 
        Deprecated! Deprecated - without replacement.

              Deprecated!
         protected boolean isContextProcessed(TilesRequestContext tilesContext) 
        Deprecated! It - always return true.

              Deprecated!
          Indicates whether a given context has been processed or not.

          This method can be used to avoid unnecessary synchronization of the DefinitionsFactory in multi-threaded situations. Check the return of isContextProcessed before synchronizing the object and reading locale-specific definitions.

         public Definitions readDefinitions() 
        Deprecated! Let - the Definitions Factory use it.

              Deprecated!
          Creates and returns a Definitions set by reading configuration data from the applied sources.
         public synchronized  void refresh() 
              Deprecated!
          {@inheritDoc}
         public boolean refreshRequired() 
              Deprecated!
          Indicates whether the DefinitionsFactory is out of date and needs to be reloaded.