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
9bdab9d6
Commit
9bdab9d6
authored
Nov 15, 2016
by
Raimbek Egemberdiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
рефакторинг, истребление вызовов на SynergyClientBean
parent
ed7802ac
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
3 deletions
+38
-3
src/main/java/kz/arta/synergy/api/asforms/converter/components/AbstractComponentConverter.java
...orms/converter/components/AbstractComponentConverter.java
+2
-3
src/main/java/kz/arta/synergy/api/asforms/pojo/AdvancedSearchParams.java
...z/arta/synergy/api/asforms/pojo/AdvancedSearchParams.java
+5
-0
src/main/java/kz/arta/synergy/api/asforms/pojo/AsFormData.java
...ain/java/kz/arta/synergy/api/asforms/pojo/AsFormData.java
+14
-0
src/main/java/kz/arta/synergy/api/asforms/pojo/AsFormDataContainer.java
...kz/arta/synergy/api/asforms/pojo/AsFormDataContainer.java
+16
-0
src/main/java/kz/arta/synergy/api/asforms/pojo/AsFormWrapper.java
.../java/kz/arta/synergy/api/asforms/pojo/AsFormWrapper.java
+1
-0
No files found.
src/main/java/kz/arta/synergy/api/asforms/converter/components/AbstractComponentConverter.java
View file @
9bdab9d6
...
@@ -69,8 +69,8 @@ public abstract class AbstractComponentConverter implements ComponentConverter {
...
@@ -69,8 +69,8 @@ public abstract class AbstractComponentConverter implements ComponentConverter {
}
else
if
(
field
.
getType
().
isAssignableFrom
(
AsFormData
.
class
))
{
}
else
if
(
field
.
getType
().
isAssignableFrom
(
AsFormData
.
class
))
{
// common type
// common type
AsFormData
data
=
asfData
.
getData
(
cmpId
);
AsFormData
data
=
asfData
.
getData
(
cmpId
);
if
(
data
!=
null
)
{
AsFormData
fieldAsFormData
=
new
AsFormData
();
AsFormData
fieldAsFormData
=
new
AsFormData
();
if
(
data
!=
null
)
{
fieldAsFormData
.
setId
(
cmpId
);
fieldAsFormData
.
setId
(
cmpId
);
fieldAsFormData
.
setType
(
getType
(
annotation
));
fieldAsFormData
.
setType
(
getType
(
annotation
));
fieldAsFormData
.
setValue
(
data
.
getValue
());
fieldAsFormData
.
setValue
(
data
.
getValue
());
...
@@ -82,9 +82,8 @@ public abstract class AbstractComponentConverter implements ComponentConverter {
...
@@ -82,9 +82,8 @@ public abstract class AbstractComponentConverter implements ComponentConverter {
fieldAsFormData
.
setLabel
(
data
.
getLabel
());
fieldAsFormData
.
setLabel
(
data
.
getLabel
());
fieldAsFormData
.
setUsername
(
data
.
getUsername
());
fieldAsFormData
.
setUsername
(
data
.
getUsername
());
fieldAsFormData
.
setData
(
data
.
getData
());
fieldAsFormData
.
setData
(
data
.
getData
());
field
.
set
(
asFormObject
,
fieldAsFormData
);
}
}
field
.
set
(
asFormObject
,
fieldAsFormData
);
}
else
{
}
else
{
throw
new
UnsupportedFieldTypeException
(
"This type unsupported"
);
throw
new
UnsupportedFieldTypeException
(
"This type unsupported"
);
}
}
...
...
src/main/java/kz/arta/synergy/api/asforms/pojo/AdvancedSearchParams.java
View file @
9bdab9d6
...
@@ -5,6 +5,7 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties;
...
@@ -5,6 +5,7 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -87,4 +88,8 @@ public class AdvancedSearchParams {
...
@@ -87,4 +88,8 @@ public class AdvancedSearchParams {
public
void
setShowDeleted
(
boolean
showDeleted
)
{
public
void
setShowDeleted
(
boolean
showDeleted
)
{
this
.
showDeleted
=
showDeleted
;
this
.
showDeleted
=
showDeleted
;
}
}
public
void
setDynParams
(
String
...
params
)
{
setDynParams
(
Collections
.
singletonList
(
Arrays
.
asList
(
params
)));
}
}
}
src/main/java/kz/arta/synergy/api/asforms/pojo/AsFormData.java
View file @
9bdab9d6
...
@@ -51,6 +51,13 @@ public class AsFormData extends AsFormDataContainer {
...
@@ -51,6 +51,13 @@ public class AsFormData extends AsFormDataContainer {
return
value
;
return
value
;
}
}
public
String
getValue
(
String
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
return
value
;
}
public
void
setValue
(
String
value
)
{
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
this
.
value
=
value
;
}
}
...
@@ -59,6 +66,13 @@ public class AsFormData extends AsFormDataContainer {
...
@@ -59,6 +66,13 @@ public class AsFormData extends AsFormDataContainer {
return
key
;
return
key
;
}
}
public
String
getKey
(
String
defaultValue
)
{
if
(
key
==
null
)
{
return
defaultValue
;
}
return
key
;
}
public
void
setKey
(
String
key
)
{
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
this
.
key
=
key
;
}
}
...
...
src/main/java/kz/arta/synergy/api/asforms/pojo/AsFormDataContainer.java
View file @
9bdab9d6
...
@@ -39,6 +39,14 @@ public class AsFormDataContainer {
...
@@ -39,6 +39,14 @@ public class AsFormDataContainer {
return
null
;
return
null
;
}
}
public
String
getValue
(
String
cmpId
,
String
defaultValue
)
{
String
value
=
getValue
(
cmpId
);
if
(
value
==
null
)
{
return
defaultValue
;
}
return
value
;
}
public
String
getKey
(
String
cmpId
)
{
public
String
getKey
(
String
cmpId
)
{
AsFormData
data
=
getData
(
cmpId
);
AsFormData
data
=
getData
(
cmpId
);
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
...
@@ -47,6 +55,14 @@ public class AsFormDataContainer {
...
@@ -47,6 +55,14 @@ public class AsFormDataContainer {
return
null
;
return
null
;
}
}
public
String
getKey
(
String
cmpId
,
String
defaultKey
)
{
String
key
=
getKey
(
cmpId
);
if
(
key
==
null
)
{
return
defaultKey
;
}
return
key
;
}
public
List
<
AsFormData
>
getData
()
{
public
List
<
AsFormData
>
getData
()
{
return
data
;
return
data
;
}
}
...
...
src/main/java/kz/arta/synergy/api/asforms/pojo/AsFormWrapper.java
View file @
9bdab9d6
...
@@ -58,4 +58,5 @@ public class AsFormWrapper extends AsFormDataContainer {
...
@@ -58,4 +58,5 @@ public class AsFormWrapper extends AsFormDataContainer {
public
void
setVersion
(
String
version
)
{
public
void
setVersion
(
String
version
)
{
this
.
version
=
version
;
this
.
version
=
version
;
}
}
}
}
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