    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.contrib.PasswordEditor

    java.lang.Object
       |
       +----w3c.tools.store.AttributeHolder
               |
               +----w3c.tools.store.Resource
                       |
                       +----w3c.jigsaw.resources.HTTPResource
                               |
                               +----w3c.jigsaw.resources.FilteredResource
                                       |
                                       +----w3c.jigsaw.resources.FileResource
                                               |
                                               +----w3c.jigsaw.forms.PostableResource
                                                       |
                                                       +----w3c.jigsaw.contrib.PasswordEditor

public class PasswordEditor
extends PostableResource

A resource that allows you to change your password. This resource should be suitably protected when installed, of course.

##

ATTR_REALM
  Attribute index - The name of the realm to edit.

##

PasswordEditor()
  Empty constructor for dynamic instantiation.

##

changePassword(String, String, String)
generateForm()
generateForm(String)
get(Request)
  Handle a get request on the password editor.
getRealm()
  Get the name of the realm to edit.
handle(Request, URLDecoder)
  Handle a post request.

##

ATTR_REALM

      protected static int ATTR_REALM

  Attribute index - The name of the realm to edit.

##

PasswordEditor

      public PasswordEditor()

  Empty constructor for dynamic instantiation.

##

getRealm

      public String getRealm()

  Get the name of the realm to edit.
  Returns:
    The name of the realm to edit, as a String.

changePassword

      protected synchronized boolean changePassword(String username,
                                                    String oldpassword,
                                                    String newpassword)

generateForm

      protected HtmlGenerator generateForm(String msg)

generateForm

      protected final HtmlGenerator generateForm()

get

      public Reply get(Request request)

  Handle a get request on the password editor. Dump a form suitable for editing a user entry.
  Parameters:
    request - The request to handle.
  Returns:
    An HTTP Reply instance.
  Overrides:
    get in class PostableResource

handle

      public Reply handle(Request request,
                          URLDecoder data)

  Handle a post request. Do change the password, when possible.
  Parameters:
    request - The request to handle.
    data - The form decoded data.
  Returns:
    An HTTP Reply instance.
  Overrides:
    handle in class PostableResource

    All Packages  Class Hierarchy  This Package  Previous  Next  Index