# -*- coding: utf-8 -*-
# $Id: BackendResult.py 1603 2011-10-10 12:33:02Z amelung $
#
# Copyright (c) 2007-2011 Otto-von-Guericke-Universität Magdeburg
#
# This file is part of ECSpooler.
# TODO: rename to TestResult
"""
Represents values returned from a backend. Each result has an ID which is
given from the original job.
Required keys:
or 0..100 to indicate percentage/scores (e.g., Keywords backends)
or negative integer to indicate exceptions or errors
- message: detailed information generated by the backend
"""
"""
"""
"""
Tests if all required keys are given.
@see: QueueItem.validate
@return: True, if everything is ok, otherwise an assertion
"""
"BackendResult requires a valid 'value' entry"
"BackendResult requires a valid 'message' entry"
return True
"""
@param: value: new value string
"""
"""
@return: result value or UNDEFINED if it is not set.
"""
"""
@param: msg: new message string
"""
"""
@return: esult message or '' if it is not set.
"""
"""
Returns wether or not a job failed
"""
else:
return False
# -- main ---------------------------------------------------------------------
if __name__ == "__main__":
print r1
#print r1.getValue()
#print r1.getMessage()
#print r1.hasFailed()
# r2 = BackendResult(-100, "Internal error")
# print r2.hasFailed()
#
# r3 = BackendResult(-42, "xxx")
# print r3.hasFailed()