Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ejercicio2-framework-back
Project
Project
Details
Activity
Releases
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
Josue
ejercicio2-framework-back
Commits
2ad3fa3d
Commit
2ad3fa3d
authored
Dec 16, 2021
by
Roberto Loayza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mantenimiento Action
parent
0683f8b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
3 deletions
+55
-3
ActionController.java
.../java/com/bytesw/bytebot/controller/ActionController.java
+19
-0
ActionBean.java
src/main/java/com/bytesw/bytebot/etl/beans/ActionBean.java
+1
-1
ActionRepository.java
...ain/java/com/bytesw/bytebot/etl/dao/ActionRepository.java
+0
-2
ActionService.java
src/main/java/com/bytesw/bytebot/service/ActionService.java
+35
-0
No files found.
src/main/java/com/bytesw/bytebot/controller/ActionController.java
0 → 100644
View file @
2ad3fa3d
package
com
.
bytesw
.
bytebot
.
controller
;
import
com.bytesw.bytebot.etl.beans.ActionBean
;
import
com.bytesw.bytebot.service.ActionService
;
import
com.bytesw.xdf.annotation.ProgramSecurity
;
import
com.bytesw.xdf.controller.XDFController
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
()
@RequestMapping
(
"/service/settings/actions"
)
@ProgramSecurity
(
"ACTIONS"
)
@Log4j2
public
class
ActionController
extends
XDFController
<
ActionBean
,
Long
>
{
public
ActionController
(
ActionService
service
)
{
super
(
service
);
}
}
src/main/java/com/bytesw/bytebot/etl/beans/ActionBean.java
View file @
2ad3fa3d
...
...
@@ -14,6 +14,6 @@ public class ActionBean {
private
Long
id
;
@Expose
private
String
ident
;
private
String
ident
ifier
;
}
src/main/java/com/bytesw/bytebot/etl/dao/ActionRepository.java
View file @
2ad3fa3d
package
com
.
bytesw
.
bytebot
.
etl
.
dao
;
import
com.bytesw.bytebot.etl.model.Action
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.CrudRepository
;
import
org.springframework.data.repository.query.Param
;
import
java.util.Optional
;
...
...
src/main/java/com/bytesw/bytebot/service/ActionService.java
0 → 100644
View file @
2ad3fa3d
package
com
.
bytesw
.
bytebot
.
service
;
import
com.bytesw.bytebot.etl.beans.ActionBean
;
import
com.bytesw.bytebot.etl.dao.ActionRepository
;
import
com.bytesw.bytebot.etl.model.Action
;
import
com.bytesw.xdf.service.XDFService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Service
@Transactional
@Log4j2
public
class
ActionService
extends
XDFService
<
Action
,
ActionBean
,
Long
>
{
protected
ActionService
(
ActionRepository
repository
)
{
super
(
repository
);
}
@Override
protected
Action
toModel
(
Action
model
,
ActionBean
bean
)
{
if
(
model
==
null
)
{
model
=
new
Action
();
}
BeanUtils
.
copyProperties
(
bean
,
model
);
return
model
;
}
@Override
protected
ActionBean
toBean
(
Action
model
)
{
ActionBean
bean
=
new
ActionBean
();
BeanUtils
.
copyProperties
(
model
,
bean
);
return
bean
;
}
}
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