def register_schema(self, class_ref): Framework.oracle.register_type_dispatcher( class_ref.dataType, pyaff4.ProxiedAFFObject(class_ref))
def finish(self): self.__init__(self.urn, self.mode) ## NOTE: We must wrap the returned object with a ## ProxiedAFFObject so we continue to receive calls to it. return pyaff4.ProxiedAFFObject(self)
class _PyFlagGraph(pyaff4.Graph): dataType = pyaff4.AFF4_GRAPH def close(self): RESULT_VOLUME.update_tables(self.urn) pyaff4.Graph.close(self) def finish(self): self.__init__(self.urn, self.mode) ## NOTE: We must wrap the returned object with a ## ProxiedAFFObject so we continue to receive calls to it. return pyaff4.ProxiedAFFObject(self) oracle.register_type_dispatcher(pyaff4.AFF4_GRAPH, pyaff4.ProxiedAFFObject(_PyFlagGraph)) def _init_new_object(proxied, path, base='', navigatable=True, *args, **kwargs): """ A convenience function which automatically adds the new AFF4 object to the pyflag volumes. """ volume_urn_components = [ x for x in RESULT_VOLUME.volume_urn.value.split("/") if x ] proxied.urn.set(RESULT_VOLUME.volume_urn.value)