[Mpuls-commits] r851 - wasko/branches/2.0/waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 26 09:30:11 CET 2010


Author: torsten
Date: 2010-01-26 09:30:10 +0100 (Tue, 26 Jan 2010)
New Revision: 851

Removed:
   wasko/branches/2.0/waskaweb/model/view.py
Log:
Deleted. Not imported anywhere


Deleted: wasko/branches/2.0/waskaweb/model/view.py
===================================================================
--- wasko/branches/2.0/waskaweb/model/view.py	2010-01-25 18:14:50 UTC (rev 850)
+++ wasko/branches/2.0/waskaweb/model/view.py	2010-01-26 08:30:10 UTC (rev 851)
@@ -1,102 +0,0 @@
-# -*- coding: latin1 -*-
-#
-# Copyright 2007, 2008 Intevation GmbH, Germany, <info at intevation.de>
-# 
-# This file is part of mpuls WASKA (CoMPUter-based case fiLeS - 
-# Web-Anwendungs-Server fuer Kompetenzagenturen).
-# 
-# mpuls WASKA is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Affero General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-# 
-# mpuls WASKA is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
-# License for more details.
-# 
-# You should have received a copy of the GNU Affero General Public
-# License along with mpuls WASKA. If not, see <http://www.gnu.org/licenses/>.
-# 
-# mpuls WASKA has been developed on behalf of the 
-# Projekttraeger im Deutschen Zentrum fuer Luft- und Raumfahrt e.V. (PT-DLR)
-# within the programme Kompetenzagenturen (Durchfuehrungsphase) funded by
-# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and 
-# European Social Fund resources.
-#
-# Authors:
-# Sascha L. Teichmann <teichmann at intevation.de>
-#
-
-class CRUD:
-    
-    def create(self):
-        return None
-
-    def read(self, id):
-        pass
-
-    def update(self, view):
-        pass
-
-    def delete(self, view):
-        pass
-
-    def numberOfItems(self):
-        return 0
-
-    def idForIndex(self, idx):
-        return 0
-
-class Error:
-    def __init__(self, bad, msg = None):
-        self.bad = bad
-        if msg is None: self.messages = []
-        else:           self.messages = [ msg ]
-
-class View:
-
-    def __init__(self, id = None, name = None, crud = None):
-        self.id     = id
-        self.name   = name
-        self.crud   = crud
-        self.values = {}
-        self.errors = {}
-
-    def getName(self):
-        return self.name
-
-    def getId(self):
-        return self.id
-
-    def update(self):
-        self.crud.update(self)
-
-    def get(self, key):
-        return self.values.get(key, None)
-
-    def put(self, key, value):
-        self.values[key] = value
-
-    def getError(self, key):
-        try:
-            return ", ".self.errors[key].join(error.messages)
-        except KeyError:
-            return None
-
-    def numErrors(self):
-        return sum([len(e.messages) for e in self.errors.itervalues()])
-
-    def addError(self, key, bad, msg):
-        try:
-            self.errors[key].messages.append(msg)
-        except KeyError:
-            self.errors[key] = Error(bad, msg)
-
-    def clearError(self, key):
-        try:
-            del self.errors[key]
-        except KeyError:
-            pass
-
-# vim:set ts=4 sw=4 si et sta sts=4:



More information about the Mpuls-commits mailing list