From: <an...@us...> - 2011-03-17 17:54:44
|
Revision: 8542 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=8542&view=rev Author: anfarr Date: 2011-03-17 17:54:37 +0000 (Thu, 17 Mar 2011) Log Message: ----------- SFOS-1572: Constraints migration Modified Paths: -------------- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/ApplyEffects.java trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/DynamicPolicyEvaluation.java Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/ApplyEffects.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/ApplyEffects.java 2011-03-17 17:53:45 UTC (rev 8541) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/ApplyEffects.java 2011-03-17 17:54:37 UTC (rev 8542) @@ -30,7 +30,6 @@ import org.smartfrog.sfcore.componentdescription.ComponentDescription; import org.smartfrog.sfcore.languages.sf.sfreference.SFReference; import org.smartfrog.sfcore.prim.Prim; -import org.smartfrog.sfcore.prim.PrimImpl; import org.smartfrog.sfcore.reference.Reference; import org.smartfrog.sfcore.reference.ReferencePart; @@ -314,9 +313,9 @@ String fullname=""; try { if (source instanceof Prim) { - PrimImpl p = (PrimImpl) source; + Prim p = (Prim) source; fullname = p.sfCompleteName().toString(); - if (p.sfLog().isInfoEnabled()) p.sfLog().info("Replacing: "+key+" with: "+update+ " in: "+fullname); + if (SFSystem.sfLog().isInfoEnabled()) SFSystem.sfLog().info("Replacing: "+key+" with: "+update+ " in: "+fullname); } else { fullname = ((ComponentDescription)source).sfCompleteName().toString(); Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/DynamicPolicyEvaluation.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/DynamicPolicyEvaluation.java 2011-03-17 17:53:45 UTC (rev 8541) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/functions/DynamicPolicyEvaluation.java 2011-03-17 17:54:37 UTC (rev 8542) @@ -25,6 +25,7 @@ import java.util.Iterator; import java.util.Set; +import org.smartfrog.SFSystem; import org.smartfrog.sfcore.common.MessageKeys; import org.smartfrog.sfcore.common.SmartFrogException; import org.smartfrog.sfcore.common.SmartFrogFunctionResolutionException; @@ -61,9 +62,9 @@ //Need to ascertain whether we do this or not ComponentDescription comp = context.getOriginatingDescr(); context = comp.sfContext(); + + SFSystem.sfLog().debug("DPE: Checking guard/s"); - //System.out.println("DPE: Checking guard/s"); - //Check the guards on the policy evaluation... //(1) Explicit guard Boolean guard = null; @@ -89,7 +90,7 @@ } } - //System.out.println("DPE: Past guard/s"); + SFSystem.sfLog().debug("DPE: Past guard/s"); //OK, so we are allowed to evaluate the DPE... @@ -97,19 +98,19 @@ Enumeration e = context.keys(); while (e.hasMoreElements()) { Object key = e.nextElement(); - //System.out.println("*********ATTRIBUTE********"+key); + SFSystem.sfLog().debug("*********ATTRIBUTE********"+key); Object val = comp.sfResolve(key.toString()); if (val!=null) { context.put(key, val); - //System.out.println("DPE: Replacing: "+key+" with "+val); + SFSystem.sfLog().debug("DPE: Replacing: "+key+" with "+val); } } } catch (SmartFrogException e){/*Shouldn't happen*/} //Let's finish with a few effects... - - //System.out.println("DPE: Applying Effects"); + + SFSystem.sfLog().debug("DPE: Applying Effects"); try { comp.sfResolve(new Reference(ReferencePart.here(ConstraintConstants.EFFECTS)));} catch (SmartFrogResolutionException sfre){/*Intentionally do nothing*/} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |