comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 692:22e4bffbe240 facets-slt

Generated facets for each output aspect. flys-artifacts/branches/facets-slt@2132 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 16 Jun 2011 10:05:44 +0000
parents 2600aa2c7319
children af393c5eb2c8
comparison
equal deleted inserted replaced
691:2600aa2c7319 692:22e4bffbe240
1080 if (callback == null) { 1080 if (callback == null) {
1081 logger.info("There is no data which needs to be computed."); 1081 logger.info("There is no data which needs to be computed.");
1082 return null; 1082 return null;
1083 } 1083 }
1084 1084
1085 return compute(hash, callback, type); 1085 return compute(context, hash, callback, type);
1086 } 1086 }
1087 1087
1088 1088
1089 public Object compute( 1089 public Object compute(
1090 CallContext context,
1090 String key, 1091 String key,
1091 ComputeCallback callback, 1092 ComputeCallback callback,
1092 ComputeType type) 1093 ComputeType type)
1093 { 1094 {
1094 String stateId = getCurrentStateId(); 1095 String stateId = getCurrentStateId();
1100 1101
1101 Cache cache = CacheFactory.getCache(COMPUTING_CACHE); 1102 Cache cache = CacheFactory.getCache(COMPUTING_CACHE);
1102 if (cache == null) { 1103 if (cache == null) {
1103 switch (type) { 1104 switch (type) {
1104 case FEED: 1105 case FEED:
1105 return callback.computeFeed(fs); 1106 return callback.computeFeed(context, fs);
1106 1107
1107 case ADVANCE: 1108 case ADVANCE:
1108 return callback.computeAdvance(fs); 1109 return callback.computeAdvance(context, fs);
1109 } 1110 }
1110 } 1111 }
1111 1112
1112 net.sf.ehcache.Element element = cache.get(key); 1113 net.sf.ehcache.Element element = cache.get(key);
1113 if (element != null) { 1114 if (element != null) {
1116 } 1117 }
1117 1118
1118 Object result = null; 1119 Object result = null;
1119 switch (type) { 1120 switch (type) {
1120 case FEED: 1121 case FEED:
1121 result = callback.computeFeed(fs); 1122 result = callback.computeFeed(context, fs);
1122 break; 1123 break;
1123 1124
1124 case ADVANCE: 1125 case ADVANCE:
1125 result = callback.computeAdvance(fs); 1126 result = callback.computeAdvance(context, fs);
1126 } 1127 }
1127 1128
1128 if (result != null) { 1129 if (result != null) {
1129 cache.put(new net.sf.ehcache.Element(key, result)); 1130 cache.put(new net.sf.ehcache.Element(key, result));
1130 } 1131 }

http://dive4elements.wald.intevation.org