|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
it.eng.spagobi.services.IReportPluginServlet
public class IReportPluginServlet
A servlet used to manage the requests of the spagobi ireport plugin
Field Summary | |
---|---|
private java.lang.String |
ATTR_PATH_SYS_FUNCT
|
private java.util.List |
drivers
|
private int |
ERROR_CHECK_IN
|
private java.lang.String |
ERROR_CHECK_IN_MSG
|
private int |
ERROR_CHECK_OUT
|
private java.lang.String |
ERROR_CHECK_OUT_MSG
|
private int |
ERROR_CMS_FILE
|
private java.lang.String |
ERROR_CMS_FILE_MSG
|
private int |
FILENAME_PAR_NOT_FOUND
|
private java.lang.String |
FILENAME_PAR_NOT_FOUND_MSG
|
private int |
OP_PAR_NOT_FOUND
|
private java.lang.String |
OP_PAR_NOT_FOUND_MSG
|
private int |
PATH_PAR_NOT_FOUND
|
private java.lang.String |
PATH_PAR_NOT_FOUND_MSG
|
private int |
PWD_PAR_NOT_FOUND
|
private java.lang.String |
PWD_PAR_NOT_FOUND_MSG
|
private int |
TREE_GEN_ERROR
|
private java.lang.String |
TREE_GEN_ERROR_MSG
|
private int |
USER_NOT_AUTH
|
private java.lang.String |
USER_NOT_AUTH_MSG
|
private int |
USER_PAR_NOT_FOUND
|
private java.lang.String |
USER_PAR_NOT_FOUND_MSG
|
Constructor Summary | |
---|---|
IReportPluginServlet()
|
Method Summary | |
---|---|
private void |
addItemTree(java.lang.StringBuffer tree,
it.eng.spago.base.SourceBean dataTree,
java.util.List userRoles,
boolean isRoot,
boolean canDev)
Recursively analize all the xml nodes of the object tree and push all the not right objects |
private void |
checkinManager(java.util.Map mapPar,
java.io.OutputStream out)
Manage the checkin request |
private void |
checkoutManager(java.util.Map mapPar,
java.io.OutputStream out,
javax.servlet.http.HttpServletResponse response)
Manage the checkout request |
private java.lang.String |
createErrorMessage(int code,
java.lang.String error)
Create the xml evelope for the response message when an error occur |
private java.lang.String |
createResponseMessage(java.lang.String body)
Create the xml evelope for the response message when no errors occur |
private java.lang.String |
filterTree(it.eng.spago.base.SourceBean treeSB,
java.util.List userRoles)
Filter the object tree, base on the user roles, calling a recursive function. |
private void |
flushOut(java.lang.String message,
java.io.OutputStream out)
Flush out to the client the response message |
private java.util.Map |
getParameter(javax.servlet.http.HttpServletRequest request)
Retrive all parameter from the request and put them into a map. |
private java.util.List |
getRoles(java.lang.String username,
java.lang.String password)
Get the portal roles assigned to a user, if the user doesn't exist the role list is empty |
void |
init(javax.servlet.ServletConfig config)
Init method definition |
private void |
loginManager(java.util.Map mapPar,
java.io.OutputStream out)
Manage the login request, authenticate the user and send back the object tree or an error message |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Service method definition |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String ATTR_PATH_SYS_FUNCT
private final int OP_PAR_NOT_FOUND
private final int USER_PAR_NOT_FOUND
private final int PWD_PAR_NOT_FOUND
private final int USER_NOT_AUTH
private final int PATH_PAR_NOT_FOUND
private final int FILENAME_PAR_NOT_FOUND
private final int TREE_GEN_ERROR
private final int ERROR_CHECK_IN
private final int ERROR_CHECK_OUT
private final int ERROR_CMS_FILE
private final java.lang.String OP_PAR_NOT_FOUND_MSG
private final java.lang.String USER_PAR_NOT_FOUND_MSG
private final java.lang.String PWD_PAR_NOT_FOUND_MSG
private final java.lang.String USER_NOT_AUTH_MSG
private final java.lang.String PATH_PAR_NOT_FOUND_MSG
private final java.lang.String TREE_GEN_ERROR_MSG
private final java.lang.String ERROR_CHECK_IN_MSG
private final java.lang.String ERROR_CMS_FILE_MSG
private final java.lang.String FILENAME_PAR_NOT_FOUND_MSG
private final java.lang.String ERROR_CHECK_OUT_MSG
private java.util.List drivers
Constructor Detail |
---|
public IReportPluginServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
service
in class javax.servlet.http.HttpServlet
request
- The http servlet requestresponse
- The http servlet response
java.io.IOException
- If any exception occurred
javax.servlet.ServletException
private void checkoutManager(java.util.Map mapPar, java.io.OutputStream out, javax.servlet.http.HttpServletResponse response)
mapPar
- request parametersout
- buffer outputresponse
- http responseprivate void checkinManager(java.util.Map mapPar, java.io.OutputStream out)
mapPar
- map of the request parametersout
- buffer outputprivate void loginManager(java.util.Map mapPar, java.io.OutputStream out)
mapPar
- map of the request parameterout
- output bufferprivate java.lang.String filterTree(it.eng.spago.base.SourceBean treeSB, java.util.List userRoles)
treeSB
- Sourcebean that contains the object tree xml formatuserRoles
- list of the user roles
private void addItemTree(java.lang.StringBuffer tree, it.eng.spago.base.SourceBean dataTree, java.util.List userRoles, boolean isRoot, boolean canDev)
tree
- StringBufferdataTree
- userRoles
- isRoot
- canDev
- private java.util.List getRoles(java.lang.String username, java.lang.String password)
username
- username of the userpassword
- password of the user
private java.util.Map getParameter(javax.servlet.http.HttpServletRequest request)
request
- http request
private java.lang.String createResponseMessage(java.lang.String body)
body
- body of the response message
private java.lang.String createErrorMessage(int code, java.lang.String error)
code
- numeric code of the errorerror
- message of the error
private void flushOut(java.lang.String message, java.io.OutputStream out)
message
- message that will be sent to the clientout
- OutputStream to flush out
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |