I have a JSON configuration that lists events for each organization along with event config (when and where to schedule the event:
{
"organizations": {
"org-A" : {
"events" : {
"event-A" : {
"venue": "blah",
"date": "blah"
}
}
},
"org-B" : {
...
}
}
}
My current Java class for this config currently is:
public class OrgEventsConfig {
private final Map<String, Map<String, EventInfo>> config;
@JsonIgnoreProperties(ignoreUnknown = true)
static class EventInfo {
private static final String venue;
private static final Date eventDate;
}
}
Is this encapsulation right? Should I include event name and organization in the event info?