def getTempFilename(self): """ Returns a temporary file name bound to the session. @rtype: string """ return serverSettings.temp_folder + '/' + self.sessionid + '_' + \ misc.generateOID()
def getTempFilename(self): """ Returns a temporary file name bound to the session. @rtype: string """ return settings['global']['temp_folder'] + \ '/' + self.sessionid + '_' + \ misc.generateOID()
def clone(self): """ Creates an in-memory clone of the item. This is a shallow copy operation meaning that the item's references are not cloned. @return: the clone object @rtype: type """ oCopy = copy.deepcopy(self) oCopy._id = misc.generateOID() if self.isCollection: oCopy._subfolders = {} oCopy._items = {} return(oCopy)
def __init__(self, deletedItem): GenericItem.__init__(self) self.inheritRoles = True self._deletedId = deletedItem._id self.__image__ = deletedItem.__image__ self.displayName.value = misc.generateOID() self.description.value = deletedItem.description.value parents = deletedItem.getAllParents() sPath = '/' sPath += '/'.join([p.displayName.value for p in parents[:-1]]) self.originalLocation = sPath self.originalName = deletedItem.displayName.value
def __init__(self): # system props self._id = misc.generateOID() self._parentid = '' self._owner = '' self._isSystem = False self._isDeleted = False self._created = 0 self.modifiedBy = '' self.modified = 0 self.security = {} self.inheritRoles = True self.displayName = displayName() self.description = datatypes.String()
def __init__(self): self._id = misc.generateOID() self._containerid = None self._isDeleted = False self.displayName = displayName()
def __deepcopy__(self, memo): clone = copy.copy(self) clone._id = misc.generateOID() clone.value = self.getValue() return clone
def __init__(self): self._id = misc.generateOID() self._reset()
def __init__(self, **kwargs): self._id = misc.generateOID() self._reset()
def __init__(self): self._id = misc.generateOID() self._containerid = None self._isDeleted = False self.displayName = datatypes.RequiredString()