def subClassRun(self, paramDict):
        ###############################################
        #Scan for existing files
        ###############################################
        collection = self.objDb.getCollection(self.targetCollectionId)
        cl('start scanning')
        for i in os.walk(self.rootFolder):
            #cl(i)
            for j in i[2]:
                if (self.addedItemCnt % 1000) == 0:
                    cl("processing item cnt:", self.addedItemCnt)
                self.addedItemCnt += 1

                fullPath = transform.transformDirToInternal(os.path.join(i[0], j))
                #print '---------------------real adding item'
                #Update the item info for the item
                ncl('before fs obj base')
                itemUrl = objectDatabase.fsObjBase(fullPath).getObjUrl()
                ncl('before get fs obj')
                newObjUuid = self.objDb.getFsObjUuid(itemUrl)
                if newObjUuid is None:
                    cl("item deleted, do not add it")
                    continue
                ncl('before update obj uuid')
                '''
                collection.updateObjUuidIfNeeded(itemUrl, newObjUuid)
                '''
                if collection.isSame(itemUrl, newObjUuid):
                    ncl("no updates needed", itemUrl, newObjUuid)
                    continue
                collection.updateObjUuidRaw(itemUrl, newObjUuid)
                ncl('new item added', itemUrl)
                
        cl("notifying listener")
        self.notifyAll()
 def getObjUrl(self, idInCol):
     fullPath = transform.transformDirToInternal(os.path.join(self.rootDir, idInCol))
     objUrl = objectDatabase.fsObjBase(fullPath).getObjUrl()
     return objUrl