Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Component Sharing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gagandeep Singh Bhatia
Component Sharing
Commits
6fcb38f0
Commit
6fcb38f0
authored
Oct 01, 2024
by
Ajit Deshmukh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace mailingListIC.java
parent
844939ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
4 deletions
+53
-4
Task/Mailing List/Java component/mailingListIC.java
Task/Mailing List/Java component/mailingListIC.java
+53
-4
No files found.
Task/Mailing List/Java component/mailingListIC.java
View file @
6fcb38f0
package
ibase
.
webitm
.
ejb
.
wsfa
.
transactions
;
package
ibase
.
marketingCampaign
;
import
java.rmi.RemoteException
;
import
java.sql.Connection
;
import
java.sql.DriverManager
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Node
;
import
org.w3c.dom.NodeList
;
import
ibase.system.config.ConnDriver
;
import
ibase.utility.BaseLogger
;
import
ibase.utility.E12GenericUtility
;
import
ibase.webitm.ejb.ValidatorEJB
;
import
ibase.webitm.utility.ITMException
;
public
class
m
ailingListIC
extends
ValidatorEJB
{
public
class
M
ailingListIC
extends
ValidatorEJB
{
E12GenericUtility
genericUtility
=
new
E12GenericUtility
();
...
...
@@ -68,6 +72,7 @@ public class mailingListIC extends ValidatorEJB {
String
name
=
""
;
String
email_id
=
""
;
int
currentFormNo
=
0
;
ConnDriver
connDriver
=
new
ConnDriver
();
try
{
...
...
@@ -93,12 +98,13 @@ public class mailingListIC extends ValidatorEJB {
// Check for 'S' or 'P'
if
(
"S"
.
equalsIgnoreCase
(
mailListType
))
{
if
(
"S"
.
equalsIgnoreCase
(
mailListType
)
||
"D"
.
equalsIgnoreCase
(
mailListType
)
)
{
valueXmlString
.
append
(
"<sql_str protect='0'>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</sql_str>\r\n"
);
}
else
if
(
"P"
.
equalsIgnoreCase
(
mailListType
))
{
valueXmlString
.
append
(
"<sql_str protect='1'>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</sql_str>\r\n"
);
}
}
valueXmlString
.
append
(
"</Detail1>\r\n"
);
break
;
...
...
@@ -134,6 +140,37 @@ public class mailingListIC extends ValidatorEJB {
BaseLogger
.
log
(
"3"
,
null
,
null
,
"createProject >> XmlString :: ["
+
"SQL Exception while executing query."
+
"]"
);
}
}
else
if
(
"D"
.
equalsIgnoreCase
(
type
))
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"In dremio databse connection ["
+
sql
+
"]"
);
//Connection code for Dremio Database
try
{
conn
=
connDriver
.
getConnectDB
(
"APPVIS"
+
"_IN_MEM"
,
true
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Connected to Dremio!"
);
Statement
statement
=
conn
.
createStatement
();
ResultSet
resultSet
=
statement
.
executeQuery
(
sql
);
while
(
resultSet
.
next
())
{
System
.
out
.
println
(
resultSet
.
getString
(
1
));
}
resultSet
.
close
();
statement
.
close
();
conn
.
close
();
}
catch
(
SQLException
se
)
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Exception in Dremio Connection ["
+
E12GenericUtility
.
getStackTrace
(
se
)
+
"]"
);
throw
new
ITMException
(
se
);
}
}
}
valueXmlString
.
append
(
"</Detail2>\r\n"
);
break
;
...
...
@@ -241,7 +278,7 @@ public class mailingListIC extends ValidatorEJB {
NodeList
childNodeList
=
null
;
Node
parentNode
=
null
;
Node
childNode
=
null
;
Connection
conn
=
null
;
Connection
conn
=
null
;
String
childNodeName
=
null
;
String
errorString
=
""
;
String
userId
=
""
;
...
...
@@ -282,6 +319,18 @@ public class mailingListIC extends ValidatorEJB {
}
}
// String name = checkNull(genericUtility.getColumnValue("name", dom1));
// String Email = checkNull(genericUtility.getColumnValue("email_id", dom1));
// BaseLogger.log( "3", null, null, "[ value from form 2 name : ("+ name +") ]" );
// BaseLogger.log( "3", null, null, "[ value from form 2 Email : ("+ Email +") ]" );
//
// if(name == null || name.length() == 0 ) {
// errorString= getErrorString("name","VTPRCNCP",userId);
// }else if(Email == null || Email.length() == 0 )
// {
// errorString= getErrorString("Email","VTPRCNCP",userId);
// }
}
}
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment