Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
synergy-api-util
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Raimbek Egemberdiev
synergy-api-util
Commits
76095495
Commit
76095495
authored
Jan 30, 2017
by
Raimbek Egemberdiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new types and services
parent
3db1986a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
0 deletions
+109
-0
src/main/java/kz/arta/synergy/api/pojo/PersonalRecordForm.java
...ain/java/kz/arta/synergy/api/pojo/PersonalRecordForm.java
+74
-0
src/main/java/kz/arta/synergy/api/services/PersonalRecordService.java
...a/kz/arta/synergy/api/services/PersonalRecordService.java
+35
-0
No files found.
src/main/java/kz/arta/synergy/api/pojo/PersonalRecordForm.java
0 → 100644
View file @
76095495
package
kz.arta.synergy.api.pojo
;
import
org.codehaus.jackson.annotate.JsonIgnoreProperties
;
import
org.codehaus.jackson.annotate.JsonProperty
;
/**
* @author raimbek
* @since 30.01.2017
*/
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
PersonalRecordForm
{
@JsonProperty
(
"form-uuid"
)
private
String
formUUID
;
private
String
formCode
;
private
String
name
;
private
String
editable
;
@JsonProperty
(
"data-uuid"
)
private
String
dataUuid
;
private
String
mandatory
;
public
String
getFormUUID
()
{
return
formUUID
;
}
public
void
setFormUUID
(
String
formUUID
)
{
this
.
formUUID
=
formUUID
;
}
public
String
getFormCode
()
{
return
formCode
;
}
public
void
setFormCode
(
String
formCode
)
{
this
.
formCode
=
formCode
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getEditable
()
{
return
editable
;
}
public
void
setEditable
(
String
editable
)
{
this
.
editable
=
editable
;
}
public
String
getDataUuid
()
{
return
dataUuid
;
}
public
void
setDataUuid
(
String
dataUuid
)
{
this
.
dataUuid
=
dataUuid
;
}
public
String
getMandatory
()
{
return
mandatory
;
}
public
void
setMandatory
(
String
mandatory
)
{
this
.
mandatory
=
mandatory
;
}
}
src/main/java/kz/arta/synergy/api/services/PersonalRecordService.java
0 → 100644
View file @
76095495
package
kz.arta.synergy.api.services
;
import
kz.arta.synergy.api.JsonUtils
;
import
kz.arta.synergy.api.Query
;
import
kz.arta.synergy.api.QueryContext
;
import
kz.arta.synergy.api.RestHttpQuery
;
import
kz.arta.synergy.api.pojo.PersonalRecordForm
;
import
kz.arta.synergy.api.pojo.SynergyUser
;
import
org.codehaus.jackson.type.TypeReference
;
import
java.io.IOException
;
import
java.util.List
;
/**
* @author raimbek
* @since 14.11.2016
*/
public
class
PersonalRecordService
{
private
final
RestHttpQuery
restHttpQuery
;
private
PersonalRecordService
(
QueryContext
context
)
{
this
.
restHttpQuery
=
new
RestHttpQuery
(
context
);
}
public
static
PersonalRecordService
newInstance
(
QueryContext
queryContext
)
{
return
new
PersonalRecordService
(
queryContext
);
}
public
List
<
PersonalRecordForm
>
getForms
(
String
userId
)
throws
IOException
{
Query
query
=
Query
.
newInstance
().
url
(
"/rest/api/personalrecord/forms/"
+
userId
);
String
result
=
restHttpQuery
.
doQuery
(
query
);
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
PersonalRecordForm
>>()
{});
}
}
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