X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Fmodule%2FModuleContent.java;h=e3cb48f1a9f1ece4338aadc8dc1e5189d256235f;hb=cd3cb65d029bc2a38497f56b0544d01aa94065c6;hp=9cff5b0f1abc2e478702fdcf201c76fce488be8c;hpb=97a33333e6920e0b2578e506475f04c6d1d45a38;p=mir.git diff --git a/source/mircoders/module/ModuleContent.java b/source/mircoders/module/ModuleContent.java index 9cff5b0f..e3cb48f1 100755 --- a/source/mircoders/module/ModuleContent.java +++ b/source/mircoders/module/ModuleContent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001, 2002 The Mir-coders group + * Copyright (C) 2001, 2002 The Mir-coders group * * This file is part of Mir. * @@ -18,43 +18,33 @@ * 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 the com.oreilly.servlet library, 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. + * 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.module; -import java.io.*; -import java.util.*; -import java.sql.*; +import mir.entity.EntityList; +import mir.log.LoggerWrapper; +import mir.module.AbstractModule; +import mir.module.ModuleExc; +import mir.module.ModuleFailure; +import mir.storage.StorageObject; -import javax.servlet.*; -import javax.servlet.http.*; - -import mir.servlet.*; -import mir.module.*; -import mir.entity.*; -import mir.misc.*; -import mir.storage.*; -import mir.log.*; - -import mircoders.entity.*; -import mircoders.storage.*; - -/* - * ContentObjekt - - * - * @version $Id: ModuleContent.java,v 1.11 2002/11/29 13:43:42 zapata Exp $ - * - * @author RK, mir-coders +/** * + *

Title: ModuleContent

+ *

Description: helper routines to manage articles

+ *

Copyright: Copyright (c) 2003

+ *

Company:

+ * @author not attributable + * @version 1.0 */ public class ModuleContent extends AbstractModule @@ -69,163 +59,13 @@ public class ModuleContent extends AbstractModule this.theStorage = theStorage; } -// -// various methods to retrieve content entities - - public EntityList getFeatures(int offset, int limit) throws ModuleException - { - return getContent("is_published=true AND to_article_type=2", "webdb_create desc", - offset, limit); - } - - public EntityList getNewsWire(int offset, int limit) throws ModuleException - { - return getContent("is_published=true AND to_article_type = 1", - "webdb_create desc",offset,limit); - } - - public EntityList getStartArticle() throws ModuleException - { - EntityList returnList = getContent("is_published=true AND to_article_type=4", - "webdb_create desc",0,1); -//if no startspecial exists - if (returnList==null || returnList.size()==0) - returnList = getContent("is_published=true AND to_article_type=3", - "webdb_create desc",0,1); - - return returnList; - } - - public EntityList getContent(HashMap searchValues, boolean concat, int offset, EntityUsers user) - throws ModuleException { - - try { - - String whereClause ="", aField, aValue; - boolean first = true; - - Set set = searchValues.keySet(); - Iterator it = set.iterator(); - for (int i=0;i