Example #1
0
 def __init__(self, transmogrifier, name, options, previous):
     self.previous = previous
     self.context = transmogrifier.context
     if "path-key" in options:
         pathkeys = options["path-key"].splitlines()
     else:
         pathkeys = defaultKeys(options["blueprint"], name, "parent_path")
     self.pathkey = Matcher(*pathkeys)
     if "comment-type-key" in options:
         comment_type_keys = options["comment-type-key"].splitlines()
     else:
         comment_type_keys = defaultKeys(options["blueprint"], name,
                                         "comment_type")
     self.comment_type_key = Matcher(*comment_type_keys)
     self.date_format = options.get("date-format", "%Y/%m/%d %H:%M:%S")
Example #2
0
    def __init__(self, transmogrifier, name, options, previous):
        # read additional config in cfg file, and apply to default
        self.debug_infos = {}

        self.transmogrifier = transmogrifier
        self.name = name
        self.options = options
        self.previous = previous
        self.context = transmogrifier.context

        if "path-key" in options:
            pathkeys = options["path-key"].splitlines()
        else:
            pathkeys = defaultKeys(options["blueprint"], name, "path")
        self.pathkey = Matcher(*pathkeys)

        self.typekey = defaultMatcher(options, "type-key", name, "type",
                                      ("portal_type", "Type"))

        if options.get("exclude-type", None):
            self.exclude_type = ast.literal_eval(
                options.get("exclude-type", None))

        annotations = IAnnotations(self.context.REQUEST)
        self.items_in = annotations.setdefault(ITEMS_IN, {})
    def __init__(self, transmogrifier, name, options, previous):
        self.transmogrifier = transmogrifier
        self.name = name
        self.options = options
        self.previous = previous
        self.context = transmogrifier.context

        if "path-key" in options:
            pathkeys = options["path-key"].splitlines()
        else:
            pathkeys = defaultKeys(options["blueprint"], name, "path")
        self.pathkey = Matcher(*pathkeys)

        if "local-roles-key" in options:
            roleskeys = options["local-roles-key"].splitlines()
        else:
            roleskeys = defaultKeys(options["blueprint"], name, "local_roles")
        self.roleskey = Matcher(*roleskeys)
    def __init__(self, transmogrifier, name, options, previous):
        self.transmogrifier = transmogrifier
        self.name = name
        self.options = options
        self.previous = previous
        self.context = transmogrifier.context
        self.memtool = getToolByName(self.context, "portal_membership")

        if "path-key" in options:
            pathkeys = options["path-key"].splitlines()
        else:
            pathkeys = defaultKeys(options["blueprint"], name, "path")
        self.pathkey = Matcher(*pathkeys)

        if "owner-key" in options:
            ownerkeys = options["owner-key"].splitlines()
        else:
            ownerkeys = defaultKeys(options["blueprint"], name, "owner")
        self.ownerkey = Matcher(*ownerkeys)
Example #5
0
    def __init__(self, transmogrifier, name, options, previous):
        self.transmogrifier = transmogrifier
        self.name = name
        self.options = options
        self.previous = previous
        self.context = transmogrifier.context
        self.wftool = api.portal.get_tool(name="portal_workflow")

        if "path-key" in options:
            pathkeys = options["path-key"].splitlines()
        else:
            pathkeys = defaultKeys(options["blueprint"], name, "path")
        self.pathkey = Matcher(*pathkeys)

        if "workflowhistory-key" in options:
            workflowhistorykeys = options["workflowhistory-key"].splitlines()
        else:
            workflowhistorykeys = defaultKeys(options["blueprint"], name,
                                              "workflow_history")
        self.workflowhistorykey = Matcher(*workflowhistorykeys)