def isOidInCatalog(arg_oid): """can arg_oid be found in Catalog""" if oidIsValid(arg_oid): my_catalog = zapi.getUtility(ICatalog) if len(my_catalog.searchResults(oid_index=arg_oid)) > 0: return True return False
def setObjectId(self, arg_oid): """ set 'Universe ID' of object only for backup/restore functions """ if oidIsValid(arg_oid): ISuperclass['objectID'].readonly = False self.objectID = arg_oid ISuperclass['objectID'].readonly = True
def test_ObjectId(self): oid = self.testobj.getObjectId() self.assertTrue(oidIsValid(oid))
def checkName(self, name, arg_object): """ object name ok? """ oidIsValid(name) NameChooser.checkName(self, name, arg_object)