public class Admin
extends java.lang.Object
implements pserver.pservlets.PService
Constructor and Description |
---|
Admin()
Default Constructor without parameters that does nothing.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
changePropertiesForm(java.lang.String name,
java.lang.String password,
java.lang.String[] properties,
java.lang.String[] pValues)
Creates the HTML code for the form that contains the properties and their
values.
|
java.lang.String |
getMimeType()
Returns the mime type.
|
void |
init(java.lang.String[] params)
Initializes values for variables myName, administrator_name,
administrator_pass and checks the content of parameter params for null
value or content length different than 3.
|
java.lang.String |
loginForm(java.lang.String name,
java.lang.String password)
Creates the HTML Code of a log in form.
|
java.lang.String |
manageUsersForm(java.lang.String name,
java.lang.String password,
pserver.data.DBAccess dbAccess)
Creates the HTML code for showing PServer's clients stored in database.
|
java.lang.String |
propertiesDidNotSave(java.lang.String name,
java.lang.String password)
Creates the HTML code for not saving the properties.
|
java.lang.String |
propertiesSaved(java.lang.String name,
java.lang.String password)
Creates the HTML code for saving the properties.
|
int |
service(pserver.data.VectorMap parameters,
java.lang.StringBuffer response,
pserver.data.DBAccess dbAccess)
Creates a service for Administrator mode when a command is sent to
PServer.
|
java.lang.String |
showDbContent(java.lang.String name,
java.lang.String password)
Creates the HTML code for showing the contents of the database.
|
java.lang.String |
userAllreadyExist(java.lang.String name,
java.lang.String password)
Creates the HTML code when a client already exists in database.
|
java.lang.String |
userInserted(java.lang.String name,
java.lang.String password)
Creates the HTML code for successfully adding a new client to database.
|
public void init(java.lang.String[] params) throws java.lang.Exception
init
in interface pserver.pservlets.PService
params
- An array of strings containing the parameters.java.lang.Exception
- The general exception is produced when class loaded
with wrong parameters.public java.lang.String getMimeType()
getMimeType
in interface pserver.pservlets.PService
PService
.public int service(pserver.data.VectorMap parameters, java.lang.StringBuffer response, pserver.data.DBAccess dbAccess)
service
in interface pserver.pservlets.PService
parameters
- The parameters needed for this service.response
- The response string that is created.dbAccess
- The database manager.public java.lang.String loginForm(java.lang.String name, java.lang.String password)
name
- A string containing the log in name.password
- A string containing the log in password.public java.lang.String manageUsersForm(java.lang.String name, java.lang.String password, pserver.data.DBAccess dbAccess)
name
- A string containing the log in name.password
- A string containing the log in password.dbAccess
- The database manager.public java.lang.String userInserted(java.lang.String name, java.lang.String password)
name
- A string containing the log in name.password
- A string containing the log in password.public java.lang.String userAllreadyExist(java.lang.String name, java.lang.String password)
name
- A string containing the log in name.password
- A string containing the log in password.public java.lang.String showDbContent(java.lang.String name, java.lang.String password)
name
- A string containing the log in name.password
- A string containing the log in password.public java.lang.String changePropertiesForm(java.lang.String name, java.lang.String password, java.lang.String[] properties, java.lang.String[] pValues)
name
- A string containing the log in name.password
- A string containing the log in password.properties
- A array of strings containing the properties.pValues
- A array of strings containing the values of the properties
to be changed.public java.lang.String propertiesSaved(java.lang.String name, java.lang.String password)
name
- A string containing the log in name.password
- A string containing the log in password.public java.lang.String propertiesDidNotSave(java.lang.String name, java.lang.String password)
name
- A string containing the log in name.password
- A string containing the log in password.