コード例 #1
0
ファイル: deserializers.py プロジェクト: Tidosho/zoundryraven
    def _deserializeBlogInfo(self, blogInfoNode, document):
        blogInfo = ZBlogInfo()
        blogInfo.setAccountId(blogInfoNode.getAttribute(u"account-id")) #$NON-NLS-1$
        blogInfo.setBlogId(blogInfoNode.getAttribute(u"blog-id")) #$NON-NLS-1$

        self._deserializePublishInfo(blogInfoNode, blogInfo)
        self._deserializeCategories(blogInfoNode, blogInfo)

        document.addBlogInfo(blogInfo)
コード例 #2
0
    def _createRavenBlogInfo(self, zblog, serverEntry):
        # blog info
        zbloginfo = ZBlogInfo()
        zbloginfo.setAccountId(self.getAccountId())
        zbloginfo.setBlogId(zblog.getId())

        # published info
        zpubinfo = self._createRavenPubInfo(zblog, serverEntry)
        zbloginfo.setPublishInfo(zpubinfo)
        # build post entry categories
        for serverCategory in serverEntry.getCategories():
            # Convert server side category to Raven ZCategory.
            zcategory = self._createRavenCategory(zblog, serverCategory)
            zbloginfo.addCategory(zcategory)
        return zbloginfo
コード例 #3
0
ファイル: blogpublisher.py プロジェクト: Tidosho/zoundryraven
    def _createRavenBlogInfo(self, zblog, serverEntry):
        # blog info
        zbloginfo = ZBlogInfo()
        zbloginfo.setAccountId( self.getAccountId() )
        zbloginfo.setBlogId( zblog.getId() )

        # published info
        zpubinfo =  self._createRavenPubInfo(zblog, serverEntry)
        zbloginfo.setPublishInfo(zpubinfo)
        # build post entry categories
        for serverCategory in serverEntry.getCategories():
            # Convert server side category to Raven ZCategory.
            zcategory = self._createRavenCategory(zblog, serverCategory)
            zbloginfo.addCategory(zcategory)        
        return zbloginfo
コード例 #4
0
    def _deserializeBlogInfo(self, blogInfoNode, document):
        blogInfo = ZBlogInfo()
        blogInfo.setAccountId(
            blogInfoNode.getAttribute(u"account-id"))  #$NON-NLS-1$
        blogInfo.setBlogId(blogInfoNode.getAttribute(u"blog-id"))  #$NON-NLS-1$

        self._deserializePublishInfo(blogInfoNode, blogInfo)
        self._deserializeCategories(blogInfoNode, blogInfo)

        document.addBlogInfo(blogInfo)