Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\accessmanager\export_Objects.jsp
<% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %> <%@ page language="java"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Vector"%> <%@ page import="com.edeal.frontline.FlContext"%> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.ObjectsBean" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.SqlQuery" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); response.setHeader("Content-Disposition", "attachment;filename=objects.csv"); String strSeparator = ";"; String strDelimiter = "\""; String strMvaSeparator = "|"; String[] field ={"ObjSql", "ObjRoles", "ObjDefaultRead","ObjDefaultEdit","ObjDefaultCreate","ObjDefaultDelete", "ObjOwnerRead","ObjOwnerEdit","ObjOwnerCreate","ObjOwnerDelete", "ObjRolesRead","ObjRolesEdit","ObjRolesCreate","ObjRolesDelete"}; SqlQuery query = new SqlQuery(context, "Objects", field, null, null); //logger.debug(query.getSQL()); Vector vect = ObjectsBean.listSummary(context,field); for(int i = 0; i < vect.size(); i++) { Hashtable row = (Hashtable)vect.elementAt(i); //logger.debug(row); Vector line = new Vector(); line.addElement(row.get("ObjSql")); Vector roles = (Vector) row.get("ObjRoles"); if (roles == null) roles = new Vector(); Vector rolesRef = new Vector(); for (int j=0; j<roles.size();j++){ if (roles.elementAt(j) != null){ rolesRef.addElement(dico.getRefCode("ObjRoles",(String) roles.elementAt(j))); }else { rolesRef.addElement(""); } } line.addElement(Utils.implodeList(rolesRef,strMvaSeparator)); if (row.get("ObjDefaultRead") != null) { line.addElement(row.get("ObjDefaultRead")); }else { line.addElement("0"); } if (row.get("ObjDefaultEdit") != null) { line.addElement(row.get("ObjDefaultEdit")); }else { line.addElement("0"); } if (row.get("ObjDefaultCreate") != null) { line.addElement(row.get("ObjDefaultCreate")); }else { line.addElement("0"); } if (row.get("ObjDefaultDelete") != null) { line.addElement(row.get("ObjDefaultDelete")); }else { line.addElement("0"); } line.addElement(row.get("ObjOwnerRead")); line.addElement(row.get("ObjOwnerEdit")); line.addElement(row.get("ObjOwnerCreate")); line.addElement(row.get("ObjOwnerDelete")); Vector rolesRead = (Vector) row.get("ObjRolesRead"); if (rolesRead == null) rolesRead = new Vector(); line.addElement(Utils.implodeList(rolesRead,strMvaSeparator)); Vector rolesEdit = (Vector) row.get("ObjRolesEdit"); if (rolesEdit == null) rolesEdit = new Vector(); line.addElement(Utils.implodeList(rolesEdit,strMvaSeparator)); Vector rolesCreate = (Vector) row.get("ObjRolesCreate"); if (rolesCreate == null) rolesCreate = new Vector(); line.addElement(Utils.implodeList(rolesCreate,strMvaSeparator)); Vector rolesDelete = (Vector) row.get("ObjRolesDelete"); if (rolesDelete == null) rolesDelete = new Vector(); line.addElement(Utils.implodeList(rolesDelete,strMvaSeparator)); %><%= Utils.implodeList(line, strSeparator, strDelimiter) %> <% } %> <% /****************************************************************************** * CVS Log File - This is no longer maintained! * * Revision 1.1 2004/07/23 18:20:41 brian * Initial Revision * *****************************************************************************/ %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de