sunlabs.brazil.handler

Class PublishHandler

public class PublishHandler extends Object implements Handler

Handler for supporting publishing from Communicator. Launches an authentication handler to protect the content from malicious users.

Looks for PUT requests, and creates or modifies the content as indicated.

The following request properties are used:

prefix, suffix, glob, match
Specify the URL that triggers this handler. (See {@link MatchString}).
session
The the name of request property holding the session information to provide the credentials for posting. The default is "SessionID".

Version: 2.2, 06/11/13

Author: Stephen Uhler

Field Summary
StringpropsPrefix
Stringsession
Method Summary
booleaninit(Server server, String prefix)
Start up the authentication handler.
booleanrespond(Request request)
Make sure this is one of our "PUT" requests.

Field Detail

propsPrefix

public String propsPrefix

session

public String session

Method Detail

init

public boolean init(Server server, String prefix)
Start up the authentication handler.

respond

public boolean respond(Request request)
Make sure this is one of our "PUT" requests. Look up the credentials for this request. If no credentials are found, prompt the user for them. IF OK, save file to proper spot.