Commit 45768d4f authored by manohar's avatar manohar

filtering of win_name not having /ibase/ removed and obj_name set is win_name in such cases


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96727 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b63caa1b
...@@ -174,6 +174,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -174,6 +174,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
retTabSepStrBuff.append("</Header0>"); retTabSepStrBuff.append("</Header0>");
retTabSepStrBuff.append("</group0>"); retTabSepStrBuff.append("</group0>");
retTabSepStrBuff.append("</DocumentRoot>"); retTabSepStrBuff.append("</DocumentRoot>");
retTabSepStrBuff.append("\n");
resultString = retTabSepStrBuff.toString(); resultString = retTabSepStrBuff.toString();
} }
...@@ -283,6 +284,10 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -283,6 +284,10 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
tWinName = rs.getString("WIN_NAME"); tWinName = rs.getString("WIN_NAME");
tWinName = (tWinName==null?"":tWinName); tWinName = (tWinName==null?"":tWinName);
// 31/10/14 manoharan in case of BI / Crystal report uri will be specified so need to include all // 31/10/14 manoharan in case of BI / Crystal report uri will be specified so need to include all
if (tWinName == null || tWinName.trim().length() == 0 || "w_dummy".equals(tWinName.trim()))
{
continue;
}
//if (tWinName.indexOf("/ibase/") > -1) //if (tWinName.indexOf("/ibase/") > -1)
//{ //{
// continue; // continue;
...@@ -323,11 +328,11 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -323,11 +328,11 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
retTabSepStrBuff.append("<descr>").append("<![CDATA[" + (rs.getString("DESCR")==null?"":rs.getString("DESCR")) +"]]>").append("</descr>"); retTabSepStrBuff.append("<descr>").append("<![CDATA[" + (rs.getString("DESCR")==null?"":rs.getString("DESCR")) +"]]>").append("</descr>");
//RIGHTS //RIGHTS
//retTabSepStrBuff.append(rs.getString(9)==null?"":rs.getString(9)).append("\t"); //retTabSepStrBuff.append(rs.getString(9)==null?"":rs.getString(9)).append("\t");
retTabSepStrBuff.append("<rights>").append("<![CDATA[" + (rs.getString("RIGHTS")==null?" ":rs.getString("RIGHTS")) +"]]>").append("</rights>"); retTabSepStrBuff.append("<rights>").append("<![CDATA[" + (rs.getString("RIGHTS")==null?"":rs.getString("RIGHTS")) +"]]>").append("</rights>");
// Added by mahesh on 16-06-2014 // Added by mahesh on 16-06-2014
retTabSepStrBuff.append("<acc_filt>").append("<![CDATA[" + accFilt +"]]>").append("</acc_filt>"); retTabSepStrBuff.append("<acc_filt>").append("<![CDATA[" + (rs.getString("ACC_FILT")==null?"":rs.getString("ACC_FILT")) +"]]>").append("</acc_filt>");
retTabSepStrBuff.append("<def_filt>").append("<![CDATA[" + defFilt +"]]>").append("</def_filt>"); retTabSepStrBuff.append("<def_filt>").append("<![CDATA[" + (rs.getString("DEF_FILT")==null?"":rs.getString("DEF_FILT")) +"]]>").append("</def_filt>");
// End of code added by mahesh // End of code added by mahesh
//WIN_NAME //WIN_NAME
...@@ -338,14 +343,15 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -338,14 +343,15 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
//retTabSepStrBuff.append("\n"); //retTabSepStrBuff.append("\n");
retTabSepStrBuff.append("</Detail2>"); retTabSepStrBuff.append("</Detail2>");
retTabSepStrBuff.append("\n");
System.out.println("Key getdata function ["+key+"]"); //System.out.println("Key getdata function ["+key+"]");
System.out.println("rights in function ["+ rs.getString("RIGHTS") +"]"); //System.out.println("rights in function ["+ rs.getString("RIGHTS") +"]");
userRightsMap.put(key, rs.getString("RIGHTS")); //userRightsMap.put(key, rs.getString("RIGHTS"));
if(tWinName != null && tWinName.trim().length() > 2) //if(tWinName != null && tWinName.trim().length() > 2)
winNameMap.put(key, tWinName.trim().substring(2, tWinName.trim().length())); // winNameMap.put(key, tWinName.trim().substring(2, tWinName.trim().length()));
menuNameMap.put(key, tMenuName); //menuNameMap.put(key, tMenuName);
}//while }//while
rs.close(); rs.close();
rs = null; rs = null;
...@@ -1489,11 +1495,23 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -1489,11 +1495,23 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
//WIN_NAME //WIN_NAME
tWinName = rs.getString(7); tWinName = rs.getString(7);
if (tWinName == null || tWinName.trim().length() == 0 || "w_dummy".equals(tWinName.trim()))
{
continue;
}
userRightsMap.put(key, rs.getString(9)); userRightsMap.put(key, rs.getString(9));
if(tWinName != null && tWinName.trim().length() > 2) if(tWinName != null && tWinName.trim().length() > 2)
{
if (tWinName.indexOf("/ibase/") > -1)
{
winNameMap.put(key, tWinName.substring(tWinName.indexOf("/ibase/")));
}
else
{
winNameMap.put(key, tWinName.trim().substring(2, tWinName.trim().length())); winNameMap.put(key, tWinName.trim().substring(2, tWinName.trim().length()));
}
}
menuNameMap.put(key, tMenuName); menuNameMap.put(key, tMenuName);
}//while }//while
rs.close(); rs.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment