Interface Command

All Known Implementing Classes:
AuditCommand, DepartmentCommand, HomePageCommand, IndicatorCommand, MeasureCommand, ProcessCommand, ReportCommand, RiskCommand

public interface Command
Command è una semplice interfaccia per realizzare un'applicazione web servlet-centrica. Nell'approccio servlet-centrico esiste una servlet centrale che gestisce la logica dell'applicazione. Ogni azione del web è realizzata da una classe specifica e l'interazione tra la servlet-centrale e le classi avviene tramite questa interfaccia. Questo approccio è anche detto 'command pattern'.
Author:
Roberto Posenato
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(javax.servlet.http.HttpServletRequest req)
    Esegue tutte le operazioni necessarie per recuperare le informazioni per la visualizzazione.
    void
    init(ItemBean voce)
    init supplies a constructor that can't be used directly.
  • Method Details

    • execute

      void execute(javax.servlet.http.HttpServletRequest req) throws CommandException
      Esegue tutte le operazioni necessarie per recuperare le informazioni per la visualizzazione. Tutte le informazioni devono essere inserite nella sessione o in request.
      Parameters:
      req - HttpServletRequest
      Throws:
      CommandException - incapsula tutte le possibili eccezioni incontrate dalle classi implementanti
    • init

      void init(ItemBean voce) throws CommandException
      init supplies a constructor that can't be used directly. Remember that almost of the implementing classes are instancied by the Class.newInstance().
      Parameters:
      voce - a ItemBean containing al the useful information for instantiation
      Throws:
      CommandException - incapsulate each exception occurred in init by implementing classes