'Decorator for Storage Policy implementations to register
their ObjectController implementations.
This also fills in a policy_type attribute on the class.'

@classmethod
def register(cls, policy_type):

    def register_wrapper(controller_cls):
        if (policy_type in cls.policy_type_to_controller_map):
            raise PolicyError(('%r    is    already    registered    for    the    policy_type    %r' % (cls.policy_type_to_controller_map[policy_type], policy_type)))
        cls.policy_type_to_controller_map[policy_type] = controller_cls
        controller_cls.policy_type = policy_type
        return controller_cls
    return register_wrapper
