01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.config.schema;
06:
07: import com.tc.config.schema.context.ConfigContext;
08: import com.tc.config.schema.dynamic.BooleanConfigItem;
09: import com.tc.config.schema.dynamic.IntConfigItem;
10: import com.terracottatech.config.UpdateCheck;
11:
12: public class UpdateCheckConfigObject extends BaseNewConfigObject
13: implements UpdateCheckConfig {
14: private final BooleanConfigItem isEnabled;
15: private final IntConfigItem periodDays;
16:
17: public UpdateCheckConfigObject(ConfigContext context) {
18: super (context);
19:
20: context.ensureRepositoryProvides(UpdateCheck.class);
21:
22: isEnabled = context.booleanItem("enabled");
23: periodDays = context.intItem("period-days");
24: }
25:
26: public BooleanConfigItem isEnabled() {
27: return isEnabled;
28: }
29:
30: public IntConfigItem periodDays() {
31: return periodDays;
32: }
33: }
|