示例#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