# Path: lib/registry.py
# class Registry(dict):
#     def set(self, key, value):
#         self[key] = value
#     def get(self, key):
#         if self.has_key(key):
#             return self[key]
#         else:
#             return False


from lib.registry import Registry
        import logging

class AbstractSession(dict):

    namespace = 'undefined'

    def __init__(self):

        if self.namespace == 'undefined':
            raise AttributeError('namespace attribute is not defined in subclass')

        session = Registry().get('session')

        if self.namespace not in session:
            session[self.namespace] = self
        else:
            self.update(session[self.namespace])
            session[self.namespace] = self

    def set(self, key, value):
        self[key] = value

    def getSessId(self):
        return Registry().get('session').id

    def clear(self):

# Path: lib/registry.py
# class Registry(dict):
#     def set(self, key, value):
#         self[key] = value
#     def get(self, key):
#         if self.has_key(key):
#             return self[key]
#         else:
#             return False


# Path: modules/core/model/session/abstract.py
from lib.registry import Registry
        import logging


class AbstractSession(dict):

    namespace = 'undefined'

    def __init__(self):

        if self.namespace == 'undefined':
            raise AttributeError('namespace attribute is not defined in subclass')

        session = Registry().get('session')

        if self.namespace not in session:
            session[self.namespace] = self
        else:
            self.update(session[self.namespace])
            session[self.namespace] = self

    def set(self, key, value):
        self[key] = value

    def getSessId(self):
        return Registry().get('session').id

    def clear(self):

        sess = Registry().get('session')