org.nuiton.wikitty.publication
Class WikittyPublicationContext

java.lang.Object
  extended by org.nuiton.wikitty.publication.WikittyPublicationContext

public class WikittyPublicationContext
extends Object

Context de la requete en cours. Les parametres de la requete sont parses et mis dans deux variables

  • arguments
  • argumentFiles un parametre simple sera dans arguments:
  • [filename]=[valeur du champs] un parametre de type upload aura des entrees dans les deux dans arguments:
  • [fieldname]-upload=true
  • [fieldname]-filename=[nom du fichier]
  • [fieldname]-contentType=[type mime du fichier] dans argumentFiles:
  • [fieldname]=[contenu binaire du fichier]

    Version:
    $Revision: 650 $ Last update: $Date: 2010-12-23 12:44:57 +0100 (jeu., 23 déc. 2010) $ by : $Author: sletellier $
    Author:
    poussin

    Field Summary
    static String ACTION_PREFIX
               
    protected  String actionName
               
    protected static Map<String,WikittyPublicationAction> actions
               
    protected  org.nuiton.util.ApplicationConfig appConfig
               
    protected  Map<String,byte[]> argumentFiles
               
    protected  Map<String,String> arguments
               
    static String CONFIG_FILE
              configuration option name FIXME poussin 20101206 use OptionDef
    protected  String contentType
               
    protected  List<String> mandatoryArguments
               
    protected  String path
               
    protected  WikittyProxy proxy
               
    protected  javax.servlet.http.HttpServletRequest req
               
    protected  javax.servlet.http.HttpServletResponse resp
               
    protected static Map<String,WikittyService> services
               
    protected  String wsContext
               
     
    Constructor Summary
    WikittyPublicationContext(org.nuiton.util.ApplicationConfig appConfig)
               
     
    Method Summary
    protected  void addRequiredExtension(WikittyService ws)
              add here all extension that WikittyService must know
     WikittyPublicationAction getAction()
               
    <E extends WikittyPublicationAction>
    E
    getAction(Class<E> actionClass)
               
     WikittyPublicationAction getAction(String actionName)
               
     String getActionName()
              le nom de l'action a faire
     org.nuiton.util.ApplicationConfig getAppConfig()
               
     String getArgument(String name, String defaultValue)
               
     Map<String,byte[]> getArgumentFiles()
               
     Map<String,String> getArguments()
               
     String getContentType()
               
     List<String> getMandatoryArguments()
               
     String getPath()
              le reste de l'url apres l'action
     javax.servlet.http.HttpServletRequest getRequest()
               
     javax.servlet.http.HttpServletResponse getResponse()
               
     WikittyProxy getWikittyProxy()
               
     WikittyService getWikittyService()
               
     String makeUrl(String url)
              add context to the url and parameter if necessary
     void parse(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
              set attributes: req wsContext actionName mandatoryArguments arguments
     void setContentType(String contentType)
               
     String toString()
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    CONFIG_FILE

    public static final String CONFIG_FILE
    configuration option name FIXME poussin 20101206 use OptionDef

    See Also:
    Constant Field Values

    ACTION_PREFIX

    public static final String ACTION_PREFIX
    See Also:
    Constant Field Values

    services

    protected static final Map<String,WikittyService> services

    actions

    protected static final Map<String,WikittyPublicationAction> actions

    appConfig

    protected org.nuiton.util.ApplicationConfig appConfig

    req

    protected javax.servlet.http.HttpServletRequest req

    resp

    protected javax.servlet.http.HttpServletResponse resp

    wsContext

    protected String wsContext

    actionName

    protected String actionName

    path

    protected String path

    mandatoryArguments

    protected List<String> mandatoryArguments

    arguments

    protected Map<String,String> arguments

    argumentFiles

    protected Map<String,byte[]> argumentFiles

    proxy

    protected WikittyProxy proxy

    contentType

    protected String contentType
    Constructor Detail

    WikittyPublicationContext

    public WikittyPublicationContext(org.nuiton.util.ApplicationConfig appConfig)
    Method Detail

    addRequiredExtension

    protected void addRequiredExtension(WikittyService ws)
    add here all extension that WikittyService must know


    parse

    public void parse(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
    set attributes:
  • req
  • wsContext
  • actionName
  • mandatoryArguments
  • arguments

    Parameters:
    req -

  • getRequest

    public javax.servlet.http.HttpServletRequest getRequest()

    getResponse

    public javax.servlet.http.HttpServletResponse getResponse()

    getAppConfig

    public org.nuiton.util.ApplicationConfig getAppConfig()

    getActionName

    public String getActionName()
    le nom de l'action a faire

    Returns:

    getPath

    public String getPath()
    le reste de l'url apres l'action

    Returns:

    getWikittyProxy

    public WikittyProxy getWikittyProxy()

    makeUrl

    public String makeUrl(String url)
    add context to the url and parameter if necessary

    Parameters:
    url -
    Returns:

    getWikittyService

    public WikittyService getWikittyService()

    getMandatoryArguments

    public List<String> getMandatoryArguments()

    getArguments

    public Map<String,String> getArguments()

    getArgumentFiles

    public Map<String,byte[]> getArgumentFiles()

    getArgument

    public String getArgument(String name,
                              String defaultValue)

    getAction

    public WikittyPublicationAction getAction()

    getAction

    public <E extends WikittyPublicationAction> E getAction(Class<E> actionClass)

    getAction

    public WikittyPublicationAction getAction(String actionName)

    getContentType

    public String getContentType()

    setContentType

    public void setContentType(String contentType)

    toString

    public String toString()
    Overrides:
    toString in class Object


    Copyright © 2010-2011 CodeLutin. All Rights Reserved.