Beispiel #1
0
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
Beispiel #2
0
 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
Beispiel #3
0
 def test_ObjectId(self):
     oid = self.testobj.getObjectId()
     self.assertTrue(oidIsValid(oid))
Beispiel #4
0
 def checkName(self, name, arg_object):
     """
     object name ok?
     """
     oidIsValid(name)
     NameChooser.checkName(self, name, arg_object)