KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > projectmanagement > presentation > AuthorizationError


1 package projectmanagement.presentation;
2
3 import com.lutris.logging.*;
4 import com.lutris.appserver.server.httpPresentation.*;
5 import com.lutris.appserver.server.*;
6 import java.io.*;
7
8 /**
9  * Class to handle authorization errors.
10  *
11  * @author Sasa Bojanic
12  * @version 1.0
13  */

14 public class AuthorizationError implements HttpPresentation {
15
16    /**
17     * This implements the run method in HttpPresentation.
18     *
19     * @param HttpPresentationComms
20     * @exception HttpPresentationException
21     */

22    public void run(HttpPresentationComms comms)
23          throws HttpPresentationException {
24
25       AuthorizationErrorHTML page = new AuthorizationErrorHTML();
26       String JavaDoc aem="You either don't have appropriate authorization level "+
27          "to execute wanted action or your session data dissapeared!"+
28          "Please, log in with appropriate authorization so you can "+
29          "get access to the wanted action item.";
30       page.setTextLblAuthorizationErrorMessage(aem);
31
32       comms.response.writeDOM(page);
33    }
34 }
35
Popular Tags