Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
a9d0d9db
Commit
a9d0d9db
authored
Sep 11, 2019
by
Chamath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MarkAsRead web service added.
parent
23ae6698
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
73 additions
and
6 deletions
+73
-6
Message.xml
cmsWebApp/sql/Message.xml
+1
-1
Message.sql
cmsWebApp/sql/ms/Message.sql
+1
-1
Message.sql
cmsWebApp/sql/oracle/Message.sql
+1
-1
Message.sql
cmsWebApp/sql/postgres/Message.sql
+1
-1
BaseMessage.java
cmsWebApp/src/performa/orm/BaseMessage.java
+5
-1
Message.xml
cmsWebApp/src/performa/orm/Message.xml
+1
-1
BaseMarkAsReadWSFP.java
cmsWebApp/src/performa/ws/BaseMarkAsReadWSFP.java
+0
-0
MarkAsReadWSFP.java
cmsWebApp/src/performa/ws/MarkAsReadWSFP.java
+45
-0
MarkAsReadWSFP.xml
cmsWebApp/src/performa/ws/MarkAsReadWSFP.xml
+13
-0
GeneralConfig_performa.xml
...pp/webroot/extensions/performa/GeneralConfig_performa.xml
+5
-0
No files found.
cmsWebApp/sql/Message.xml
View file @
a9d0d9db
...
...
@@ -13,7 +13,7 @@
<column
name=
"is_read"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"sent_by"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"work_flow_message"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"job_application_id"
type=
"Long"
length=
"11"
nullable=
"
tru
e"
/>
<column
name=
"job_application_id"
type=
"Long"
length=
"11"
nullable=
"
fals
e"
/>
</NODE>
<NODE
name=
"INDEX"
factory=
"Participant"
class=
"oneit.sql.transfer.DefineIndexOperation"
tableName=
"tl_message"
indexName=
"idx_tl_message_job_application_id"
isUnique=
"false"
><column
name=
"job_application_id"
/></NODE>
...
...
cmsWebApp/sql/ms/Message.sql
View file @
a9d0d9db
...
...
@@ -13,7 +13,7 @@ CREATE TABLE tl_message (
is_read
char
(
1
)
NULL
,
sent_by
numeric
(
12
)
NULL
,
work_flow_message
numeric
(
12
)
NULL
,
job_application_id
numeric
(
12
)
NULL
job_application_id
numeric
(
12
)
N
OT
N
ULL
);
...
...
cmsWebApp/sql/oracle/Message.sql
View file @
a9d0d9db
...
...
@@ -14,7 +14,7 @@ CREATE TABLE tl_message (
is_read
char
(
1
)
NULL
,
sent_by
number
(
12
)
NULL
,
work_flow_message
number
(
12
)
NULL
,
job_application_id
number
(
12
)
NULL
job_application_id
number
(
12
)
N
OT
N
ULL
);
...
...
cmsWebApp/sql/postgres/Message.sql
View file @
a9d0d9db
...
...
@@ -14,7 +14,7 @@ CREATE TABLE tl_message (
is_read
char
(
1
)
NULL
,
sent_by
numeric
(
12
)
NULL
,
work_flow_message
numeric
(
12
)
NULL
,
job_application_id
numeric
(
12
)
NULL
job_application_id
numeric
(
12
)
N
OT
N
ULL
);
...
...
cmsWebApp/src/performa/orm/BaseMessage.java
View file @
a9d0d9db
...
...
@@ -184,7 +184,7 @@ public abstract class BaseMessage extends BaseBusinessClass
metaInfo
.
put
(
"backreferenceName"
,
"Messages"
);
metaInfo
.
put
(
"dbcol"
,
"job_application_id"
);
metaInfo
.
put
(
"mandatory"
,
"
fals
e"
);
metaInfo
.
put
(
"mandatory"
,
"
tru
e"
);
metaInfo
.
put
(
"name"
,
"JobApplication"
);
metaInfo
.
put
(
"type"
,
"JobApplication"
);
metaInfo
.
put
(
METADATA_DB_TABLENAME
,
"tl_message"
);
...
...
@@ -1030,6 +1030,8 @@ public abstract class BaseMessage extends BaseBusinessClass
*/
public
void
setJobApplication
(
JobApplication
newJobApplication
)
throws
StorageException
,
FieldException
{
BusinessObjectParser
.
assertFieldCondition
(
newJobApplication
!=
null
,
this
,
SINGLEREFERENCE_JobApplication
,
"mandatory"
);
if
(
_JobApplication
.
wouldReferencedChange
(
newJobApplication
))
{
assertValid
();
...
...
@@ -1453,6 +1455,8 @@ public abstract class BaseMessage extends BaseBusinessClass
super
.
validate
(
context
);
context
.
check
(
getJobApplicationID
()
!=
null
,
this
,
SINGLEREFERENCE_JobApplication
,
"mandatory"
);
}
...
...
cmsWebApp/src/performa/orm/Message.xml
View file @
a9d0d9db
...
...
@@ -16,7 +16,7 @@
<SINGLEREFERENCE
name=
"SentBy"
type=
"SecUser"
dbcol=
"sent_by"
/>
<SINGLEREFERENCE
name=
"WorkFlowMessage"
type=
"WorkFlowMessage"
dbcol=
"work_flow_message"
/>
<SINGLEREFERENCE
name=
"JobApplication"
type=
"JobApplication"
dbcol=
"job_application_id"
backreferenceName=
"Messages"
mandatory=
"
fals
e"
/>
<SINGLEREFERENCE
name=
"JobApplication"
type=
"JobApplication"
dbcol=
"job_application_id"
backreferenceName=
"Messages"
mandatory=
"
tru
e"
/>
</TABLE>
...
...
cmsWebApp/src/performa/ws/BaseMarkAsReadWSFP.java
0 → 100644
View file @
a9d0d9db
This diff is collapsed.
Click to expand it.
cmsWebApp/src/performa/ws/MarkAsReadWSFP.java
0 → 100644
View file @
a9d0d9db
package
performa
.
ws
;
import
java.util.*
;
import
oneit.appservices.ws.JSONServiceRequest
;
import
oneit.logging.*
;
import
oneit.objstore.*
;
import
oneit.utils.*
;
import
oneit.utils.parsers.FieldException
;
import
org.json.*
;
import
performa.orm.*
;
public
class
MarkAsReadWSFP
extends
BaseMarkAsReadWSFP
{
private
static
final
long
serialVersionUID
=
0L
;
public
static
LoggingArea
LOG
=
LoggingArea
.
createLoggingArea
(
"MarkAsReadWSFPLOG"
);
// This constructor should not be called
public
MarkAsReadWSFP
()
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public
void
processForm
(
JSONServiceRequest
request
,
ObjectTransaction
objTran
,
JSONObject
result
,
MultiException
exceptions
,
Set
<
BaseBusinessClass
>
createdBBCs
,
Set
<
BaseBusinessClass
>
updatedBBCs
)
throws
BusinessException
,
JSONException
{
JobApplication
jobApplication
=
getJobApplication
();
try
{
for
(
Message
message
:
jobApplication
.
getMessagesSet
())
{
message
.
setIsRead
(
Boolean
.
TRUE
);
}
}
catch
(
FieldException
ex
)
{
LogMgr
.
log
(
LOG
,
LogLevel
.
BUSINESS1
,
ex
,
"Failed to update as Read in MarkAsReadWSFP"
);
throw
new
BusinessException
(
"Failed to update as Read"
);
}
}
}
\ No newline at end of file
cmsWebApp/src/performa/ws/MarkAsReadWSFP.xml
0 → 100644
View file @
a9d0d9db
<?xml version="1.0" encoding="UTF-8"?>
<ROOT
xmlns:xsi=
'http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation=
'http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'
>
<BUSINESSCLASS
name=
'MarkAsReadWSFP'
package=
'performa.ws'
superclass=
'WebServicesFormProcessor'
>
<IMPORT
value=
"oneit.appservices.ws.services.*"
/>
<IMPORT
value=
"performa.orm.*"
/>
<TABLE
tablePrefix=
"object"
polymorphic=
"FALSE"
>
<SINGLEREFERENCE
name=
"JobApplication"
type=
"JobApplication"
mandatory=
"true"
/>
</TABLE>
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
cmsWebApp/webroot/extensions/performa/GeneralConfig_performa.xml
View file @
a9d0d9db
...
...
@@ -38,6 +38,7 @@
<NODE
name=
"SaveWebService::Performa"
>
<Privilege
name=
"performa.orm.MessageTemplate"
factory=
"String"
value=
"*"
/>
<Privilege
name=
"performa.orm.WorkFlowTemplate"
factory=
"String"
value=
"*"
/>
<Privilege
name=
"performa.orm.Message"
factory=
"String"
value=
"*"
/>
</NODE>
<NODE
name=
"JSONServices::Performa"
>
...
...
@@ -90,6 +91,10 @@
<INHERITS
nodename=
"SaveWebService::.*"
mandatory=
"false"
/>
</NODE>
<NODE
name=
"MarkAsRead"
factory=
"Participant"
class=
"oneit.appservices.ws.services.ORMFormProcessorService"
fpClass=
"performa.ws.MarkAsReadWSFP"
privilege=
"*"
>
<Overview>
This service will set all messages to read in given job application
</Overview>
</NODE>
<!-- Enum services -->
<NODE
name=
"ResponseAction"
factory=
"Participant"
class=
"oneit.appservices.ws.services.EnumJSONService"
enumClass=
"performa.orm.types.ResponseAction"
privilege=
"*"
/>
<NODE
name=
"StageType"
factory=
"Participant"
class=
"oneit.appservices.ws.services.EnumJSONService"
enumClass=
"performa.orm.types.StageType"
privilege=
"*"
/>
...
...
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