Class w3c.jigsaw.config.FormPropertiesEditor
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.config.FormPropertiesEditor

java.lang.Object
   |
   +----w3c.jigsaw.resources.AttributeHolder
           |
           +----w3c.jigsaw.resources.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----w3c.jigsaw.resources.ContainerResource
                                   |
                                   +----w3c.jigsaw.resources.FilteredResource
                                           |
                                           +----w3c.jigsaw.resources.FileResource
                                                   |
                                                   +----w3c.jigsaw.forms.PostableResource
                                                           |
                                                           +----w3c.jigsaw.forms.FormResource
                                                                   |
                                                                   +----w3c.jigsaw.config.FormPropertiesEditor

public class FormPropertiesEditor
extends FormResource
Form based editor for the server properties. This is likely to change in future versions of Jigsaw: right now the set of editable properties is hard-coded, there should be a way of registering new property sets, but it is not that easy since you may want to edit properties before the resources that uses them are loaded.

I will stay with this simple model until I found something more suitable. Next versions will probably uses resources instead of properties.


Variable Index

 o ATTR_HELPURL
Attribute index - The property help page.
 o handler
Our form card handler (shared among all cards).
 o needs_restart
Does the server needs restart.
 o needs_save
Does the properties needs savings.

Constructor Index

 o FormPropertiesEditor()

Method Index

 o changeProperty(String, Object)
Change the value of a property.
 o defineCards()
Define the form card to edit server properties.
 o defineClientCard()
Define the client properties card.
 o defineGeneralCard()
The general card handles the general settings of the server.
 o defineLoggingCard()
The logging card.
 o defineShufflerCard()
The shuffler properties.
 o dumpHeader(HtmlGenerator)
Dump the form header:
 o get(Request)
We overide GET to handle the additional commands.
 o getHelpURL()
Get the help URL for the given property.
 o getHelpURL(String)
 o initialize(Object[])
Initialize the form based properties editor.
 o needsRestart()
Does the server needs a restart due to some property changes.
 o needsSave()
Does the properties need to be saved.
 o runCommand(Request, String)
Run the given command.
 o saveProperties(Request)
Save edited our properties.

Variables

 o ATTR_HELPURL
  protected static int ATTR_HELPURL
Attribute index - The property help page.
 o handler
  protected PropertiesHandler handler
Our form card handler (shared among all cards).
 o needs_restart
  protected boolean needs_restart
Does the server needs restart.
 o needs_save
  protected boolean needs_save
Does the properties needs savings.

Constructors

 o FormPropertiesEditor
  public FormPropertiesEditor()

Methods

 o getHelpURL
  public String getHelpURL()
Get the help URL for the given property.
Returns:
A help URL, or null.
 o getHelpURL
  public String getHelpURL(String prop)
 o needsRestart
  public boolean needsRestart()
Does the server needs a restart due to some property changes.
 o needsSave
  public boolean needsSave()
Does the properties need to be saved.
 o changeProperty
  public void changeProperty(String name,
                             Object value) throws FormFieldException
Change the value of a property. The callback for the form card handler.
Parameters:
name - The name of the property.
value - Its new value.
 o saveProperties
  protected Reply saveProperties(Request request) throws HTTPException
Save edited our properties.
Parameters:
request - The request that triggered the save.
Throws: HTTPException
If saving the properties failed.
 o runCommand
  public Reply runCommand(Request request,
                          String command) throws HTTPException
Run the given command.
Parameters:
request - The request to be processed.
command - The command to run.
Throws: HTTPException
If processing the command failed.
 o dumpHeader
  public void dumpHeader(HtmlGenerator into)
Dump the form header:
Overrides:
dumpHeader in class FormResource
 o get
  public Reply get(Request request) throws HTTPException
We overide GET to handle the additional commands.
Parameters:
request - The request to handle.
HTTPException - If the command isn't understood, or if it fails.
Overrides:
get in class FormResource
 o defineGeneralCard
  protected void defineGeneralCard()
The general card handles the general settings of the server.
 o defineClientCard
  protected void defineClientCard()
Define the client properties card.
 o defineLoggingCard
  protected void defineLoggingCard()
The logging card.
 o defineShufflerCard
  protected void defineShufflerCard()
The shuffler properties.
 o defineCards
  protected void defineCards()
Define the form card to edit server properties.
 o initialize
  public void initialize(Object values[])
Initialize the form based properties editor.
Overrides:
initialize in class FormResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index