You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2004/08/23 21:34:38 UTC

cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/expression Context.java

rdonkin     2004/08/23 12:34:38

  Modified:    betwixt/src/java/org/apache/commons/betwixt/expression
                        Context.java
  Log:
  Added strategy for attribute suppression. This should (belatedly) give a solution for issue #24659.
  
  Revision  Changes    Path
  1.13      +20 -0     jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/expression/Context.java
  
  Index: Context.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/expression/Context.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Context.java	4 Jul 2004 16:56:20 -0000	1.12
  +++ Context.java	23 Aug 2004 19:34:38 -0000	1.13
  @@ -20,6 +20,7 @@
   
   import org.apache.commons.betwixt.BindingConfiguration;
   import org.apache.commons.betwixt.strategy.ObjectStringConverter;
  +import org.apache.commons.betwixt.strategy.ValueSuppressionStrategy;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -248,5 +249,24 @@
        */
       public void setClassNameAttribute(String classNameAttribute) {
           bindingConfiguration.setClassNameAttribute( classNameAttribute );
  +    }
  +    
  +    /**
  +     * Gets the <code>ValueSuppressionStrategy</code>.
  +     * This is used to control the expression of attributes with certain values.
  +     * @return <code>ValueSuppressionStrategy</code>, not null
  +     */
  +    public ValueSuppressionStrategy getValueSuppressionStrategy() {
  +        return bindingConfiguration.getValueSuppressionStrategy();
  +    }
  +    
  +    /**
  +     * Sets the <code>ValueSuppressionStrategy</code>.
  +     * This is used to control the expression of attributes with certain values.
  +     * @param valueSuppressionStrategy <code>ValueSuppressionStrategy</code>, not null
  +     */
  +    public void setValueSuppressionStrategy(
  +            ValueSuppressionStrategy valueSuppressionStrategy) {
  +        bindingConfiguration.setValueSuppressionStrategy(valueSuppressionStrategy);
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org