Пример #1
0
	def __init__(self):
		Resource.__init__(self)
		if hasattr(self, 'DEF_PROPS'):
			self.__defaults = copy.copy(getattr(self, 'DEF_PROPS'))
		else:
			self.__defaults = {}
		self.__propertySet = J2EEResourcePropertySet(self)
Пример #2
0
 def __init__(self):
     Resource.__init__(self)
     if hasattr(self, 'DEF_PROPS'):
         self.__defaults = copy.copy(getattr(self, 'DEF_PROPS'))
     else:
         self.__defaults = {}
     self.__propertySet = J2EEResourcePropertySet(self)
Пример #3
0
    def __init__(self, name, parent=Cell()):
        Resource.__init__(self)
        self.name = Library.__NAMEPREFIX__ + str(name)
        self.parent = parent

        self.__classpath = []
        self.__nativepath = []
        self.__libraryRefs = []
Пример #4
0
 def __setattr__(self, name, value):
     if not hasattr(self, '__propertySet'):
         Resource.__setattr__(self, name, value)
     else:
         if self.__defaults.has_key(name):
             self.setProperty(name, value)
         else:
             Resource.__setattr__(self, name, value)
Пример #5
0
	def __setattr__(self, name, value):
		if not hasattr(self, '__propertySet'):
			Resource.__setattr__(self, name, value)
		else:
			if self.__defaults.has_key(name):
				self.setProperty(name, value)
			else:
				Resource.__setattr__(self, name, value)
Пример #6
0
	def __init__(self, name, parent = Cell()):
		Resource.__init__(self)
		self.name   = Library.__NAMEPREFIX__ + str(name)
		self.parent = parent
		
		self.__classpath   = []
		self.__nativepath  = []
		self.__libraryRefs = []
Пример #7
0
 def __loadattrs__(self, skip_attrs = []):
     Resource.__loadattrs__(self, skip_attrs)
     if not self.exists(): return
     for serverId in AdminConfig.list('Server', self.__was_cfg_path__).splitlines():
         server = None
         if isNodeAgentServer(serverId):
             server = NodeAgent(serverId, self)
         else:
             server = Node(serverId, self)
         self.__servers.append(server)
Пример #8
0
	def remove(self):
		for busMemberId in AdminConfig.showAttribute(self.__getconfigid__(), 'busMembers')[1:-1].splitlines():
			node   = AdminConfig.showAttribute(busMemberId, 'node')
			server = AdminConfig.showAttribute(busMemberId, 'server')
			# Remove associated DataSource 
			dsName = '_%s.%s-%s' % (node, server, self.bus)
			ds = DataSource(dsName)
			ds.remove()
		
		Resource.remove(self)
Пример #9
0
 def __loadattrs__(self, skip_attrs=[]):
     Resource.__loadattrs__(self, skip_attrs)
     if not self.exists(): return
     for serverId in AdminConfig.list('Server',
                                      self.__was_cfg_path__).splitlines():
         server = None
         if isNodeAgentServer(serverId):
             server = NodeAgent(serverId, self)
         else:
             server = Node(serverId, self)
         self.__servers.append(server)
Пример #10
0
	def __loadattrs__(self):
		Resource.__loadattrs__(self)
		if not self.exists(): return
		
		id = AdminConfig.showAttribute(self.__getconfigid__(), 'claims')
		if not id is None:
			self.claims = CommonSecureInterop(id, self)
			
		id = AdminConfig.showAttribute(self.__getconfigid__(), 'performs')
		if not id is None:
			self.performs = CommonSecureInterop(id, self)
Пример #11
0
	def __create__(self, update):
		if self.classPath is None:
			self.classPath = String(str(self.__classpath)[2:-2]).replaceAll("', '", ';')
		
		if self.nativePath is None:
			self.nativePath = String(str(self.__nativepath)[2:-2]).replaceAll("', '", ';')
		
		Resource.__create__(self, update)
		
		for libRef in self.__libraryRefs:
			libRef.__create__(update)
Пример #12
0
    def __create__(self, update):
        if self.classPath is None:
            self.classPath = String(str(self.__classpath)[2:-2]).replaceAll(
                "', '", ';')

        if self.nativePath is None:
            self.nativePath = String(str(self.__nativepath)[2:-2]).replaceAll(
                "', '", ';')

        Resource.__create__(self, update)

        for libRef in self.__libraryRefs:
            libRef.__create__(update)
