コード例 #1
0
ファイル: ZopeExplorer.py プロジェクト: aricsanders/boa
 def OnBreakInto(self, event):
     for node in self.getNodesForSelection(self.list.getMultiSelection()):
         props = node.properties
         zc = ZopeConnection()
         zc.connect(props['host'], props['httpport'], props['username'],
                    props['passwd'])
         start_new_thread(self.breakpointInBackground, (zc, ))
コード例 #2
0
 def OnBreakInto(self, event):
     for node in self.getNodesForSelection(self.list.getMultiSelection()):
         props = node.properties
         zc = ZopeConnection()
         zc.connect(props['host'], props['httpport'],
                    props['username'], props['passwd'])
         start_new_thread(self.breakpointInBackground, (zc,))
コード例 #3
0
class ZopeEClip(ExplorerNodes.ExplorerClipboard):
    def __init__(self, globClip, props):
        ExplorerNodes.ExplorerClipboard.__init__(self, globClip)
        self.clipRef = ''

        self.props = props
        self.zc = ZopeConnection()
        self.zc.connect(props['host'], props['httpport'],
                        props['username'], props['passwd'])
    def callAndSetRef(self, objpath, method, nodes):
        names = [n.name for n in nodes]
        mime, res = self.zc.call(objpath, method, ids = names)
        self.clipRef = mime.get('Set-Cookie').split('"')[1]
    def clipCut(self, node, nodes):
        ExplorerNodes.ExplorerClipboard.clipCut(self, node, nodes)
        self.callAndSetRef(node.resourcepath, 'manage_cutObjects', nodes)
    def clipCopy(self, node, nodes):
        ExplorerNodes.ExplorerClipboard.clipCopy(self, node, nodes)
        self.callAndSetRef(node.resourcepath, 'manage_copyObjects', nodes)
#    def clipPaste(self, node):
#        ExplorerNodes.ExplorerClipboard.clipPaste(self, node)

    def clipPaste_ZopeEClip(self, node, nodes, mode):
        mime, res = self.zc.call(node.resourcepath,
              'manage_pasteObjects', cb_copy_data = self.clipRef)

    def clipPaste_FileSysExpClipboard(self, node, nodes, mode):
        for file in nodes:
            if file.isDir():
                node.newFolder(file.name)
                folderNode = node.createChildNode('Folder', file.name)
                self.clipPaste_FileSysExpClipboard(folderNode,
                                                   file.openList(), mode)
            else:
                node.uploadFromFS(file)
コード例 #4
0
ファイル: ZopeExplorer.py プロジェクト: aricsanders/boa
    def __init__(self, globClip, props):
        ExplorerNodes.ExplorerClipboard.__init__(self, globClip)
        self.clipRef = ''

        self.props = props
        self.zc = ZopeConnection()
        self.zc.connect(props['host'], props['httpport'], props['username'],
                        props['passwd'])
コード例 #5
0
    def __init__(self, globClip, props):
        ExplorerNodes.ExplorerClipboard.__init__(self, globClip)
        self.clipRef = ''

        self.props = props
        self.zc = ZopeConnection()
        self.zc.connect(props['host'], props['httpport'],
                        props['username'], props['passwd'])
コード例 #6
0
ファイル: ZopeExplorer.py プロジェクト: aricsanders/boa
class ZopeEClip(ExplorerNodes.ExplorerClipboard):
    def __init__(self, globClip, props):
        ExplorerNodes.ExplorerClipboard.__init__(self, globClip)
        self.clipRef = ''

        self.props = props
        self.zc = ZopeConnection()
        self.zc.connect(props['host'], props['httpport'], props['username'],
                        props['passwd'])

    def callAndSetRef(self, objpath, method, nodes):
        names = [n.name for n in nodes]
        mime, res = self.zc.call(objpath, method, ids=names)
        self.clipRef = mime.get('Set-Cookie').split('"')[1]

    def clipCut(self, node, nodes):
        ExplorerNodes.ExplorerClipboard.clipCut(self, node, nodes)
        self.callAndSetRef(node.resourcepath, 'manage_cutObjects', nodes)

    def clipCopy(self, node, nodes):
        ExplorerNodes.ExplorerClipboard.clipCopy(self, node, nodes)
        self.callAndSetRef(node.resourcepath, 'manage_copyObjects', nodes)


#    def clipPaste(self, node):
#        ExplorerNodes.ExplorerClipboard.clipPaste(self, node)

    def clipPaste_ZopeEClip(self, node, nodes, mode):
        mime, res = self.zc.call(node.resourcepath,
                                 'manage_pasteObjects',
                                 cb_copy_data=self.clipRef)

    def clipPaste_FileSysExpClipboard(self, node, nodes, mode):
        for file in nodes:
            if file.isDir():
                node.newFolder(file.name)
                folderNode = node.createChildNode('Folder', file.name)
                self.clipPaste_FileSysExpClipboard(folderNode, file.openList(),
                                                   mode)
            else:
                node.uploadFromFS(file)
コード例 #7
0
ファイル: ZopeExplorer.py プロジェクト: aricsanders/boa
 def callControlPanelMethod(self, props, meth):
     zc = ZopeConnection()
     zc.connect(props['host'], props['httpport'], props['username'],
                props['passwd'])
     zc.call('/Control_Panel', meth)
コード例 #8
0
 def callControlPanelMethod(self, props, meth):
     zc = ZopeConnection()
     zc.connect(props['host'], props['httpport'],
                props['username'], props['passwd'])
     zc.call('/Control_Panel', meth)