1 package com
.interrupt
.bookkeeping
.users
;
3 import java
.util
.Iterator
;
5 import org
.apache
.log4j
.Logger
;
7 import com
.interrupt
.bob
.base
.IBob
;
8 import com
.interrupt
.bookkeeping
.system
.BookkeepingSystemProperties
;
9 import com
.interrupt
.spittoon
.Spittoon
;
11 public class Groups
extends GGroups
{
14 private Logger logger
= Logger
.getLogger(Groups
.class);
15 private Spittoon spittoon
= null;
17 //spittoon = Spittoon.instance();
26 private String baseDir
= null;
27 private String groupsDir
= "system/groups/";
28 private BookkeepingSystemProperties bsprops
= null;
29 private Spittoon spittoon
= null;
31 public SavePersistor() {
32 bsprops
= BookkeepingSystemProperties
.instance();
34 public void setSpittoon(Spittoon spit
) {
37 public Spittoon
getSpittoon() {
40 public void setBaseDir(String bdir
) {
43 public String
getBaseDir() {
46 /*public void visit(IBob persistable) {
48 if(persistable instanceof IGroups && ((IGroups)persistable).getId().equals("main.groups")) {
50 Iterator groupIter = ((IGroups)persistable).allGroup().iterator();
51 IGroup eachGroup = null;
52 while(groupIter.hasNext()) {
54 eachGroup = (IGroup)groupIter.next();
56 //** save to system/groups/
57 spittoon.updateDocument(
58 BookkeepingSystemProperties.instance().getProperty("db.url") + "system/groups/" + eachGroup.getId(),
59 eachGroup.getTagName(),
60 eachGroup.getAttributes().getValue("id"),