Пример #13
0
	def __getattr__(self, name):
		if (name in Layer.DEF_CFG_ATTRS.keys()) and (self.__was_cfg_attrmap__[name] is None):
			obj = self.__getattrobj__(name)
			self.__was_cfg_attrmap__[name] = obj
			return obj
		else:
			return Resource.__getattr__(self, name)
Пример #14
0
 def __dumpattrs__(self):
     str = Resource.__dumpattrs__(self)
     if hasattr(self, '__propertySet'):
         for name, prop in self.__propertySet.properties():
             str = str + ("\t(%s) %s = %s\n" %
                          (prop.type, prop.name, prop.value))
     return str
Пример #15
0
 def __getattr__(self, name):
     try:
         return Resource.__getattr__(self, name)
     except AttributeError:
         if hasattr(self, '__propertySet'):
             return self.getProperty(name)
         else:
             raise AttributeError, name
Пример #16
0
	def __getattr__(self, name):
		try:
			return Resource.__getattr__(self, name)
		except AttributeError:
			if hasattr(self, '__propertySet'):
				return self.getProperty(name)
			else:
				raise AttributeError, name
Пример #17
0
	def __getattr__(self, name):
		try:
			return Resource.__getattr__(self, name)
		except AttributeError:
			if hasattr(self, '__properties'):
				if self.__properties.has_key(name):
					return self.__properties[name].value
			raise AttributeError, name
Пример #18
0
 def __getattr__(self, name):
     try:
         return Resource.__getattr__(self, name)
     except AttributeError:
         if hasattr(self, '__properties'):
             if self.__properties.has_key(name):
                 return self.__properties[name].value
         raise AttributeError, name
Пример #19
0
 def __setattr__(self, name, value):
     if not hasattr(self, '__properties'):
         Resource.__setattr__(self, name, value)
     else:
         try:
             Resource.__getattr__(self, name)
         except AttributeError:
             self.setProperty(name, value)
         else:
             Resource.__setattr__(self, name, value)
Пример #20
0
	def __setattr__(self, name, value):
		if not hasattr(self, '__properties'):
			Resource.__setattr__(self, name, value)
		else:
			try:
				Resource.__getattr__(self, name)
			except AttributeError:
				self.setProperty(name, value)
			else:
				Resource.__setattr__(self, name, value)
Пример #21
0
	def __init__(self, parent, initialState = 'START'):
		Resource.__init__(self)
		self.parent       = parent
		self.initialState = initialState
Пример #22
0
	def __init__(self, name, parent = Cell()):
		Resource.__init__(self)
		self.name   = name
		self.parent = parent
Пример #23
0
 def __init__(self, variableMap):
     Resource.__init__(self)
     self.variableMap = variableMap
Пример #24
0
 def __init__(self, parent):
     Resource.__init__(self)
     self.__propset = {}  # A hash as a container for the J2EE Properties
     self.parent = parent
Пример #25
0
 def __init__(self, parent, initialState='START'):
     Resource.__init__(self)
     self.parent = parent
     self.initialState = initialState
Пример #26
0
	def __init__(self, name, parent):
		Resource.__init__(self)
		self.parent  = parent
		self.name    = name	#WAS attribute
		self.__wasid = None
Пример #27
0
	def __init__(self):
		Resource.__init__(self)
		self.__properties = {}
Пример #28
0
	def __init__(self, parent):
		Resource.__init__(self)
		self.__propset = {} # A hash as a container for the J2EE Properties
		self.parent    = parent
Пример #29
0
	def __create__(self, update):
		Resource.__create__(self, update)
		self.__propertySet.update()
Пример #30
0
 def __loadattrs__(self):
     Resource.__loadattrs__(self)
     if not self.exists(): return
     classloader = AdminConfig.showAttribute(self.__getconfigid__(),
                                             'classloader')
     self.__classloader = ClassLoader()
Пример #31
0
	def __init__(self, parent):
		Resource.__init__(self)
		self.parent = parent
Пример #32
0
 def __init__(self, deployedObjectId, parent):
     Resource.__init__(self)
     self.parent = parent
     self.__doi = deployedObjectId
     self.__classloader = None
Пример #33
0
 def __create__(self, update):
     Resource.__create__(self, update)
     for name, prop in self.__properties.items():
         prop.__create__(update)
Пример #34
0
 def __init__(self):
     Resource.__init__(self)
     self.__properties = {}
