X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Flocalizer%2Fbasic%2FMirBasicChildArticlePostingHandler.java;h=3525fcd3adbf02d18dc0bf42201731fce30e9694;hb=855ecf8acedb12afbab7a621b2e2c0cf45b2f98f;hp=4a2cee782fe733ac172058c9e47a6caa2e3f44cf;hpb=978ee2002d8552321b27ef0a234807f1a46998d5;p=mir.git diff --git a/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java b/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java index 4a2cee78..3525fcd3 100755 --- a/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java +++ b/source/mircoders/localizer/basic/MirBasicChildArticlePostingHandler.java @@ -1,62 +1,62 @@ -/* - * Copyright (C) 2001, 2002 The Mir-coders group - * - * This file is part of Mir. - * - * Mir is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Mir is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Mir; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, The Mir-coders gives permission to link - * the code of this program with any library licensed under the Apache Software License, - * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library - * (or with modified versions of the above that use the same license as the above), - * and distribute linked combinations including the two. You must obey the - * GNU General Public License in all respects for all of the code used other than - * the above mentioned libraries. If you modify this file, you may extend this - * exception to your version of the file, but you are not obligated to do so. - * If you do not wish to do so, delete this exception statement from your version. - */ - -package mircoders.localizer.basic; - -import mir.session.Request; -import mir.session.Session; -import mir.session.SessionExc; -import mir.session.SessionFailure; -import mircoders.entity.EntityContent; - - -public class MirBasicChildArticlePostingHandler extends MirBasicArticlePostingHandler { - public MirBasicChildArticlePostingHandler() { - super(); - - setNormalResponseGenerator(configuration.getString("Localizer.OpenSession.article.EditTemplate")); - } - - 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")); - } - - protected void initializeSession(Request aRequest, Session aSession) throws SessionExc, SessionFailure { - super.initializeSession(aRequest, aSession); - - String parentId = aRequest.getParameter("to_content"); - if (parentId==null) - throw new SessionExc("initializeSession: parent id not set!"); - - aSession.setAttribute("to_content", parentId); - }; +/* + * Copyright (C) 2001, 2002 The Mir-coders group + * + * This file is part of Mir. + * + * Mir is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Mir is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Mir; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * In addition, as a special exception, The Mir-coders gives permission to link + * the code of this program with any library licensed under the Apache Software License, + * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library + * (or with modified versions of the above that use the same license as the above), + * and distribute linked combinations including the two. You must obey the + * GNU General Public License in all respects for all of the code used other than + * the above mentioned libraries. If you modify this file, you may extend this + * exception to your version of the file, but you are not obligated to do so. + * If you do not wish to do so, delete this exception statement from your version. + */ + +package mircoders.localizer.basic; + +import mir.session.Request; +import mir.session.Session; +import mir.session.SessionExc; +import mir.session.SessionFailure; +import mircoders.entity.EntityContent; + + +public class MirBasicChildArticlePostingHandler extends MirBasicArticlePostingHandler { + public MirBasicChildArticlePostingHandler() { + super(); + + setNormalResponseGenerator(configuration.getString("Localizer.OpenSession.article.EditTemplate")); + } + + 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")); + } + + protected void initializeSession(Request aRequest, Session aSession) throws SessionExc, SessionFailure { + super.initializeSession(aRequest, aSession); + + String parentId = aRequest.getParameter("to_content"); + if (parentId==null) + throw new SessionExc("initializeSession: parent id not set!"); + + aSession.setAttribute("to_content", parentId); + }; } \ No newline at end of file