akc/report-filing.properties
Demonstrates JSP specification.
###################################
# ShowFiledReportsViewJSPURL
###################################
ShowFiledReportsViewJSPURL=/reports/report-filing/reports-summary-view.jsp
ShowFiledReportsViewJSPURL.transformType=JSP
request.ShowFiledReportsViewJSPURL.transform.className=com.ai.jsp.JSPTransform
ShowFiledReportsViewJSPURL.formHandlerName=ShowFiledReportsViewURLFormHandler
#
#Data definition
#
request.ShowFiledReportsViewURLFormHandler.form_handler.class_request.className=com.ai.htmlgen.DBHashTableFormHandler1
ShowFiledReportsViewURLFormHandler.loopNames=FoldersLoop1
#
#Maindata request
#
request.ShowFiledReportsViewURLFormHandler.maindataRequest.classname=com.ai.db.DBRequestExecutor2
request.ShowFiledReportsViewURLFormHandler.maindataRequest.db=reportsDB
request.ShowFiledReportsViewURLFormHandler.maindataRequest.stmt=\
\
select first_name as user_first_name \
,last_name as user_last_name \
,email as user_email \
from users \
where user_id = {ownerUserId.quote}
#first primary loop
request.ShowFiledReportsViewURLFormHandler.FoldersLoop1.class_request.className=com.ai.htmlgen.GenericTableHandler6
request.ShowFiledReportsViewURLFormHandler.FoldersLoop1.loopNames=itemsLoop
request.ShowFiledReportsViewURLFormHandler.FoldersLoop1.query_request.className=com.ai.db.DBRequestExecutor2
request.ShowFiledReportsViewURLFormHandler.FoldersLoop1.query_request.db=reportsDB
request.ShowFiledReportsViewURLFormHandler.FoldersLoop1.query_request.stmt=\
select * from folders \
where 1=1 \
and parent_folder_id is null \
and public = 'Y' \
and owner_user_id = {ownerUserId.quote} \
order by folder_name
###################################
# ShowFiledReportsJSPURL
###################################
ShowFiledReportsJSPURL=/reports/report-filing/reports-summary.jsp
ShowFiledReportsJSPURL.transformType=JSP
request.ShowFiledReportsJSPURL.transform.className=com.ai.jsp.JSPTransform
ShowFiledReportsJSPURL.formHandlerName=ShowFiledReportsURLFormHandler
###################################
# ShowFiledReportsURL
###################################
ShowFiledReportsURL=aspire:\\reports\\report-filing\\reports-summary.html
ShowFiledReportsURL.formHandlerName=ShowFiledReportsURLFormHandler
###################################
# Reusable data for the above 2 URLS
###################################
request.ShowFiledReportsURLFormHandler.form_handler.class_request.className=com.ai.htmlgen.DBHashTableFormHandler1
ShowFiledReportsURLFormHandler.loopNames=FoldersLoop,NonFiledReportsLoop,FoldersLoop1
#List of folders to move
request.ShowFiledReportsURLFormHandler.FoldersLoop.class_request.className=com.ai.htmlgen.GenericTableHandler6
request.ShowFiledReportsURLFormHandler.FoldersLoop.query_request.className=com.ai.db.DBRequestExecutor2
request.ShowFiledReportsURLFormHandler.FoldersLoop.query_request.db=reportsDB
request.ShowFiledReportsURLFormHandler.FoldersLoop.query_request.stmt=\
select * \
from folders \
where 1=1 \
and parent_folder_id is null \
and owner_user_id = {profile_user.quote} \
order by folder_name
#first primary loop
request.ShowFiledReportsURLFormHandler.FoldersLoop1.class_request.className=com.ai.htmlgen.GenericTableHandler6
request.ShowFiledReportsURLFormHandler.FoldersLoop1.loopNames=itemsLoop
request.ShowFiledReportsURLFormHandler.FoldersLoop1.query_request.className=com.ai.db.DBRequestExecutor2
request.ShowFiledReportsURLFormHandler.FoldersLoop1.query_request.db=reportsDB
request.ShowFiledReportsURLFormHandler.FoldersLoop1.query_request.stmt=\
select * \
from folders \
where 1=1 \
and parent_folder_id is null \
and owner_user_id = {profile_user.quote} \
order by folder_name
#Child loop 1
request.itemsLoop.class_request.classname=com.ai.htmlgen.GenericTableHandler6
request.itemsLoop.query_request.classname=com.ai.db.DBRequestExecutor2
request.itemsLoop.query_request.db=reportsDB
request.itemsLoop.query_request.stmt=\
select * from filed_items fi, reports r \
where 1=1 \
and fi.item_id = r.report_id \
and fi.folder_id = {folder_id} \
order by r.report_short_name
#Reports that are not filed so far: Deprecated
request.ShowFiledReportsURLFormHandler.NonFiledReportsLoop.class_request.className=com.ai.htmlgen.GenericTableHandler6
request.ShowFiledReportsURLFormHandler.NonFiledReportsLoop.query_request.className=com.ai.db.DBRequestExecutor2
request.ShowFiledReportsURLFormHandler.NonFiledReportsLoop.query_request.db=reportsDB
request.ShowFiledReportsURLFormHandler.NonFiledReportsLoop.query_request.stmt=\
select * from reports \
where 1=1 \
and report_id not in (select distinct item_id from filed_items) \
order by report_short_name
###################################
# Create folder update request
###################################
request.createFolder.classname=com.ai.db.DBRequestExecutor2
request.createFolder.query_type=update
request.createFolder.db=reportsDB
request.createFolder.stmt=\
insert into folders \
(folder_name,parent_folder_id,owner_user_id) \
values ({folderName.quote},null,{profile_user.quote})
request.createFolder.redirectURL=/akc/servlet/DisplayServlet?url=ShowFiledReportsJSPURL
###################################
# Move to folder: folderId, reports
###################################
request.MoveReports.classname=com.ai.db.DBRequestExecutor2
request.MoveReports.query_type=update
request.MoveReports.db=reportsDB
request.MoveReports.stmt=\
update filed_items \
set folder_id = {folderId} \
where item_id in ({reportIds})
request.MoveReports.redirectURL=/akc/servlet/DisplayServlet?url=ShowFiledReportsJSPURL
###################################
# SetFolderAccess
###################################
request.SetFolderAccess.classname=com.ai.db.DBRequestExecutor2
request.SetFolderAccess.query_type=update
request.SetFolderAccess.db=reportsDB
request.SetFolderAccess.stmt=\
update folders \
set public = {access.quote} \
where folder_id = {folderId}
request.SetFolderAccess.redirectURL=/akc/servlet/DisplayServlet?url=ShowFiledReportsJSPURL&openFolderName={openFolderName}