Пример #35
0
	def __setattr__(self, name, value):
		if (name == 'tunningParams'):
			raise AttributeError, "'tunningParams' is not writeable"
		else:
			Resource.__setattr__(self, name, value)
Пример #36
0
 def __create__(self, update):
     Resource.__create__(self, update)
     self.__propertySet.update()
Пример #37
0
 def __create__(self, update):
     Resource.__create__(self, update)
     self.__classloader.__create__(update)
Пример #38
0
 def __init__(self, parent, index=0):
     Resource.__init__(self)
     self.parent = parent
     self.index = index
Пример #39
0
	def __dumpattrs__(self):
		str = Resource.__dumpattrs__(self)
		if hasattr(self, '__properties'):
			for prop in self.__properties.values():
				str = str + ("\t(unknown) %s = %s\n" % (prop.name, prop.value))
		return str
Пример #40
0
 def __init__(self, parent):
     Resource.__init__(self)
     self.parent = parent
     self.__sessionmngr = SessionManager(self)
Пример #41
0
	def __setattr__(self, name, value):
		if name == 'type':
			value = was_resource_type(value)
		Resource.__setattr__(self, name, value)
Пример #42
0
	def __getattr__(self, name):
		if (name == 'tunningParams'):
			return self.__tunning
		else:
			return Resource.__getattr__(self, name)
Пример #43
0
	def __loadattrs__(self):
		Resource.__loadattrs__(self)
		if not self.exists(): return
		classloader        = AdminConfig.showAttribute(self.__getconfigid__(), 'classloader')
		self.__classloader = ClassLoader()
Пример #44
0
	def __init__(self, parent):
		Resource.__init__(self)
		self.parent        = parent
		self.__sessionmngr = SessionManager(self)
Пример #45
0
	def __dumpattrs__(self):
		str = Resource.__dumpattrs__(self)
		if hasattr(self, '__propertySet'):
			for name, prop in self.__propertySet.properties():
				str = str + ("\t(%s) %s = %s\n" % (prop.type, prop.name, prop.value))
		return str
Пример #46
0
	def __wasinit__(self):
		Resource.__wasinit__(self)
		self.tunningParams = self.__tunning.__getconfigid__()
Пример #47
0
	def __create__(self, update):
		Resource.__create__(self, update)
		self.__classloader.__create__(update)
Пример #48
0
	def __init__(self, parent):
		Resource.__init__(self)
		self.parent      = parent
		#self.__tunning__ = TunningParams(self.parent)
		self.__tunning = TunningParams(self)
Пример #49
0
	def __create__(self, update):
		Resource.__create__(self, update)
		for name, prop in self.__properties.items():
			prop.__create__(update)
Пример #50
0
	def remove(self):
		for librefId in AdminConfig.list('LibraryRef').splitlines():
			libName = AdminConfig.showAttribute(librefId, 'libraryName')
			if self.name == libName:
				AdminConfig.remove(librefId)
		Resource.remove(self)
Пример #51
0
 def __init__(self, appname, parent=ApplicationServer()):
     Resource.__init__(self)
     self.appname = appname
     self.parent = parent
     self.__deployedObject = None
Пример #52
0
 def __loadattrs__(self):
     Resource.__loadattrs__(self)
     if not self.exists(): return
     deployedObj = AdminConfig.showAttribute(self.__getconfigid__(),
                                             'deployedObject')
     self.__deployedObject = DeployedObject(deployedObj, self)
Пример #53
0
 def __init__(self, parent):
     Resource.__init__(self)
     self.parent = parent
     self.nodeName = parent.nodeName
     self.serverName = parent.serverName
Пример #54
0
 def __create__(self, update):
     Resource.__create__(self, update)
     self.__deployedObject.__create__(update)
Пример #55
0
 def __init__(self, parent=Cell()):
     Resource.__init__(self)
     self.parent = parent
     self.__varmap = {}
Пример #56
0
 def __remove__(self, deep):
     self.__deployedObject.__remove__(deep)
     Resource.__remove__(self, deep)
Пример #57
0
 def __init__(self, name, parent=Cell()):
     Resource.__init__(self)
     self.name = name
     self.parent = parent
Пример #58
0
	def __init__(self, parent):
		Resource.__init__(self)
		self.parent     = parent
		self.nodeName   = parent.nodeName
		self.serverName = parent.serverName