X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Flocalizer%2Fbasic%2FMirBasicChildArticlePostingHandler.java;h=311f1260a630fdd068f2278c1df38ef63ddab93f;hb=2d3a3231809a1af4e373c3fd13902eeee26728c9;hp=847fd8c6ca072e87b28ad34456338a033fd41425;hpb=8f6b79b5c682b53e4927d3bfd9934675e17809df;p=mir.git diff --git a/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java b/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java index 847fd8c6..311f1260 100755 --- a/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java +++ b/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java @@ -30,10 +30,16 @@ package mircoders.localizer.basic; -import mir.session.*; -import mircoders.entity.*; - +import mir.session.Request; +import mir.session.Session; +import mir.session.SessionExc; +import mir.session.SessionFailure; +import mircoders.entity.EntityContent; +/** + * Handler for open postings of "child articles", that is articles + * linked to other articles. Used frequently for translations. + */ public class MirBasicChildArticlePostingHandler extends MirBasicArticlePostingHandler { public MirBasicChildArticlePostingHandler() { super(); @@ -41,12 +47,25 @@ public class MirBasicChildArticlePostingHandler extends MirBasicArticlePostingHa setNormalResponseGenerator(configuration.getString("Localizer.OpenSession.article.EditTemplate")); } + /** + * {@inheritDoc} + * + *

+ * This class overrides this method to set the parent article. + */ public void finalizeArticle(Request aRequest, Session aSession, EntityContent anArticle) throws SessionExc, SessionFailure { super.finalizeArticle(aRequest, aSession, anArticle); - anArticle.setValueForProperty("to_content", (String) aSession.getAttribute("to_content")); + anArticle.setFieldValue("to_content", (String) aSession.getAttribute("to_content")); } + /** + * {@inheritDoc} + * + *

+ * Overridden by this class to retrieve and store the to be associated + * parent article for subsequent usage. + */ protected void initializeSession(Request aRequest, Session aSession) throws SessionExc, SessionFailure { super.initializeSession(aRequest, aSession); @@ -55,8 +74,5 @@ public class MirBasicChildArticlePostingHandler extends MirBasicArticlePostingHa throw new SessionExc("initializeSession: parent id not set!"); aSession.setAttribute("to_content", parentId); - }; - - - + } } \ No newline at end of file