Klasse IntakeTool

java.lang.Object
org.apache.turbine.services.intake.IntakeTool
Alle implementierten Schnittstellen:
org.apache.fulcrum.pool.Recyclable, ApplicationTool

public class IntakeTool extends Object implements ApplicationTool, org.apache.fulcrum.pool.Recyclable
The main class through which Intake is accessed. Provides easy access to the Fulcrum Intake component.
Version:
$Id$
Autor:
John D. McNally, Henning P. Schmiedehausen, Quinton McCombs, Eric Pugh
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Klasse
    Beschreibung
    class 
    Inner class to present a nice interface to the template designer
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final String
    Constant for default key
    protected HashMap<String,org.apache.fulcrum.intake.model.Group>
    Groups from intake.xml
    static final String
    Constant for the hidden fieldname
    protected org.apache.fulcrum.intake.IntakeService
    The Intake service.
    protected static final org.apache.logging.log4j.Logger
    Used for logging
    protected org.apache.fulcrum.parser.ValueParser
    ValueParser instance
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Constructor
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    addGroupsToParameters(org.apache.fulcrum.parser.ValueParser vp)
    Add all registered group ids to the value parser
    declareGroup(org.apache.fulcrum.intake.model.Group group)
    A convenience method to write out the hidden form fields that notify intake of the group.
    void
    declareGroup(org.apache.fulcrum.intake.model.Group group, StringBuilder sb)
    xhtml valid hidden input field(s) that notifies intake of the group's presence.
    A convenience method to write out the hidden form fields that notify intake of the relevant groups.
    void
    Disposes the object after use.
    get(String groupName)
    get a specific group
    get(String groupName, boolean throwExceptions)
    Get a specific group
    org.apache.fulcrum.intake.model.Group
    get(String groupName, String key)
    Get a specific group by name and key.
    org.apache.fulcrum.intake.model.Group
    get(String groupName, String key, boolean create)
    Get a specific group by name and key.
    Map<String,org.apache.fulcrum.intake.model.Group>
    Get a Map containing all the groups.
    void
    init(Object runData)
    Prepares intake for a single request
    boolean
    Loops through all of the Groups and checks to see if the data within the Group is valid.
    boolean
    Checks whether the recyclable has been disposed.
    void
    Declare that a new form starts
    void
    Recycles the object for a new client.
    void
    Implementation of ApplicationTool interface is not needed for this tool as it is request scoped
    void
    remove(org.apache.fulcrum.intake.model.Group group)
    Removes group.
    void
    Removes all groups.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • log

      protected static final org.apache.logging.log4j.Logger log
      Used for logging
    • DEFAULT_KEY

      public static final String DEFAULT_KEY
      Constant for default key
      Siehe auch:
    • INTAKE_GRP

      public static final String INTAKE_GRP
      Constant for the hidden fieldname
      Siehe auch:
    • groups

      protected HashMap<String,org.apache.fulcrum.intake.model.Group> groups
      Groups from intake.xml
    • pp

      protected org.apache.fulcrum.parser.ValueParser pp
      ValueParser instance
    • intakeService

      protected org.apache.fulcrum.intake.IntakeService intakeService
      The Intake service.
  • Konstruktordetails

  • Methodendetails

    • init

      public void init(Object runData)
      Prepares intake for a single request
      Angegeben von:
      init in Schnittstelle ApplicationTool
      Parameter:
      runData - initialization data
    • addGroupsToParameters

      public void addGroupsToParameters(org.apache.fulcrum.parser.ValueParser vp)
      Add all registered group ids to the value parser
      Parameter:
      vp - the value parser
    • declareGroups

      A convenience method to write out the hidden form fields that notify intake of the relevant groups. It should be used only in templates with 1 form. In multiform templates, the groups that are relevant for each form need to be declared using $intake.newForm() and $intake.declareGroup($group) for the relevant groups in the form.
      Gibt zurück:
      the HTML that declares all groups to Intake in hidden input fields
    • declareGroup

      public String declareGroup(org.apache.fulcrum.intake.model.Group group)
      A convenience method to write out the hidden form fields that notify intake of the group.
      Parameter:
      group - the group to declare
      Gibt zurück:
      the HTML that declares the group to Intake in a hidden input field
    • declareGroup

      public void declareGroup(org.apache.fulcrum.intake.model.Group group, StringBuilder sb)
      xhtml valid hidden input field(s) that notifies intake of the group's presence.
      Parameter:
      group - the group to declare
      sb - a String Builder where the hidden field HTML will be appended
    • newForm

      public void newForm()
      Declare that a new form starts
    • refresh

      public void refresh()
      Implementation of ApplicationTool interface is not needed for this tool as it is request scoped
      Angegeben von:
      refresh in Schnittstelle ApplicationTool
    • get

      public IntakeTool.PullHelper get(String groupName)
      get a specific group
      Parameter:
      groupName - the name of the group
      Gibt zurück:
      a IntakeTool.PullHelper wrapper around the group
    • get

      public IntakeTool.PullHelper get(String groupName, boolean throwExceptions) throws org.apache.fulcrum.intake.IntakeException
      Get a specific group
      Parameter:
      groupName - the name of the group
      throwExceptions - if false, exceptions will be suppressed.
      Gibt zurück:
      a IntakeTool.PullHelper wrapper around the group
      Löst aus:
      org.apache.fulcrum.intake.IntakeException - could not retrieve group
    • isAllValid

      public boolean isAllValid()
      Loops through all of the Groups and checks to see if the data within the Group is valid.
      Gibt zurück:
      true if all groups are valid
    • get

      public org.apache.fulcrum.intake.model.Group get(String groupName, String key) throws org.apache.fulcrum.intake.IntakeException
      Get a specific group by name and key.
      Parameter:
      groupName - the name of the group
      key - the key for the group
      Gibt zurück:
      the Group
      Löst aus:
      org.apache.fulcrum.intake.IntakeException - if the group could not be retrieved
    • get

      public org.apache.fulcrum.intake.model.Group get(String groupName, String key, boolean create) throws org.apache.fulcrum.intake.IntakeException
      Get a specific group by name and key. Also specify whether or not you want to create a new group.
      Parameter:
      groupName - the name of the group
      key - the key for the group
      create - true if a new group should be created
      Gibt zurück:
      the Group
      Löst aus:
      org.apache.fulcrum.intake.IntakeException - if the group could not be retrieved
    • remove

      public void remove(org.apache.fulcrum.intake.model.Group group)
      Removes group. Primary use is to remove a group that has been processed by an action and is no longer appropriate in the view (screen).
      Parameter:
      group - the group instance to remove
    • removeAll

      public void removeAll()
      Removes all groups. Primary use is to remove groups that have been processed by an action and are no longer appropriate in the view (screen).
    • getGroups

      public Map<String,org.apache.fulcrum.intake.model.Group> getGroups()
      Get a Map containing all the groups.
      Gibt zurück:
      the Group Map
    • recycle

      public void recycle()
      Recycles the object for a new client. Recycle methods with parameters must be added to implementing object and they will be automatically called by pool implementations when the object is taken from the pool for a new client. The parameters must correspond to the parameters of the constructors of the object. For new objects, constructors can call their corresponding recycle methods whenever applicable. The recycle methods must call their super.
      Angegeben von:
      recycle in Schnittstelle org.apache.fulcrum.pool.Recyclable
    • dispose

      public void dispose()
      Disposes the object after use. The method is called when the object is returned to its pool. The dispose method must call its super.
      Angegeben von:
      dispose in Schnittstelle org.apache.fulcrum.pool.Recyclable
    • isDisposed

      public boolean isDisposed()
      Checks whether the recyclable has been disposed.
      Angegeben von:
      isDisposed in Schnittstelle org.apache.fulcrum.pool.Recyclable
      Gibt zurück:
      true, if the recyclable is disposed.