Ignore:
Timestamp:
01/18/12 17:11:58 (12 years ago)
Author:
vmipsl
Message:

clean
slides

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ether_2012/trunk/web/src/com/ether/Controller.java

    r330 r353  
    22 
    33import com.ether.annotation.ControllerMethod; 
    4 import com.ether.annotation.Mandatory; 
    5 import com.ether.annotation.ParamName; 
    6 import net.sf.json.JSONObject; 
    74import org.apache.commons.logging.Log; 
    85import org.apache.commons.logging.LogFactory; 
    9 import org.jetbrains.annotations.NotNull; 
    10 import org.springframework.beans.factory.annotation.Required; 
    11 import org.springframework.web.servlet.ModelAndView; 
    126 
    13 import javax.servlet.http.HttpServletRequest; 
    14 import javax.servlet.http.HttpServletResponse; 
    157import java.util.HashMap; 
    16 import java.util.List; 
    178import java.util.Map; 
    189 
     
    2617    /** *********************************************************** **/ 
    2718    /** *********************** VIEWS ***************************** **/ 
    28     /** 
    29      * ********************************************************** * 
    30      */ 
    31     // Default view if url's methodName is unknown 
    32     @ControllerMethod(view = "init") 
     19    /** *********************************************************** **/ 
     20    @ControllerMethod(view = VIEW_INIT) 
    3321    public Map<String, Object> home() 
    3422            throws WebException 
    35     { 
    36          return new HashMap<String, Object>(); 
    37     } 
    38  
    39     @ControllerMethod(view = VIEW_VISUALIZATION) 
    40     public Map<String, Object> view() 
    41             throws ServiceException 
    4223    { 
    4324        return new HashMap<String, Object>(); 
    4425    } 
    4526 
    46     @ControllerMethod(view = VIEW_VISUALIZATION_PLATEFORM) 
    47     public Map<String, Object> viewAllPlateforms() 
    48             throws ServiceException 
     27    @ControllerMethod(view = VIEW_ACTIVITIES) 
     28    public Map<String, Object> viewSlideContent() 
     29            throws WebException 
    4930    { 
    50         final List<Plateform> plateforms = _etherService.getAllPlateforms(); 
    51  
    52         final Map<String, Object> model = new HashMap<String, Object>(); 
    53         model.put( "plateforms", getJsonHelper().toJSON( plateforms ) ); 
    54         return model; 
    55     } 
    56  
    57     /** *********************************************************** **/ 
    58     /** *********************** CALLS ***************************** **/ 
    59     /** 
    60      * ********************************************************** * 
    61      */ 
    62     @ControllerMethod(jsonResult = true) 
    63     public JSONObject searchParametersByPlateform( @Mandatory @ParamName(ParameterConstants.PARAMETER_ID) final Integer plateformId ) 
    64             throws ServiceException, WebException 
    65     { 
    66 //        final List<Parameter> parameters = new ArrayList<Parameter>( 3 ); 
    67 //        parameters.add( new Parameter( Long.valueOf( 1 ), "parameter1" ) ); 
    68 //        parameters.add( new Parameter( Long.valueOf( 2 ), "parameter2" ) ); 
    69 //        parameters.add( new Parameter( Long.valueOf( 3 ), "parameter3" ) ); 
    70  
    71         final List<Parameter> parameters = _etherService.getAllParametersByPlateformId( plateformId ); 
    72         final JSONObject result = new JSONObject(); 
    73         result.put( "parameters", getJsonHelper().toJSON( parameters ) ); 
    74         return result; 
    75     } 
    76  
    77     @Required 
    78     public void setEtherService( @NotNull final EtherService etherService ) 
    79     { 
    80         _etherService = etherService; 
     31        return new HashMap<String, Object>(); 
    8132    } 
    8233 
    8334    private static final Log LOGGER = LogFactory.getLog( Controller.class ); 
    8435 
    85     private static final String VIEW_VISUALIZATION = "visualization/visu"; 
    86     private static final String VIEW_VISUALIZATION_PLATEFORM = "visualization/visu_plateform"; 
    87  
    88     private EtherService _etherService; 
     36    private static final String VIEW_INIT = "init"; 
     37    private static final String VIEW_ACTIVITIES = "project/slideActivities"; 
    8938} 
Note: See TracChangeset for help on using the changeset viewer.