Shrink down the exposed methods.
The catalog really only cares right now about getting or creating a logbook for a given job, lets keep the api simple to just do that until further notice.
This commit is contained in:
		| @@ -24,19 +24,14 @@ class Catalog(object): | ||||
|  | ||||
|     __metaclass__ = abc.ABCMeta | ||||
|  | ||||
|     @abc.abstractmethod | ||||
|     def fetch(self, job): | ||||
|         """Fetches a logbook for a job.""" | ||||
|         raise NotImplementedError() | ||||
|  | ||||
|     @abc.abstractmethod | ||||
|     def __contains__(self, job): | ||||
|         """Checks if the given catalog has a logbook for a job.""" | ||||
|         raise NotImplementedError() | ||||
|  | ||||
|     @abc.abstractmethod | ||||
|     def create(self, job): | ||||
|         """Creates a new logbook for a job.""" | ||||
|     def create_or_fetch(self, job): | ||||
|         """Creates a new logbook for a job or gives back an old one.""" | ||||
|         raise NotImplementedError() | ||||
|  | ||||
|     @abc.abstractmethod | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Joshua Harlow
					Joshua Harlow