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
7e3cc3c2
Commit
7e3cc3c2
authored
Nov 16, 2016
by
Raimbek Egemberdiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component counter
parent
466d0b4e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
0 deletions
+43
-0
src/main/java/kz/arta/synergy/api/asforms/annotations/Counter.java
...java/kz/arta/synergy/api/asforms/annotations/Counter.java
+18
-0
src/main/java/kz/arta/synergy/api/asforms/converter/DefaultAsFormConverter.java
...synergy/api/asforms/converter/DefaultAsFormConverter.java
+1
-0
src/main/java/kz/arta/synergy/api/asforms/converter/components/CounterConverter.java
...gy/api/asforms/converter/components/CounterConverter.java
+23
-0
src/main/java/kz/arta/synergy/api/asforms/pojo/ComponentTypes.java
...java/kz/arta/synergy/api/asforms/pojo/ComponentTypes.java
+1
-0
No files found.
src/main/java/kz/arta/synergy/api/asforms/annotations/Counter.java
0 → 100644
View file @
7e3cc3c2
package
kz.arta.synergy.api.asforms.annotations
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* @author raimbek
* @since 09.11.2016
*/
@Target
(
ElementType
.
FIELD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
Counter
{
String
value
()
default
""
;
}
src/main/java/kz/arta/synergy/api/asforms/converter/DefaultAsFormConverter.java
View file @
7e3cc3c2
...
...
@@ -32,6 +32,7 @@ public class DefaultAsFormConverter implements AsFormConverter {
registerConverter
(
Table
.
class
,
new
TableConverter
(
this
));
registerConverter
(
DateCmp
.
class
,
new
DateConverter
());
registerConverter
(
Radio
.
class
,
new
RadioConverter
());
registerConverter
(
Counter
.
class
,
new
CounterConverter
());
}
@Override
...
...
src/main/java/kz/arta/synergy/api/asforms/converter/components/CounterConverter.java
0 → 100644
View file @
7e3cc3c2
package
kz.arta.synergy.api.asforms.converter.components
;
import
kz.arta.synergy.api.asforms.annotations.Counter
;
import
kz.arta.synergy.api.asforms.pojo.ComponentTypes
;
import
java.lang.annotation.Annotation
;
/**
* @author raimbek
* @since 11.11.2016
*/
public
class
CounterConverter
extends
AbstractComponentConverter
{
@Override
public
String
getType
(
Annotation
annotation
)
{
return
ComponentTypes
.
COUNTER
;
}
@Override
public
String
getCmpId
(
Annotation
annotation
)
{
return
((
Counter
)
annotation
).
value
();
}
}
src/main/java/kz/arta/synergy/api/asforms/pojo/ComponentTypes.java
View file @
7e3cc3c2
...
...
@@ -22,4 +22,5 @@ public class ComponentTypes {
public
static
final
String
FILE_LINK
=
"filelink"
;
public
static
final
String
REG_LINK
=
"reglink"
;
public
static
final
String
CUSTOM
=
"custom"
;
public
static
final
String
COUNTER
=
"counter"
;
}
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