| es.udc.mypersonalizer.kernel.controller.actions.DefaultAction es.udc.mypersonalizer.portal.controller.actions.personalization.ChangeServicePropertyAction
ChangeServicePropertyAction | public class ChangeServicePropertyAction extends DefaultAction (Code) | | This action performs an update on a ServiceProperty object, this is,
changes a given configuration for a service. It collects information
probably from a form in a JSP page. It calls the model action
called ChangeServicePropertyAction, which must be registered in
configuration. Because of a configuration change being able to provoke
a different request from a service when invoked, this action also
deletes the cached responses (if any) in the cache for this service.
It receives as a parameter a struts action form which must have been
populated with any fields susceptible of being changed, as may have been
defined in the metainformation for the concrete service. Note, nevertheless,
that it is not necessary that all fields in the metainformation be included
in the form.
It also needs to take the following parameters from the request:
- serviceIdentifier: The identifier for the service to which
the property being changed belongs.
- propertyIdentifier: The identifier (a number suitable to
fit into a Long object) of the property being changed.
- propertyUpdaterName: The name of the updater (see
es.udc.mypersonalizer.portal.model.wizards.PropertyUpdater )
which update method will be applied to the service property.
The action of this property updater establishes what is going to be
made to the property: add, update, delete... The value of this parameter
must coincide with one of the names for property updaters registered
in configuration.
- propertyStructureName: The identifier of the position
of the needed structure in the property's tree. Some examples:
- 0: Very used as a first stage for wizards, if we want
to act on the root property contents, being this root property
single-valued.
- 0.a.1: Which would mean we want to act on the values for
the second (number 1) value of the multi-valued property
ain the first value of the root property.
- previousPropertyStructureNames: This is a helper parameter,
which consists of a comma-separated list of the values that the
propertyStructureName parameter had in all previous steps
of a wizard, if this has more than one because of the existance of
multi-valued properties. This helps, when any update is made at a
particular level, to be able to get back to the correct
previous level in the wizard. An example:
- 0,0.a.1,0.a.1.x.0: We are at the fourth level of a
wizard, and the previous levels we visited referred to the
property structures 0, 0.a.1 and 0.a.1.x.0
- simplePropertyNames: A comma-separated list of all the names
of the fields entered from the form and which should make their way
to the repository.
- simplePropertyNamesNotToTrim: A subset of
simplePropertyNames, which is also a comma-separated list of
the fields which should not be trimmed (i.e. not removed
their heading and trailing spaces).
This action requires a Success forward, which will point, either
to, for example, the main page, or to the page responsible for the edition
of the previous level of a wizard. The second case will be the adequate
when this action is called as a result to the submission of data in the
second, third, etc. level of a wizard, so that the user is returned to
the previous level insted to the mainpage. This feature makes use of the
previousPropertyStructureNames parameter.
author: Daniel Fernandez since: 1.0 |
Methods inherited from es.udc.mypersonalizer.kernel.controller.actions.DefaultAction | abstract protected ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc) protected ActionForward doOnError(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Exception exception)(Code)(Java Doc) public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc)
|
|
|