question

bsatpur avatar image
bsatpur asked bsatpur posted

problem while developing a parent child node structure in session properties

Hi,

 

  Im facing the problem while developing a separate Session profile.

  im uploading images to have a clear idea on that.

  Im able to write all the session properties that are available in the left panel.

  But the thing is that once u click  "Test Configuration"  it has to display all the fields(Unicast latency, qos assurance, qos capacity, etc.,) that are available in

  that i.e  in the tree structure.

 

 1) Fisrt image is that we require.

 

 

  I will appreciate your help on this.

 

 

 Thanks,

 Satpur

 

 

 

 

 

 

iTestsdk
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
AdamB avatar image
AdamB answered AdamB posted

Was the image missed in the message?  I cannot see one.

 

From reading this, let me see if I can help.  You're hoping to have a property structure that has a parent child relationship, i.e. something like (pseudo):

 

-> Session Properties (IP Address, User name, Password)

------> Send Config (Number of packets, packet size)

------> Capture Settings (Buffer size, tmp file location, log file)

---------------> Debug (isDebug, debug level)

 

In order to do this, you'd create session properties that had two methods decorated with the @PropertyClassGet attribute.  These would be for SendConfigProperties and CaptureSettingProperties.  The CaptureSettingProperties class would also have method decorated with @PropertyClassGet that would return the DebugProperties class

 

Is this roughly what you're trying to do?

 

Your tree structure needs to be created through the structure of the underlying java objects.  You cannot created a tree from objects that are in one object by itself.

 

Edit: Fixed my error saying @PropertyClass to @PropertyClassGet

8 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bsatpur avatar image bsatpur commented ·

 hi,

 

  Here im uploading the image that we are getting.

 

 Thanks,

 Satpur

0 Likes 0 ·
AdamB avatar image AdamB bsatpur commented ·

Where is it getting uploaded to? (note, I've found chrome sometimes has problems adding attachments to the boards)

0 Likes 0 ·
bsatpur avatar image bsatpur AdamB commented ·
0 Likes 0 ·
veriwave1.jpg (538.2 KiB)
bsatpur avatar image bsatpur bsatpur commented ·

 Here im sending the image that is our requirement.

 

 Thanks,

 Satpur

0 Likes 0 ·
image003.png (44.6 KiB)
AdamB avatar image AdamB bsatpur commented ·

And each of those nodes that you want nested under the "test configuration" page are effectively individual pages with sets of properties?  Or are they individual "test configurations" of which you can have many?

 

If it is the first case, you will need to make them all properties (methods on TestConfigurationProperty that are decorated with @PropertyClassGet, rather than on the top level session properties) of the "Test Configuration" property and it should work for you.

 

Edit: PropertyClassGet not Group.  my bad.

0 Likes 0 ·
bsatpur avatar image bsatpur AdamB commented ·

 

 I didn't find @PropertyGroup as u specified.

 Here im sending the code.

  Under Testconfiguration, i should have(aaaAuthenticationRate,meshLatencyAggregate,meshLatencyPerHop).

 

 private List<VeriWaveTestConfiguration> testConfiguration = new ArrayList<VeriWaveTestConfiguration>();

 

private List<VeriWaveAAAAuthenticationRate> aaaAuthenticationRate = new ArrayList<VeriWaveAAAAuthenticationRate>();
private List<VeriWaveMeshLatencyAggregate> meshLatencyAggregate = new ArrayList<VeriWaveMeshLatencyAggregate>();
private List<VeriWaveMeshLatencyPerHop> meshLatencyPerHop = new ArrayList<VeriWaveMeshLatencyPerHop>();

 @PropertyList(name = "testConfiguration", objectClass =VeriWaveTestConfiguration.class, displayName = "Test Configuration")
    public List<VeriWaveTestConfiguration> getTestConfiguration() {     
          return testConfiguration;
    }

 @PropertyList(name = "aaaAuthenticationRate", objectClass =VeriWaveAAAAuthenticationRate.class, displayName = "AAA Authentication Rate")
    public List<VeriWaveAAAAuthenticationRate> getAAAAuthenticationRate() {
        return aaaAuthenticationRate;
    }
     
     @PropertyList(name = "meshLatencyAggregate", objectClass =VeriWaveMeshLatencyAggregate.class, displayName = "Mesh Latency Aggregate")
      public List<VeriWaveMeshLatencyAggregate> getMeshLatencyAggregate() {
        return meshLatencyAggregate;
    }
     
     @PropertyList(name = "meshLatencyPerHop", objectClass = VeriWaveMeshLatencyPerHop.class, displayName = "Mesh Latency Per Hop")
     public List<VeriWaveMeshLatencyPerHop> getMeshLatencyPerHop() {
        return meshLatencyPerHop;
     }

 

 

0 Likes 0 ·
AdamB avatar image AdamB bsatpur commented ·

This is pseudo code, but it should give you the idea.  Each of those sub-nodes has to be a java class that is returned by a method in your TestConfig class that has been decorated with @PropertyClassGet

 

 

public class SessionProperties implements ISessionProperties {

	@PropertyList(...)
	LicenseKeys getAdditionalLicenseKeys(){
	}

	@PropertyClassGet(...)
	ARPDiscovertyConfig getARPDiscoveryConfiguration(){
	}
.
.
.
.
	@PropertyClassGet(name="TestConfig", label="Test Configuration",...)
	TestConfig getTestConfig(){
	}

}


public class TestConfig {

	@PropertyClassGet(name="AAAAuthenticationRate", ...)
	AAAAuthenticationRate getAAAAuthenicationRate(){
	}

	@PropertyClassGet(name="MeshLatencyAggregate",...)
	MeshLatencyAggregate getMeshLatencyAggregate(){
	}
.
.
.
.
.
.

}

public class AAAAuthenticationRate {
	@PropertyGet(name="property1",...)
	public int getProperty1(){}

	@PropertySet(name="property1")
	public void setProperty1(int value){}

	@PropertyGet(name="rate",...)
	public double getRate(){}

	@PropertySet(name="rate")
	public void setRate(double value) {}
}

public class MeshLatencyAggregate{
	@PropertyGet(name="property1",...)
	public int getProperty1(){}

	@PropertySet(name="property1")
	public void setProperty1(int value){}

	@PropertyGet(name="latency",...)
	public double getLatency(){}

	@PropertySet(name="latency")
	public void setLatency(double value) {}
}

 

 

Sorry for the confusion above about PropertyClass/Group/ClassGet.  It is @PropertyClassGet.

0 Likes 0 ·
bsatpur avatar image bsatpur AdamB commented ·

 

Hi,

 

   Thanks a lot.

   Its working now.

 

  Thanks,

  Satpur

 

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.