blob: 7fc52f0e5943b4d6f1aaae4e884706d68e428d58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.orbekk.same;
import java.util.ArrayList;
import java.util.List;
public class ServicesPbConversion {
public static List<Services.Component> componentsToPb(List<State.Component> components) {
List<Services.Component> results = new ArrayList<Services.Component>();
for (State.Component c : components) {
results.add(componentToPb(c));
}
return results;
}
public static Services.Component componentToPb(State.Component component) {
return Services.Component.newBuilder()
.setId(component.getName())
.setRevision(component.getRevision())
.setData(component.getData())
.build();
}
}
|