| .. | .. |
|---|
| 1 | 1 | package net.curisit.securis.beans; |
|---|
| 2 | 2 | |
|---|
| 3 | +import java.util.Collections; |
|---|
| 3 | 4 | import java.util.List; |
|---|
| 4 | 5 | |
|---|
| 5 | 6 | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
|---|
| 6 | 7 | import com.fasterxml.jackson.annotation.JsonInclude; |
|---|
| 7 | 8 | import com.fasterxml.jackson.annotation.JsonInclude.Include; |
|---|
| 9 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
|---|
| 8 | 10 | |
|---|
| 9 | 11 | @JsonAutoDetect |
|---|
| 10 | 12 | @JsonInclude(Include.NON_NULL) |
|---|
| 13 | +@JsonPropertyOrder({ |
|---|
| 14 | + "appName", "licenseTypeCode", "packCode", "arch", "osName", "customerCode", "macAddresses", "crcLogo" |
|---|
| 15 | +}) |
|---|
| 11 | 16 | public class RequestBean { |
|---|
| 12 | 17 | private String customerCode; |
|---|
| 13 | 18 | private String crcLogo; |
|---|
| .. | .. |
|---|
| 38 | 43 | } |
|---|
| 39 | 44 | |
|---|
| 40 | 45 | public void setMacAddresses(List<String> macAddresses) { |
|---|
| 46 | + // We need to be sure that the same mac addresses are always shown in |
|---|
| 47 | + // the same order, to generate a valid hash |
|---|
| 48 | + Collections.<String> sort(macAddresses); |
|---|
| 41 | 49 | this.macAddresses = macAddresses; |
|---|
| 42 | 50 | } |
|---|
| 43 | 51 | |
|---|