gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump/document forrest.py
Date Tue, 10 Feb 2004 20:53:40 GMT
ajack       2004/02/10 12:53:39

  Modified:    python/gump/model project.py server.py
               python/gump/document forrest.py
  Log:
  1) Attempt to set jar ids if none set [work in progress]
  2) Attempt to link to other servers per object. [Sadly not traditional yet]
  
  Revision  Changes    Path
  1.43      +4 -4      jakarta-gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/project.py,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- project.py	10 Feb 2004 20:18:40 -0000	1.42
  +++ project.py	10 Feb 2004 20:53:39 -0000	1.43
  @@ -279,7 +279,7 @@
           return self.jars.values()
           
       def getJarAt(self,index):
  -        return self.jars[index]
  +        return self.jars.values()[index]
           
       def hasReports(self):
           if self.reports: return 1
  
  
  
  1.5       +16 -5     jakarta-gump/python/gump/model/server.py
  
  Index: server.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/server.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- server.py	10 Feb 2004 00:25:34 -0000	1.4
  +++ server.py	10 Feb 2004 20:53:39 -0000	1.5
  @@ -73,10 +73,14 @@
       """A named server"""
       def __init__(self,xml,workspace):
       	NamedModelObject.__init__(self,xml.getName(),xml,workspace)
  -    
  +        
  +        self.resolver=None
               
  -    def complete(self,workspace):
  -        pass
  +    def complete(self,workspace):      
  +    
  +        if self.hasType() and self.getType() == 'python':
  +            if self.hasUrl():
  +                self.resolver=Resolver('bogus', self.getUrl())
                        
       def check(self,workspace):
           pass
  @@ -102,8 +106,15 @@
       def hasTitle(self): 
           return hasattr(self.xml,'title') and self.xml.title
           
  -    def getTitle(self): return str(self.xml.title)
  -            
  +    def getTitle(self): 
  +        return str(self.xml.title)
  +        
  +    def hasResolver(self): 
  +        if self.resolver: return 1
  +        return 0
  +        
  +    def getResolver(self): 
  +        return self.resolver            
       
       def dump(self, indent=0, output=sys.stdout):
           output.write(getIndent(indent)+'Server : ' + self.name + '\n')   
  
  
  
  1.70      +30 -4     jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- forrest.py	10 Feb 2004 20:18:40 -0000	1.69
  +++ forrest.py	10 Feb 2004 20:53:39 -0000	1.70
  @@ -855,6 +855,8 @@
                self.insertTypedLink( module.cause, module, stateList.createEntry( "Root Cause:
")) 
                
           self.documentAnnotations(document,module)
  +                
  +        self.documentServerLinks(document,module,workspace)     
           
           projectsSection=document.createSection('Projects') 
           if (len(module.getProjects()) > 1):
  @@ -1021,7 +1023,9 @@
           if project.cause and not project==project.cause:
                self.insertTypedLink( project.cause, project, stateList.createEntry( "Root
Cause: ")) 
                
  -        self.documentAnnotations(document,project)        
  +        self.documentAnnotations(document,project)     
  +        
  +        self.documentServerLinks(document,project,workspace)        
               
           detailsSection=document.createSection('Details')
           
  @@ -1265,6 +1269,28 @@
               # TODO if 'text' is a list go through list and
               # when not string get the object link and <link it...
               noteRow.createData(note.text) 
  +            
  +    def documentServerLinks(self,xdocNode,linkable,workspace):
  +        
  +        servers=workspace.getServers()
  +        if not servers: return        
  +        
  +        links=[]
  +        for server in servers:
  +            if server.hasResolver():
  +                link=server.getResolver().getUrl(linkable)
  +                if link:
  +                    links.append(server)
  +                
  +        if not links: return
  +        
  +        serversSection=xdocNode.createSection('Servers')        
  +        serversTable=serversSection.createTable()
  +        serverRow=serversTable.createRow()
  +        for server in links:      
  +            serverRow.createData().createFork(	\
  +                    server.getResolver().getUrl(linkable), \
  +                    server.getName() )
                           
       def documentProperties(self,xdocNode,propertyContainer,title='Properties'):
           
  
  
  

Mime
View raw message