Esempio n. 1
0
    def data(self):
        """
        """

        if IAnnotationsJournalizable.providedBy(self.context):
            annotations = IAnnotations(self.context)
            return annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY, [])
        elif IWorkflowHistoryJournalizable.providedBy(self.context):
            raise NotImplemented
Esempio n. 2
0
    def validate_base_query(self, query):
        context = self.config.context
        if IAnnotationsJournalizable.providedBy(context):
            annotations = IAnnotations(context)
            data = annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY, [])
        elif IWorkflowHistoryJournalizable.providedBy(context):
            raise NotImplemented

        data = deepcopy(data)
        return data
Esempio n. 3
0
    def validate_base_query(self, query):
        context = self.config.context
        if IAnnotationsJournalizable.providedBy(context):
            annotations = IAnnotations(context)
            data = annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY, [])
        elif IWorkflowHistoryJournalizable.providedBy(context):
            raise NotImplemented

        data = deepcopy(data)
        return data
Esempio n. 4
0
    def data(self):
        """
        """
        context = self.context
        history = []

        if IAnnotationsJournalizable.providedBy(self.context):
            annotations = IAnnotations(context)
            return annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY, [])
        elif IWorkflowHistoryJournalizable.providedBy(self.context):
            raise NotImplemented
Esempio n. 5
0
    def validate_base_query(self, query):
        context = self.config.context
        if IAnnotationsJournalizable.providedBy(context):
            annotations = IAnnotations(context)
            data = annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY, [])
        elif IWorkflowHistoryJournalizable.providedBy(context):
            raise NotImplemented

        # XXX - a performance hack to replace deepcopy(data)
        # This only works as persistent objects are guaranteed to be picklable
        data = cPickle.loads(cPickle.dumps(data))
        return data
Esempio n. 6
0
    def validate_base_query(self, query):
        context = self.config.context
        if IAnnotationsJournalizable.providedBy(context):
            annotations = IAnnotations(context)
            data = annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY, [])
        elif IWorkflowHistoryJournalizable.providedBy(context):
            raise NotImplemented

        # XXX - a performance hack to replace deepcopy(data)
        # This only works as persistent objects are guaranteed to be picklable
        data = cPickle.loads(cPickle.dumps(data))
        return data