tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r737919 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/MetaDataLocator.java
Date Mon, 26 Jan 2009 23:02:46 GMT
Author: hlship
Date: Mon Jan 26 23:02:45 2009
New Revision: 737919

URL: http://svn.apache.org/viewvc?rev=737919&view=rev
Log:
TAP5-471: MetaDataLocator throws an exception if meta-data not found and no symbol provides
a value; this should be documented

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/MetaDataLocator.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/MetaDataLocator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/MetaDataLocator.java?rev=737919&r1=737918&r2=737919&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/MetaDataLocator.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/MetaDataLocator.java
Mon Jan 26 23:02:45 2009
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008 The Apache Software Foundation
+// Copyright 2007, 2008, 2009 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
 package org.apache.tapestry5.services;
 
 import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.ioc.annotations.UsesMappedConfiguration;
 
 /**
  * Used to lookup meta data concerning a particular component. The primary source of meta
data is the meta data defined
@@ -25,8 +26,11 @@
  * logical name.
  * <p/>
  * Finally, if no metadata is available, then {@link org.apache.tapestry5.ioc.services.SymbolSource#valueForSymbol(String)}
- * is used to obtain a value.
+ * is used to obtain a value. Generally speaking, if you are going to use this service to
look up meta data, your should
+ * also make a contribution to the FactoryDefaults service; otherwise, you risk a runtime
exception if a meta-data key
+ * can not be resolved.
  */
+@UsesMappedConfiguration(String.class)
 public interface MetaDataLocator
 {
     /**
@@ -35,8 +39,7 @@
      *
      * @param key       the key used to locate the meta data (case insensitive)
      * @param resources the resources of the initial component used in the search
-     * @return the value if found (in the component, the component's container, etc. or via
a folder default) or null if
-     *         not found anywhere
+     * @return the value if found (in the component, the component's container, etc. or via
a folder default)
      * @throws RuntimeException if the value for the key is not present as meta data of the
component, as an override,
      *                          or as a symbol
      */



Mime
View raw message