Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHOReVOLUTION
enactment-engine
Commits
fc57b024
Commit
fc57b024
authored
Oct 12, 2016
by
Francesco Chicchiriccò
Browse files
[CRV-226] Adding ServiceType#GLOBAL_SECURITY_FILTER + utility method
parent
8d37b84b
Changes
2
Hide whitespace changes
Inline
Side-by-side
chorspec/src/main/java/eu/chorevolution/chors/ChorSpecUtils.java
View file @
fc57b024
...
...
@@ -20,12 +20,28 @@ import eu.chorevolution.datamodel.ChoreographyService;
import
eu.chorevolution.datamodel.DeployedService
;
import
eu.chorevolution.datamodel.ServiceDependency
;
import
eu.chorevolution.datamodel.ServiceType
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
public
final
class
ChorSpecUtils
{
public
static
List
<
String
>
findGlobalSecurityFilterURLs
(
final
Choreography
chorSpec
)
{
List
<
String
>
result
=
new
ArrayList
<>();
chorSpec
.
getServiceGroups
().
forEach
((
serviceGroup
)
->
{
result
.
addAll
(
serviceGroup
.
getServices
().
stream
().
filter
((
ChoreographyService
cs
)
->
cs
instanceof
DeployedService
).
filter
((
ChoreographyService
dep
)
->
((
DeployedService
)
dep
).
getServiceType
()
==
ServiceType
.
GLOBAL_SECURITY_FILTER
).
map
(
dep
->
((
DeployedService
)
dep
).
getUrl
()).
collect
(
Collectors
.
toList
()));
});
return
result
;
}
public
static
String
findSecurityFilterURL
(
final
Choreography
chorSpec
,
final
ChoreographyService
service
)
{
Set
<
ChoreographyService
>
candidates
=
new
HashSet
<>();
chorSpec
.
getServiceGroups
().
forEach
((
serviceGroup
)
->
{
...
...
chorspec/src/main/java/eu/chorevolution/datamodel/ServiceType.java
View file @
fc57b024
...
...
@@ -26,6 +26,7 @@ public enum ServiceType {
BINDING_COMPONENT
,
COORDINATION_DELEGATE
,
PROTOCOL_ADAPTER
,
GLOBAL_SECURITY_FILTER
,
SECURITY_FILTER
,
GENERIC_SERVICE
...
...
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