Author: davsclaus Date: Mon Mar 26 18:00:30 2012 New Revision: 1305476 URL: http://svn.apache.org/viewvc?rev=1305476&view=rev Log: Polished API on CamelContext to refer to which methods to use for @deprecated methods.
Modified: camel/branches/camel-2.9.x/ (props changed) camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/CamelContext.java camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java camel/branches/camel-2.9.x/components/camel-solr/ (props changed) Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ Merged /camel/trunk:r1305475 Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/CamelContext.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/CamelContext.java?rev=1305476&r1=1305475&r2=1305476&view=diff ============================================================================== --- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/CamelContext.java (original) +++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/CamelContext.java Mon Mar 26 18:00:30 2012 @@ -321,6 +321,7 @@ public interface CamelContext extends Su * Returns a list of the current route definitions * * @return list of the current route definitions + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#getRouteDefinitions()} */ @Deprecated List<RouteDefinition> getRouteDefinitions(); @@ -330,6 +331,7 @@ public interface CamelContext extends Su * * @param id id of the route * @return the route definition or <tt>null</tt> if not found + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#getRouteDefinition(String)} */ @Deprecated RouteDefinition getRouteDefinition(String id); @@ -368,6 +370,7 @@ public interface CamelContext extends Su * @param is input stream with the route(s) definition to add * @throws Exception if the route definitions could not be loaded for whatever reason * @return the route definitions + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#loadRoutesDefinition(java.io.InputStream)} */ @Deprecated RoutesDefinition loadRoutesDefinition(InputStream is) throws Exception; @@ -377,6 +380,7 @@ public interface CamelContext extends Su * * @param routeDefinitions the route(s) definition to add * @throws Exception if the route definitions could not be created for whatever reason + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#addRouteDefinitions(java.util.Collection)} */ @Deprecated void addRouteDefinitions(Collection<RouteDefinition> routeDefinitions) throws Exception; @@ -386,6 +390,7 @@ public interface CamelContext extends Su * * @param routeDefinition the route definition to add * @throws Exception if the route definition could not be created for whatever reason + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#addRouteDefinition(org.apache.camel.model.RouteDefinition)} */ @Deprecated void addRouteDefinition(RouteDefinition routeDefinition) throws Exception; @@ -396,6 +401,7 @@ public interface CamelContext extends Su * * @param routeDefinitions route(s) definitions to remove * @throws Exception if the route definitions could not be removed for whatever reason + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#removeRouteDefinitions(java.util.Collection)} */ @Deprecated void removeRouteDefinitions(Collection<RouteDefinition> routeDefinitions) throws Exception; @@ -406,6 +412,7 @@ public interface CamelContext extends Su * * @param routeDefinition route definition to remove * @throws Exception if the route definition could not be removed for whatever reason + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#removeRouteDefinition(org.apache.camel.model.RouteDefinition)} */ @Deprecated void removeRouteDefinition(RouteDefinition routeDefinition) throws Exception; @@ -415,6 +422,7 @@ public interface CamelContext extends Su * * @param route the route to start * @throws Exception is thrown if the route could not be started for whatever reason + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#startRoute(org.apache.camel.model.RouteDefinition)} */ @Deprecated void startRoute(RouteDefinition route) throws Exception; @@ -432,6 +440,7 @@ public interface CamelContext extends Su * * @param route the route to stop * @throws Exception is thrown if the route could not be stopped for whatever reason + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#stopRoute(org.apache.camel.model.RouteDefinition)} */ @Deprecated void stopRoute(RouteDefinition route) throws Exception; @@ -731,7 +740,7 @@ public interface CamelContext extends Su /** * Gets the default error handler builder which is inherited by the routes - * @deprecated The return type will be switched to ErrorHandlerFactory in Camel 3.0 + * @deprecated The return type will be switched to {@link ErrorHandlerFactory} in Camel 3.0 * * @return the builder */ @@ -749,6 +758,7 @@ public interface CamelContext extends Su * Sets the data formats that can be referenced in the routes. * * @param dataFormats the data formats + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#setDataFormats(java.util.Map)} */ @Deprecated void setDataFormats(Map<String, DataFormatDefinition> dataFormats); @@ -757,6 +767,7 @@ public interface CamelContext extends Su * Gets the data formats that can be referenced in the routes. * * @return the data formats available + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#getDataFormats()} */ @Deprecated Map<String, DataFormatDefinition> getDataFormats(); @@ -774,6 +785,7 @@ public interface CamelContext extends Su * * @param name the data format definition name or a reference to it in the {@link Registry} * @return the resolved data format definition, or <tt>null</tt> if not found + * @deprecated use {@link org.apache.camel.model.ModelCamelContext#resolveDataFormatDefinition(String)} */ @Deprecated DataFormatDefinition resolveDataFormatDefinition(String name); Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java?rev=1305476&r1=1305475&r2=1305476&view=diff ============================================================================== --- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java (original) +++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java Mon Mar 26 18:00:30 2012 @@ -24,8 +24,7 @@ import java.util.Map; import org.apache.camel.CamelContext; /** - * Model level interface for a camel context - * + * Model level interface for the {@link CamelContext} */ public interface ModelCamelContext extends CamelContext { @@ -48,8 +47,8 @@ public interface ModelCamelContext exten * Loads a collection of route definitions from the given {@link java.io.InputStream}. * * @param is input stream with the route(s) definition to add - * @throws Exception if the route definitions could not be loaded for whatever reason * @return the route definitions + * @throws Exception if the route definitions could not be loaded for whatever reason */ RoutesDefinition loadRoutesDefinition(InputStream is) throws Exception; @@ -92,7 +91,9 @@ public interface ModelCamelContext exten * * @param route the route to start * @throws Exception is thrown if the route could not be started for whatever reason + * @deprecated favor using {@link CamelContext#startRoute(String)} */ + @Deprecated void startRoute(RouteDefinition route) throws Exception; /** @@ -100,7 +101,9 @@ public interface ModelCamelContext exten * * @param route the route to stop * @throws Exception is thrown if the route could not be stopped for whatever reason + * @deprecated favor using {@link CamelContext#stopRoute(String)} */ + @Deprecated void stopRoute(RouteDefinition route) throws Exception; /** @@ -117,4 +120,12 @@ public interface ModelCamelContext exten */ Map<String, DataFormatDefinition> getDataFormats(); + /** + * Resolve a data format definition given its name + * + * @param name the data format definition name or a reference to it in the {@link org.apache.camel.spi.Registry} + * @return the resolved data format definition, or <tt>null</tt> if not found + */ + DataFormatDefinition resolveDataFormatDefinition(String name); + } Propchange: camel/branches/camel-2.9.x/components/camel-solr/ ------------------------------------------------------------------------------ Merged /camel/trunk/components/camel-solr:r1305475