Package net.sourceforge.cruisecontrol.monitoring

Examples of net.sourceforge.cruisecontrol.monitoring.ProjectMonitorAttribute


        theNewServer.setName( "My New Server" );
        theNewServer.setRmiPort( "21" );
        theNewServer.setJmxPort( "10" );

        ArrayList attributesList = new ArrayList();
        attributesList.add( new ProjectMonitorAttribute( "Name", "projectName" ) );
       
        theNewServer.setProjectAttributes( attributesList );
       
        theServers.add( theNewServer );
       
        CruisecontrolServerManager.resetServers();
        CruisecontrolServerManager.saveServers( theServers, "test-files/server_config3.xml" );
       
        theServers = CruisecontrolServerManager.getServers( "test-files/server_config3.xml" );
       
        theNewServer = (CruisecontrolServer) theServers.get(0);
        List projectAttributes = theNewServer.getProjectAttributes();
    assertEquals( "Attributes not built", 1, projectAttributes.size() );
       
        ProjectMonitorAttribute attribute = (ProjectMonitorAttribute) projectAttributes.get(0);
        assertEquals( "Name not set", "Name", attribute.getName() );
        assertEquals( "Method Name not set", "projectName", attribute.getMethodName() );
    }
View Full Code Here


        List theAttributes = getProjectAttributes();
       
        String[] accessors = new String[ theAttributes.size() ];
       
        for( int index = 0;index < theAttributes.size();index++ ) {
            ProjectMonitorAttribute currentAttribute = (ProjectMonitorAttribute) theAttributes.get( index );
           
            accessors[index] = currentAttribute.getMethodName();

      }
       
        return accessors;
    }
View Full Code Here

    private String[] getHeaders() {
        List theAttributes = getProjectAttributes();
        String[] headers = new String[ theAttributes.size() ];
       
      for( int index = 0;index < theAttributes.size();index++ ) {
          ProjectMonitorAttribute currentAttribute = (ProjectMonitorAttribute) theAttributes.get( index );
           
        headers[ index ] = currentAttribute.getName();
      }
       
        return headers;
    }
View Full Code Here

    }
   

        if ( servers.size() > 1 ) {
          // add server name as first column
          theAttributes.add( 0, new ProjectMonitorAttribute( "Server", "serverName" ));
        }
       
    return theAttributes;
   
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.monitoring.ProjectMonitorAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.