public void restrictAndUpdateInlineDataverseValue(Long id, List<VDCGroup> groups) {
   String dataversevalue;
   String itemid = null;
   Iterator iterator = groups.iterator();
   Long newTotal;
   long localTotal;
   NetworkStatsState networkStatsState;
   if (groups.isEmpty()) {
     for (int i = 0; i < searchItemBeans.length; i++) {
       NetworkStatsItemBean itembean = (NetworkStatsItemBean) searchItemBeans[i];
       if (itembean.getItemID().equals("item0")) { // decrement the top level -- item0;
         localTotal = new Long(itembean.getDataverseTotal());
         newTotal = localTotal - 1;
         networkStatsState = NetworkStatsState.getInstance();
         if (null != networkStatsState) {
           networkStatsState.fireNetworkStatsEvent(new ReleaseEvent("item0", newTotal.toString()));
           NetworkStatsState.getNetworkStatsMap().put("item0.dataverseTotal", newTotal.toString());
         }
       }
     }
   } else {
     while (iterator.hasNext()) {
       VDCGroup group = (VDCGroup) iterator.next();
       itemid = "item" + group.getId().toString();
       for (int i = 0; i < searchItemBeans.length; i++) {
         NetworkStatsItemBean itembean = (NetworkStatsItemBean) searchItemBeans[i];
         if (itembean.getItemID().equals("item0")) { // decrement the top level -- item0;
           localTotal = new Long(itembean.getDataverseTotal());
           newTotal = localTotal - 1;
           networkStatsState = NetworkStatsState.getInstance();
           if (null != networkStatsState) {
             networkStatsState.fireNetworkStatsEvent(
                 new ReleaseEvent("item0", newTotal.toString()));
             NetworkStatsState.getNetworkStatsMap()
                 .put("item0.dataverseTotal", newTotal.toString());
           }
         }
         if (itembean.getItemID().equals(itemid)) {
           localTotal = new Long(itembean.getDataverseTotal());
           newTotal = localTotal - 1;
           networkStatsState = NetworkStatsState.getInstance();
           if (null != networkStatsState) {
             networkStatsState.fireNetworkStatsEvent(
                 new ReleaseEvent(itemid, newTotal.toString()));
             NetworkStatsState.getNetworkStatsMap()
                 .put(itemid + ".dataverseTotal", newTotal.toString());
           }
         }
       }
     }
   }
 }
 public NetworkStatsBean() {
   NetworkStatsState.getInstance().addNetworkStatsListener(this);
   persistentState = PersistentFacesState.getInstance();
 }