Example #1
0
 def __call__(self, args):
     super(ThreadMembersDeleteCommand, self).__call__(args)
     act = DeleteAction(
         mode=self.CFG_DELETE_MODE,
         parent_identifier=self.CFG_DELETE_ARG_ATTR
     )
     act.init(args, self.ls, self.ls.thread_members)
     return act.delete(args.uuids)
Example #2
0
 def __call__(self, args):
     super(WgNodeContentListCommand, self).__call__(args)
     endpoint = self.ls.workgroup_nodes
     parent = None
     if args.folders:
         parent = get_uuid_from(args.folders[-1])
     tbu = TableBuilder(self.ls, endpoint, self.IDENTIFIER)
     tbu.load_args(args)
     tbu.add_custom_cell("lastAuthor",
                         ComplexCellBuilder('{name} <{mail}>'))
     tbu.add_action(
         'download',
         DownloadAction(mode=self.CFG_DOWNLOAD_MODE,
                        parent_identifier=self.CFG_DOWNLOAD_ARG_ATTR))
     tbu.add_action(
         'delete',
         DeleteAction(mode=self.CFG_DELETE_MODE,
                      parent_identifier=self.CFG_DELETE_ARG_ATTR))
     tbu.add_filters(PartialOr(self.IDENTIFIER, args.names, True),
                     PartialDate("creationDate", args.cdate))
     json_obj = endpoint.list(args.wg_uuid,
                              parent,
                              flat=args.flat_mode,
                              node_types=args.node_types)
     tbu.add_pre_render_class(Breadcrumb())
     return tbu.build().load_v2(json_obj).render()
 def __call__(self, args):
     super(ListCommand, self).__call__(args)
     endpoint = self.ls.shared_spaces.members
     tbu = TableBuilder(self.ls, endpoint, self.IDENTIFIER)
     tbu.load_args(args)
     tbu.add_custom_cell(
         "role",
         ComplexCellBuilder(
             '{name}\n({uuid:.8})',
             '{name} ({uuid:})',
             '{name}',
         ))
     tbu.add_custom_cell(
         "account",
         ComplexCellBuilder('{name}\n({uuid:.8})',
                            '{name} <{mail}> ({uuid})'))
     tbu.add_custom_cell(
         "node", ComplexCellBuilder('{nodeType}: {name} ({uuid:.8})'))
     tbu.add_action(
         'delete',
         DeleteAction(mode=self.CFG_DELETE_MODE,
                      parent_identifier=self.CFG_DELETE_ARG_ATTR))
     tbu.add_filters(PartialOr(self.IDENTIFIER, args.names, True),
                     PartialOr(self.RESOURCE_IDENTIFIER, args.uuids, True),
                     PartialOr("role", args.roles, True, match_raw=False))
     return tbu.build().load_v2(endpoint.list(args.ss_uuid)).render()
Example #4
0
 def __call__(self, args):
     super(ListCommand, self).__call__(args)
     endpoint = self.ls.contactslistscontacts
     tbu = TableBuilder(self.ls, endpoint, self.IDENTIFIER)
     tbu.load_args(args)
     tbu.add_action(
         'delete',
         DeleteAction(mode=self.CFG_DELETE_MODE,
                      parent_identifier=self.CFG_DELETE_ARG_ATTR))
     tbu.add_filters(PartialOr(self.IDENTIFIER, args.pattern, True))
     json_obj = endpoint.list(args.mailing_list_uuid)
     return tbu.build().load_v2(json_obj).render()
Example #5
0
 def __call__(self, args):
     super(JwtDeleteCommand, self).__call__(args)
     act = DeleteAction()
     act.init(args, self.ls, self.ls.jwt)
     return act.delete(args.uuids)
Example #6
0
 def __call__(self, args):
     super(WorkgroupDocumentsDeleteCommand, self).__call__(args)
     act = DeleteAction(mode=self.CFG_DELETE_MODE,
                        parent_identifier=self.CFG_DELETE_ARG_ATTR)
     act.init(args, self.ls, self.ls.workgroup_nodes)
     return act.delete(args.uuids)
Example #7
0
 def __call__(self, args):
     super(DeleteCommand, self).__call__(args)
     act = DeleteAction()
     act.init(args, self.ls, self.ls.shared_spaces)
     return act.delete(args.uuids)
Example #8
0
 def __call__(self, args):
     super(DocumentsDeleteCommand, self).__call__(args)
     act = DeleteAction()
     act.init(args, self.ls, self.ls.documents)
     return act.delete(args.uuids)
Example #9
0
 def __call__(self, args):
     super(DeleteCommand, self).__call__(args)
     act = DeleteAction(mode=self.CFG_DELETE_MODE,
                        parent_identifier=self.CFG_DELETE_ARG_ATTR)
     act.init(args, self.ls, self.ls.contactslistscontacts)
     return act.delete(args.uuids)
Example #10
0
 def __call__(self, args):
     super(ReceivedSharesDeleteCommand, self).__call__(args)
     act = DeleteAction()
     act.init(args, self.ls, self.ls.rshares)
     return act.delete(args.uuids)
Example #11
0
 def __call__(self, args):
     super(GuestsDeleteCommand, self).__call__(args)
     act = DeleteAction(identifier="mail")
     act.init(args, self.ls, self.ls.guests)
     return act.delete(args.uuids)
Example #12
0
 def __call__(self, args):
     super(DeleteCommand, self).__call__(args)
     act = DeleteAction()
     act.init(args, self.ls, self.ls.contactslists)
     return act.delete(args.uuids)