You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2008/11/24 20:30:40 UTC
svn commit: r720270 -
/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/OptionalIdentifiedType.java
Author: davsclaus
Date: Mon Nov 24 11:30:39 2008
New Revision: 720270
URL: http://svn.apache.org/viewvc?rev=720270&view=rev
Log:
CAMEL-1087: Polished javadoc and marked methods for @deprecation
Modified:
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/OptionalIdentifiedType.java
Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/OptionalIdentifiedType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/OptionalIdentifiedType.java?rev=720270&r1=720269&r2=720270&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/OptionalIdentifiedType.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/OptionalIdentifiedType.java Mon Nov 24 11:30:39 2008
@@ -81,6 +81,41 @@
// Fluent API
// -------------------------------------------------------------------------
+
+ /**
+ * Sets the description of this node
+ *
+ * @param id sets the id, use null to not set an id
+ * @param text sets the text description, use null to not set a text
+ * @param lang sets the language for the description, use null to not set a language
+ * @return the builder
+ */
+ public T describe(String id, String text, String lang) {
+ if (id != null) {
+ setId(id);
+ }
+ if (text != null) {
+ if (description == null) {
+ description = new Description();
+ }
+ description.setText(text);
+ }
+ if (lang != null) {
+ if (description == null) {
+ description = new Description();
+ }
+ description.setLang(lang);
+ }
+ return (T) this;
+ }
+
+ /**
+ * Sets the description of this node
+ *
+ * @param text the description
+ * @return the builder
+ * @deprecated will be removed in Camel 2.0
+ */
public T description(String text) {
if (description == null) {
description = new Description();
@@ -89,12 +124,27 @@
return (T) this;
}
+ /**
+ * Sets the description of this node
+ *
+ * @param text the description
+ * @param lang the language for the description
+ * @return the builder
+ * @deprecated will be removed in Camel 2.0
+ */
public T description(String text, String lang) {
description(text);
description.setLang(lang);
return (T) this;
}
+ /**
+ * Sets the id of this node
+ *
+ * @param id the id
+ * @return the builder
+ * @deprecated will be removed in Camel 2.0
+ */
public T id(String id) {
setId(id);
return (T) this;