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
75217b32
Commit
75217b32
authored
Apr 18, 2024
by
Sonawane Amol Madhjuar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
5ac0e298
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
0 deletions
+95
-0
Amol/Proteus_Lib_Jar/DocumentHandlerService.java
Amol/Proteus_Lib_Jar/DocumentHandlerService.java
+95
-0
No files found.
Amol/Proteus_Lib_Jar/DocumentHandlerService.java
0 → 100644
View file @
75217b32
package
ibase
.
webService
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.FormParam
;
import
javax.ws.rs.GET
;
import
javax.ws.rs.HeaderParam
;
import
javax.ws.rs.POST
;
import
javax.ws.rs.Path
;
import
javax.ws.rs.Produces
;
import
javax.ws.rs.QueryParam
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.MediaType
;
import
javax.ws.rs.core.Response
;
import
ibase.utility.BaseException
;
import
ibase.utility.BaseLogger
;
import
ibase.webitm.utility.DataServiceUtility
;
import
ibase.webitm.utility.DoumentHandlerUtility
;
@Path
(
"/DocumentHandlerService"
)
public
class
DocumentHandlerService
extends
RestAPIService
{
@GET
@Path
(
"/getAttachConfigData"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
//pass the parameter
public
Response
getAttachConfigData
(
@QueryParam
(
"OBJ_NAME"
)
String
objName
,
@QueryParam
(
"REF_SER"
)
String
refser
,
@QueryParam
(
"REF_ID"
)
String
refId
,
@QueryParam
(
"CHECK_OBJ_NAME"
)
String
checkObjName
,
@Context
HttpServletRequest
request
,
@HeaderParam
(
"TOKEN_ID"
)
String
tokenIDfromHeader
)
throws
BaseException
,
Exception
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"getAttachConfigData Service Called"
);
DoumentHandlerUtility
doumentHandlerUtility
=
new
DoumentHandlerUtility
();
byte
[]
response
=
doumentHandlerUtility
.
getAttachConfigData
(
objName
,
refser
,
refId
,
checkObjName
,
request
,
tokenIDfromHeader
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"response value :"
+
response
);
return
Response
.
status
(
200
).
entity
(
response
).
build
();
}
@GET
@Path
(
"/getFileConfigurationData"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
getFileConfigurationData
(
@QueryParam
(
"OBJ_NAME"
)
String
objName
,
@Context
HttpServletRequest
request
,
@HeaderParam
(
"TOKEN_ID"
)
String
tokenIDfromHeader
)
throws
BaseException
,
Exception
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"getAttachConfigData Service Called"
);
DoumentHandlerUtility
doumentHandlerUtility
=
new
DoumentHandlerUtility
();
String
response
=
doumentHandlerUtility
.
getFileConfigurationData
(
objName
,
request
,
tokenIDfromHeader
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"response value :"
+
response
);
return
Response
.
status
(
200
).
entity
(
response
).
build
();
}
@POST
@Path
(
"/getUploadDocument"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
getUploadDocument
(
@FormParam
(
"CAPTURE_IMAGE"
)
boolean
captureImage
,
@FormParam
(
"IMG_EXIST"
)
boolean
imgExist
,
@FormParam
(
"FILE_NAME"
)
String
fileName
,
@FormParam
(
"REF_SER"
)
String
refSer
,
@FormParam
(
"REF_ID"
)
String
refId
,
@FormParam
(
"OBJ_NAME"
)
String
objName
,
@FormParam
(
"DOCUMENT_TYPE"
)
String
documentType
,
@FormParam
(
"FILE_TYPE"
)
String
fileType
,
@FormParam
(
"DOC_LINK_OPT"
)
String
docLinkOpt
,
@FormParam
(
"FILE_METADATA"
)
String
fileMetadata
,
@FormParam
(
"DOC_META_DATA"
)
String
docMetaData
,
@FormParam
(
"REF_DESCR"
)
String
refDescr
,
@FormParam
(
"EXP_DATE"
)
String
expDate
,
@FormParam
(
"CACHE_OPT"
)
int
cacheOpt
,
@Context
HttpServletRequest
request
,
@HeaderParam
(
"TOKEN_ID"
)
String
tokenIDfromHeader
)
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"getUploadDocument Service Called"
);
DoumentHandlerUtility
doumentHandlerUtility
=
new
DoumentHandlerUtility
();
String
response
=
doumentHandlerUtility
.
getUploadDocument
(
captureImage
,
imgExist
,
fileName
,
refSer
,
refId
,
objName
,
documentType
,
fileType
,
docLinkOpt
,
fileMetadata
,
docMetaData
,
refDescr
,
expDate
,
cacheOpt
,
request
,
tokenIDfromHeader
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"response value :"
+
response
);
return
Response
.
status
(
200
).
entity
(
response
).
build
();
}
}
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