7-Nov-03 (Created: 7-Nov-03) | More in 'Property file examples: AKC'

akc-users.properties

akc/users.properties


###################################
# CreateUserURL
###################################
CreateUserURL=aspire:\\reports\\users\\create-user.html
CreateUserURL.formHandlerName=createUserURLFormHandler
request.createUserURLFormHandler.form_handler.class_request.className=com.ai.htmlgen.DBHashTableFormHandler1

###################################
# CreateUser
###################################

request.CreateUser.classname=com.ai.db.DBPreTranslateArgsMultiRequestExecutor
request.CreateUser.db=reportsDB
request.CreateUser.query_type=update
request.CreateUser.request.1=RealCreateUser
request.CreateUser.request.2=CreateNewsFolder
request.CreateUser.request.3=CreateDefaultFolder

#
#Redirection
#
request.CreateUser.redirectURL=/akc
request.CreateUser.failureRedirectURL=/akc/servlet/DisplayServlet?url=CreateUserURL&fieldValues={fieldValues}&result=error

#
#createNewsFolder request
#
request.createNewsFolder.classname=com.ai.db.DBRequestExecutor2
request.createNewsFolder.query_type=update
request.createNewsFolder.db=reportsDB
request.createNewsFolder.stmt=\
	insert into folders \
	(folder_name,parent_folder_id,owner_user_id) \
	values ('News',null,{userIdTextBox.quote})
#
#createDefaultFolder request
#
request.createDefaultFolder.classname=com.ai.db.DBRequestExecutor2
request.createDefaultFolder.query_type=update
request.createDefaultFolder.db=reportsDB
request.createDefaultFolder.stmt=\
	insert into folders \
	(folder_name,parent_folder_id,owner_user_id) \
	values ('Default Folder',null,{userIdTextBox.quote})

#
#final request
#

request.RealCreateUser.classname=com.ai.db.DBRequestExecutor2
request.RealCreateUser.db=reportsDB
request.RealCreateUser.query_type=update
request.RealCreateUser.stmt=\
\
insert into users (user_id, password, first_name, last_name, email) \
values ({userIdTextBox.quote} \
	,{passwordTextBox.quote} \
	,{firstNameTextBox.quote} \
	,{lastNameTextBox.quote} \
	,{emailTextBox.quote} \
)


###################################
# ChangeUserURL
###################################
ChangeUserURL=aspire:\\reports\\users\\change-user.html
ChangeUserURL.formHandlerName=changeUserURLFormHandler
request.changeUserURLFormHandler.form_handler.class_request.className=com.ai.htmlgen.DBHashTableFormHandler1

request.changeUserURLFormHandler.mainDataRequest.classname=com.ai.db.DBRequestExecutor2
request.changeUserURLFormHandler.mainDataRequest.db=reportsDB
request.changeUserURLFormHandler.mainDataRequest.stmt=\
\
select password as passwordTextBox \
	,first_name as firstNameTextBox \
	,last_name as lastNameTextBox \
	,email as emailTextBox \
from users where user_id = {profile_user.quote}

###################################
# ChangeUser
###################################

request.ChangeUser.classname=com.ai.db.DBPreTranslateArgsMultiRequestExecutor
request.ChangeUser.db=reportsDB
request.ChangeUser.query_type=update
request.ChangeUser.request.1=RealChangeUser
request.ChangeUser.request.2=aspire.sessionSupport.newUserSessionLoader

request.RealChangeUser.classname=com.ai.db.DBRequestExecutor2
request.RealChangeUser.db=reportsDB
request.RealChangeUser.query_type=update
request.RealChangeUser.stmt=\
\
update users \
set password = {passwordTextBox.quote} \
	,first_name = {firstNameTextBox.quote} \
	,last_name = {lastNameTextBox.quote} \
	,email = {emailTextBox.quote} \
where user_id = {profile_user.quote}

request.ChangeUser.redirectURL=/akc/servlet/DisplayServlet?url=developersURL
request.ChangeUser.failureRedirectURL=/akc/servlet/DisplayServlet?url=ChangeUserURL&fieldValues={fieldValues}&result=error