View Javadoc
1   /******************************************************************************
2    * SystemSetupForm.java - A bean to wrap the System in a form friendly package
3    * 
4    * PicMan - The BuckoSoft Picture Manager in Java
5    * Copyright(c) 2005 - Dick Balaska
6    * 
7    */
8   package com.buckosoft.PicMan.web;
9   
10  import com.buckosoft.BSAccount.web.BSAccountUserWebSession;
11  import com.buckosoft.PicMan.domain.System;
12  
13  /** A bean to wrap the System in a form friendly package.
14   * @author Dick Balaska
15   * @since 2005/07/27
16   */
17  public class SystemSetupForm {
18  
19  	private	System			system;
20  	private	BSAccountUserWebSession	userWebSession;
21  	private	String		message = "";
22  	private	String		errorMessage;
23  	private	boolean		clickedDeleteCache = false;
24  	private	boolean		deleteCacheConfirmed = false;
25  	private	String		dbUrl;
26  	private	String		dbUser;
27  
28  	public SystemSetupForm() {
29  	}
30  
31  	public	BSAccountUserWebSession	getUserWebSession() { return(userWebSession); }
32  	public	void		setUserWebSession(BSAccountUserWebSession us) { userWebSession = us; }
33  
34  	public System		getSystem() { return(system); }
35  	/** Set the reference to the PicMan System config.
36  	 * @param system The System loaded from the database.
37  	 */
38  	public void			setSystem(System system) { this.system = system; }
39  
40  	/** If the Form Controller wants to display a message to the user, it will be here.
41  	 * @return the message
42  	 */
43  	public String getMessage() {
44  		return message;
45  	}
46  
47  	/** Set any message that is to be displayed to the user in the System Setup page
48  	 * @param message the message to set
49  	 */
50  	public void setMessage(String message) {
51  		this.message = message;
52  	}
53  
54  	/** If the Form Controller wants to display an error to the user, it will be here.
55  	 * @return the errorMessage
56  	 */
57  	public String getErrorMessage() {
58  		return errorMessage;
59  	}
60  
61  	/** Set any error message that is to be displayed to the user in the System Setup page.
62  	 * @param errorMessage the errorMessage to set
63  	 */
64  	public void setErrorMessage(String errorMessage) {
65  		this.errorMessage = errorMessage;
66  	}
67  
68  	/** Did the user click on the Delete Cache link?
69  	 * If so, then display the "Are you sure?" page
70  	 * @return the clickedDeleteCache
71  	 */
72  	public boolean isClickedDeleteCache() {
73  		return clickedDeleteCache;
74  	}
75  
76  	/** Set this if the user clicks the Delete Cache link
77  	 * @param clickedDeleteCache the clickedDeleteCache to set
78  	 */
79  	public void setClickedDeleteCache(boolean clickedDeleteCache) {
80  		this.clickedDeleteCache = clickedDeleteCache;
81  	}
82  
83  	/** Did the User submit on the Are You Sure page?
84  	 * @return the deleteCacheConfirmed
85  	 */
86  	public boolean isDeleteCacheConfirmed() {
87  		return deleteCacheConfirmed;
88  	}
89  
90  	/** Set this in the "Are You Sure" page, if the user submits, then this will be true.
91  	 * @param deleteCacheConfirmed the deleteCacheConfirmed to set
92  	 */
93  	public void setDeleteCacheConfirmed(boolean deleteCacheConfirmed) {
94  		this.deleteCacheConfirmed = deleteCacheConfirmed;
95  	}
96  
97  	/**
98  	 * @return the dbUrl
99  	 */
100 	public String getDbUrl() {
101 		return dbUrl;
102 	}
103 
104 	/**
105 	 * @param dbUrl the dbUrl to set
106 	 */
107 	public void setDbUrl(String dbUrl) {
108 		this.dbUrl = dbUrl;
109 	}
110 
111 	/**
112 	 * @return the dbUser
113 	 */
114 	public String getDbUser() {
115 		return dbUser;
116 	}
117 
118 	/**
119 	 * @param dbUser the dbUser to set
120 	 */
121 	public void setDbUser(String dbUser) {
122 		this.dbUser = dbUser;
123 	}
124 }