Yes good idea, done.
On Thu, Nov 25, 2010 at 09:58, Vincent Massol <vincent(a)massol.net> wrote:
wold be good to move it to the existing aspect.
Thanks
-Vincent
On Nov 25, 2010, at 9:28 AM, tmortagne (SVN) wrote:
Author: tmortagne
Date: 2010-11-25 09:28:29 +0100 (Thu, 25 Nov 2010)
New Revision: 33131
Modified:
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/XWiki.java
Log:
XWIKI-5725: Deprecate XWiki#parseMessage
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
===================================================================
--- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java 2010-11-24
15:04:26 UTC (rev 33130)
+++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java 2010-11-25
08:28:29 UTC (rev 33131)
@@ -7001,6 +7001,11 @@
return doc.validate(context);
}
+ /**
+ * @deprecated use {@link XWikiMessageTool#get(String, List)} instead. You can
access message tool using
+ * {@link XWikiContext#getMessageTool()}.
+ */
+ @Deprecated
public String getMessage(String item, XWikiContext context)
{
XWikiMessageTool msg = context.getMessageTool();
@@ -7011,6 +7016,11 @@
}
}
+ /**
+ * @deprecated use {@link XWikiMessageTool#get(String, List)} instead. You can
access message tool using
+ * {@link XWikiContext#getMessageTool()}.
+ */
+ @Deprecated
public String parseMessage(String id, XWikiContext context)
{
XWikiMessageTool msg = context.getMessageTool();
@@ -7018,6 +7028,11 @@
return parseContent(msg.get(id), context);
}
+ /**
+ * @deprecated use {@link XWikiMessageTool#get(String, List)} instead. You can
access message tool using
+ * {@link XWikiContext#getMessageTool()}.
+ */
+ @Deprecated
public String parseMessage(XWikiContext context)
{
String message = (String) context.get("message");
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/XWiki.java
===================================================================
--- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/XWiki.java 2010-11-24
15:04:26 UTC (rev 33130)
+++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/XWiki.java 2010-11-25
08:28:29 UTC (rev 33131)
@@ -844,37 +844,46 @@
}
/**
- * API to parse the message being stored in the Context A message can be an error
message or an information message
- * either as text or as a message ID pointing to ApplicationResources The message is
also parse for velocity scripts
+ * API to parse the message being stored in the Context. A message can be an error
message or an information message
+ * either as text or as a message ID pointing to ApplicationResources. The message
is also parse for velocity scripts
*
* @return Final message
+ * @deprecated use {@link XWikiMessageTool#get(String, List)} instead. From velocity
you can access XWikiMessageTool
+ * with $msg binding.
*/
+ @Deprecated
public String parseMessage()
{
return this.xwiki.parseMessage(getXWikiContext());
}
/**
- * API to parse a message A message can be an error message or an information
message either as text or as a message
- * ID pointing to ApplicationResources The message is also parse for velocity
scripts
+ * API to parse a message. A message can be an error message or an information
message either as text or as a message
+ * ID pointing to ApplicationResources. The message is also parse for velocity
scripts
*
* @return Final message
* @param id
* @return the result of the parsed message
+ * @deprecated use {@link XWikiMessageTool#get(String, List)} instead. From velocity
you can access XWikiMessageTool
+ * with $msg binding.
*/
+ @Deprecated
public String parseMessage(String id)
{
return this.xwiki.parseMessage(id, getXWikiContext());
}
/**
- * API to get a message A message can be an error message or an information message
either as text or as a message
- * ID pointing to ApplicationResources The message is also parsed for velocity
scripts
+ * API to get a message. A message can be an error message or an information message
either as text or as a message
+ * ID pointing to ApplicationResources. The message is also parsed for velocity
scripts
*
* @return Final message
* @param id
* @return the result of the parsed message
+ * @deprecated use {@link XWikiMessageTool#get(String, List)} instead. From velocity
you can access XWikiMessageTool
+ * with $msg binding.
*/
+ @Deprecated
public String getMessage(String id)
{
return this.xwiki.getMessage(id, getXWikiContext());
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs