'Create a property object for an attribute using self.get and self.set.
:param state_attribute: A string with the name of the attribute on
job that contains the job_state instance.
:param property_attribute: A string with the name of the attribute
this property is exposed as.
:param default: A default value that should be used for this property
if it is not set.
:param namespace: The namespace to store the attribute value in.
:returns: A read-write property object that performs self.get calls
to read the value and self.set calls to set it.'

@staticmethod
def property_factory(state_attribute, property_attribute, default, namespace='global_properties'):

    def getter(job):
        state = getattr(job, state_attribute)
        return state.get(namespace, property_attribute, default)
    def setter(job, value):
        state = getattr(job, state_attribute)
        state.set(namespace, property_attribute, value)
    return property(getter, setter)
