# -*- coding: utf-8 -*-
# $Id: QueueItem.py 1616 2012-07-31 13:56:08Z amelung $
#
# Copyright (c) 2007-2011 Otto-von-Guericke-Universität Magdeburg
#
# This file is part of ECSpooler.
class QueueItem:
"""
An class which represents items for a queue.
"""
"""
Creates a new QueueItem object with the given data. If oid is None we
will create a new unique oid using time.
@param: data a dictionary including job data, e.g. backend and students' solution
@param: oid a unique ID; if not set, a unique ID will be created
"""
# if oid is None...
if not oid:
# ...use oid in data if available
# ...or create a new unique oid
else:
"""
"""
"""
Replaces the complete data with new ones.
"""
# add oid to the data dictionary because it will be used later
# valide the inputs; an exception can be thrown
"""
Returns the transport data structure which can be transmitted via XMLRPC.
"""
#return self._data.copy()
"""
Validates the data. Will be called from setData. Overwrite this
method in subclasses if needed.
"""
return True
"""
Returns True if a value for the given key exists.
"""
"""
Returns the value for the given key.
"""
"""
Sets a value for the given key.
"""
# -- test section -------------------------------------------------------------
#if __name__ == "__main__":
# """
# """
# oid = uuid.uuid1()
# print oid