KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > raptus > owxv3 > modules > base > BaseItemInfo


1 /*
2  * eAdmin/OWX
3  * Copyright (C) 1996-2003 OWX-Project Team <owx-team@gmx.net>
4  */

5
6 package com.raptus.owxv3.modules.base;
7
8 import com.raptus.owxv3.api.*;
9 import com.raptus.owxv3.*;
10 import java.util.Locale JavaDoc;
11
12 public class BaseItemInfo extends Object JavaDoc implements ItemInfoIFace
13 {
14     /**
15      * return the description of this item given by srcrowid, in given locale
16      * @param srcrowid - the item row id
17      * @param locale - the locale in which the description is requested.
18      */

19     public String JavaDoc itemInfo(int srcrowid, String JavaDoc owner, Locale JavaDoc l)
20     {
21         //LoggingManager.log("itemInfo("+srcrowid+","+owner+","+l.toString()+")");
22
VModuleManager vmm = VModuleManager.getInstance();
23         VModule newsm = vmm.getVModule(owner);
24         BaseObject news = new BaseObject(newsm, l);
25         XMLConfigManager cm=XMLConfigManager.getInstance();
26         String JavaDoc title=cm.getPropertyByTree("virtualhost/vmodules/vmodule?name="+newsm.getIdentification()+"/component-properties/component-property?for=fc_fields/property?name=titlefield","value");
27         if(title==null) title="title";
28         PubBaseEntry entry = news.loadById(srcrowid);
29         String JavaDoc res="";
30         if(entry != null)
31         {
32             res = entry.getField(title,l);
33         }
34         if(res == null)
35         {
36             res = "";
37         }
38         res = res.trim();
39         //LoggingManager.log("<<<<<<<<<<<<<<<<itemInfo():Returning:'"+res+"'");
40
return res;
41     }
42 }
43
44
45
Popular Tags