01: /*
02: * Copyright 2007 Giordano Maestro (giordano.maestro@assetdata.it)
03: *
04: *
05: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
06: * use this file except in compliance with the License.
07: *
08: * You may obtain a copy of the License at
09: * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
10: * or agreed to in writing, software distributed under the License is
11: * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
12: * KIND, either express or implied. See the License for the specific language
13: * governing permissions and limitations under the License.
14: */
15: package org.romaframework.module.designer.view.domain.radpage.aspect;
16:
17: import java.util.ArrayList;
18: import java.util.List;
19: import java.util.Map;
20: import java.util.Map.Entry;
21:
22: import org.romaframework.aspect.monitoring.MonitoringAspect;
23: import org.romaframework.core.schema.SchemaFeatures;
24: import org.romaframework.module.designer.DesignerHelper;
25: import org.romaframework.module.designer.view.domain.FeatureListable;
26:
27: public class MonitoringAspectPage extends FeatureAspectPage {
28: public MonitoringAspectPage(SchemaFeatures iActualFeature) {
29: super (MonitoringAspect.ASPECT_NAME, iActualFeature
30: .getFeatures(MonitoringAspect.ASPECT_NAME));
31:
32: }
33:
34: @Override
35: protected List<FeatureListable> fillConfigurable() {
36: List<FeatureListable> result = new ArrayList<FeatureListable>();
37: if (actualFeature.getAttributes() != null) {
38: for (Entry<String, Object> entry : actualFeature
39: .getAttributes().entrySet()) {
40: if (entry.getKey().equals("enabled")) {
41: result.add(new FeatureListable(entry.getKey(),
42: DesignerHelper
43: .getBooleanWrapper((Boolean) entry
44: .getValue())));
45: }
46: }
47: }
48: return result;
49: }
50:
51: @Override
52: public Map<String, Object> getDefaultValues() {
53: return null;
54: }
55: }
|