|
From: <ko...@us...> - 2004-03-01 07:27:44
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/category In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1451/src/org/cobricks/category Modified Files: Category.java CategoryManagerImpl.java Log Message: Index: Category.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/category/Category.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Category.java 12 Feb 2004 06:25:26 -0000 1.2 --- Category.java 1 Mar 2004 07:09:03 -0000 1.3 *************** *** 93,107 **** public int getObjectType() { ! return 0; } public String getObjectClass() { ! return "category"; } public String getObjectUri() { ! return null; } --- 93,107 ---- public int getObjectType() { ! return 0; } public String getObjectClass() { ! return "category"; } public String getObjectUri() { ! return null; } *************** *** 109,123 **** public int getCategoryId() { ! return catid; } public int getId() { ! return catid; } protected void setCategoryId(int catid) { ! this.catid = catid; } --- 109,123 ---- public int getCategoryId() { ! return catid; } public int getId() { ! return catid; } protected void setCategoryId(int catid) { ! this.catid = catid; } *************** *** 132,136 **** return getTitle(defaultLanguage); } ! public String getTitle(String lang) { --- 132,136 ---- return getTitle(defaultLanguage); } ! public String getTitle(String lang) { *************** *** 151,155 **** setAttribute("title_"+lang, title); } ! public void setTitles(Map m) { --- 151,155 ---- setAttribute("title_"+lang, title); } ! public void setTitles(Map m) { *************** *** 160,164 **** } } ! public String getCategoryClass() --- 160,164 ---- } } ! public String getCategoryClass() Index: CategoryManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/category/CategoryManagerImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CategoryManagerImpl.java 16 Feb 2004 15:01:24 -0000 1.3 --- CategoryManagerImpl.java 1 Mar 2004 07:09:03 -0000 1.4 *************** *** 309,314 **** String globalid = uuid.getNewUuidAsString(); attrs.put("globalid", globalid); ! attrs.put("creatorid", new Integer(creator.getUserId())); ! attrs.put("updaterid", new Integer(creator.getUserId())); attrs.put("creationtime", new Date()); attrs.put("updatetime", new Date()); --- 309,320 ---- String globalid = uuid.getNewUuidAsString(); attrs.put("globalid", globalid); ! if (creator!=null) ! attrs.put("creatorid", new Integer(creator.getUserId())); ! else ! attrs.put("creatorid", new Integer(0)); ! if (creator!=null) ! attrs.put("updaterid", new Integer(creator.getUserId())); ! else ! attrs.put("updaterid", new Integer(0)); attrs.put("creationtime", new Date()); attrs.put("updatetime", new Date()); *************** *** 352,356 **** // additional attributes ! // tbd // set attributes in object --- 358,371 ---- // additional attributes ! i = attrsAttrs.keySet().iterator(); ! while (i.hasNext()) { ! String aname = (String)i.next(); ! Object avalue = attrsAttrs.get(aname); ! HashMap dbattrs = new HashMap(); ! dbattrs.put("catid",new Integer(catid)); ! dbattrs.put("aname", aname); ! dbattrs.put("avalue", avalue); ! dbAccess.sqlInsert("cat_attrs", dbattrs); ! } // set attributes in object *************** *** 365,369 **** new ComponentEventImpl("category", "category", "create"); event.setObjectId(catid); ! event.setUserId(creator.getId()); this.publishEvent(event); --- 380,387 ---- new ComponentEventImpl("category", "category", "create"); event.setObjectId(catid); ! if (creator!=null) ! event.setUserId(creator.getId()); ! else ! event.setUserId(0); this.publishEvent(event); |