buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/Filter.java
changeset 628 7c4a911dc066
parent 588 c7c26511138f
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    14 * Description:  
    14 * Description:  
    15 *
    15 *
    16 */
    16 */
    17 package com.nokia.helium.sysdef.ant.types;
    17 package com.nokia.helium.sysdef.ant.types;
    18 
    18 
       
    19 import java.io.File;
       
    20 
       
    21 import com.nokia.helium.sysdef.ant.taskdefs.FilterTask;
       
    22 
    19 /**
    23 /**
    20  * This type defines a system definition filter.
    24  * This interface defines filter applied by the sysdefFilter task.
    21  *
    25  *
    22  */
    26  */
    23 public class Filter {
    27 public interface Filter {
    24     private String filter;
       
    25     private String type = "has";
       
    26 
    28 
    27     /**
    29     /**
    28      * Define the filter
    30      * Validate the object parameters.
    29      * @param filter the filter string.
    31      * This method will be called before the filter method.
    30      */
    32      */
    31     public void setFilter(String filter) {
    33     void validate();
    32         this.filter = filter;
       
    33     }
       
    34     
    34     
    35     /**
    35     /**
    36      * Get the filter.
    36      * Apply filtering on the src file and save the outcome into
       
    37      * the dest file.
       
    38      * @param task the calling task.
       
    39      * @param src the source file
       
    40      * @param dest the dest file.
    37      */
    41      */
    38     public String getFilter() {
    42     void filter(FilterTask task, File src, File dest);
    39         return filter;
    43     
    40     }
       
    41 
       
    42     /**
       
    43      * Define the filter type
       
    44      * @param type
       
    45      * @ant.not-required Default has.
       
    46      */
       
    47     public void setType(SydefFilterTypeEnum type) {
       
    48         this.type = type.getValue();
       
    49     }
       
    50 
       
    51     /**
       
    52      * Get the filter type.
       
    53      * @return
       
    54      */
       
    55     public String getType() {
       
    56         return type;
       
    57     }
       
    58 
       
    59 }
    44 }