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
95f76cd9
Commit
95f76cd9
authored
May 10, 2024
by
Sonawane Amol Madhjuar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
4acc7346
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
0 deletions
+120
-0
Amol/Proteus_Lib_Jar/getDocument/DocumentHandlerService.java
Amol/Proteus_Lib_Jar/getDocument/DocumentHandlerService.java
+120
-0
No files found.
Amol/Proteus_Lib_Jar/getDocument/DocumentHandlerService.java
0 → 100644
View file @
95f76cd9
package
ibase
.
webService
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.ws.rs.DefaultValue
;
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.DocumentHandlerServiceUtility
;
@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"
);
DocumentHandlerServiceUtility
DocumentHandlerServiceUtility
=
new
DocumentHandlerServiceUtility
();
byte
[]
response
=
DocumentHandlerServiceUtility
.
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"
);
DocumentHandlerServiceUtility
DocumentHandlerServiceUtility
=
new
DocumentHandlerServiceUtility
();
String
response
=
DocumentHandlerServiceUtility
.
getFileConfigurationData
(
objName
,
request
,
tokenIDfromHeader
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"response value :"
+
response
);
return
Response
.
status
(
200
).
entity
(
response
).
build
();
}
@POST
@Path
(
"/uploadDocument"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
uploadDocument
(
@FormParam
(
"CAPTURE_IMAGE"
)
String
captureImage
,
@FormParam
(
"IMG_EXIST"
)
String
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"
)
String
cacheOpt
,
@Context
HttpServletRequest
request
,
@HeaderParam
(
"TOKEN_ID"
)
String
tokenIDfromHeader
)
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"uploadDocument Service Called"
);
DocumentHandlerServiceUtility
DocumentHandlerServiceUtility
=
new
DocumentHandlerServiceUtility
();
String
response
=
DocumentHandlerServiceUtility
.
uploadDocument
(
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
();
}
@GET
@Path
(
"/getDocumentData"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
getDocumentData
(
@QueryParam
(
"OBJ_NAME"
)
String
objName
,
@QueryParam
(
"REF_ID"
)
String
refId
,
@DefaultValue
(
" "
)
@QueryParam
(
"REF_COL"
)
String
refcol
,
@QueryParam
(
"DATA_FORMAT"
)
String
dataFormat
,
@HeaderParam
(
"TOKEN_ID"
)
String
tokenIDfromHeader
)
throws
BaseException
,
Exception
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"getDocumentData Service Called"
);
DocumentHandlerServiceUtility
DocumentHandlerServiceUtility
=
new
DocumentHandlerServiceUtility
();
String
respOfData
=
DocumentHandlerServiceUtility
.
documentGetData
(
objName
,
refId
,
refcol
,
dataFormat
,
tokenIDfromHeader
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"response value :"
+
respOfData
);
return
Response
.
status
(
200
).
entity
(
respOfData
).
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