def createRavenCategoryByName(self, zblogId, categoryName): category = ZCategory() bogQID = ZQualifiedPublisherId( zblogId) urn = u"%s,zoundry:blog:%s" % (bogQID.getLocalId(), bogQID.getServerId()) #$NON-NLS-1$ qid = ZQualifiedPublisherId(localId=urn, serverId=categoryName) category.setId( qid.getId() ) category.setName(categoryName) return category
def createRavenCategoryByName(self, zblogId, categoryName): category = ZCategory() bogQID = ZQualifiedPublisherId(zblogId) urn = u"%s,zoundry:blog:%s" % ( bogQID.getLocalId(), bogQID.getServerId()) #$NON-NLS-1$ qid = ZQualifiedPublisherId(localId=urn, serverId=categoryName) category.setId(qid.getId()) category.setName(categoryName) return category
def _createEntryQId(self, zblogId, serverEntryId): serverBlogId = self._getServerId(zblogId) urn = u"urn:zoundry:acc:%s,zoundry:blog:%s" % (self.getAccountId(), serverBlogId) #$NON-NLS-1$ qid = ZQualifiedPublisherId(localId = urn, serverId = serverEntryId) return qid.getId()
def _createBlogQId(self, serverBlogId): urn = u"urn:zoundry:acc:%s" % self.getAccountId() #$NON-NLS-1$ qid = ZQualifiedPublisherId(localId = urn, serverId = serverBlogId) return qid.getId()
def _getServerId(self, qualifiedId): # returns the serverId part given qid "{localIdNS}serverId" qid = ZQualifiedPublisherId(qualifiedId) return qid.getServerId()
def _createEntryQId(self, zblogId, serverEntryId): serverBlogId = self._getServerId(zblogId) urn = u"urn:zoundry:acc:%s,zoundry:blog:%s" % ( self.getAccountId(), serverBlogId) #$NON-NLS-1$ qid = ZQualifiedPublisherId(localId=urn, serverId=serverEntryId) return qid.getId()
def _createBlogQId(self, serverBlogId): urn = u"urn:zoundry:acc:%s" % self.getAccountId() #$NON-NLS-1$ qid = ZQualifiedPublisherId(localId=urn, serverId=serverBlogId) return qid.getId()