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
fabio martelli
syncope
Commits
0d9ad1e8
Commit
0d9ad1e8
authored
Dec 10, 2015
by
Francesco Chicchiricco
Browse files
[CRV-17][CRV-19] Adding logic layer
parent
388dd900
Changes
7
Hide whitespace changes
Inline
Side-by-side
ext/ee/pom.xml
View file @
0d9ad1e8
...
...
@@ -37,6 +37,7 @@ limitations under the License.
<modules>
<module>
rest-api
</module>
<module>
rest-cxf
</module>
<module>
logic
</module>
</modules>
</project>
ext/ee/rest-api/pom.xml
View file @
0d9ad1e8
...
...
@@ -40,6 +40,12 @@ limitations under the License.
<artifactId>
syncope-common-rest-api
</artifactId>
<version>
${syncope.version}
</version>
</dependency>
<dependency>
<groupId>
eu.chorevolution.idm
</groupId>
<artifactId>
common
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
...
...
ext/ee/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ChoreographyService.java
View file @
0d9ad1e8
...
...
@@ -15,16 +15,17 @@
*/
package
org.apache.syncope.common.rest.api.service
;
import
eu.chorevolution.idm.common.types.ChoreographyAction
;
import
eu.chorevolution.idm.common.types.ServiceAction
;
import
java.io.InputStream
;
import
javax.validation.constraints.NotNull
;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.DELETE
;
import
javax.ws.rs.POST
;
import
javax.ws.rs.PUT
;
import
javax.ws.rs.Path
;
import
javax.ws.rs.PathParam
;
import
javax.ws.rs.core.MediaType
;
import
org.apache.syncope.common.rest.api.type.ServiceAction
;
import
org.apache.syncope.common.rest.api.type.ChoreographyAction
;
/**
* REST services to be invoked by - and to - the Enactment Engine.
...
...
@@ -54,6 +55,14 @@ public interface ChoreographyService extends JAXRSService {
@Consumes
({
MediaType
.
APPLICATION_XML
})
void
update
(
@NotNull
@PathParam
(
"id"
)
String
id
,
InputStream
in
);
/**
* This operation can be invoked when a choreography is retired.
*
* @param id choreography id
*/
@DELETE
void
delete
(
@NotNull
@PathParam
(
"id"
)
String
id
);
/**
* Performs the given action on the given choreography.
*
...
...
ext/ee/rest-api/src/main/java/org/apache/syncope/common/rest/api/type/ChoreographyAction.java
deleted
100644 → 0
View file @
388dd900
/*
* Copyright 2015 The CHOReVOLUTION project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.apache.syncope.common.rest.api.type
;
public
enum
ChoreographyAction
{
PAUSE
,
RESUME
,
SHUTDOWN
,
RELEASE
;
}
ext/ee/rest-api/src/main/java/org/apache/syncope/common/rest/api/type/ServiceAction.java
deleted
100644 → 0
View file @
388dd900
/*
* Copyright 2015 The CHOReVOLUTION project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.apache.syncope.common.rest.api.type
;
public
enum
ServiceAction
{
SCALE_UP
,
SCALE_DOWN
,
SCALE_UP_ACROSS
,
SCALE_DOWN_ACROSS
,
REPLACE_SERVICE
;
}
ext/ee/rest-cxf/pom.xml
View file @
0d9ad1e8
...
...
@@ -51,6 +51,11 @@ limitations under the License.
<version>
${project.version}
</version>
<classifier>
javadoc
</classifier>
</dependency>
<dependency>
<groupId>
eu.chorevolution.idm.ext.ee
</groupId>
<artifactId>
syncope-ext-ee-logic
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
...
...
ext/ee/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ChoreographyServiceImpl.java
View file @
0d9ad1e8
...
...
@@ -15,29 +15,43 @@
*/
package
org.apache.syncope.core.rest.cxf.service
;
import
eu.chorevolution.idm.common.types.ChoreographyAction
;
import
eu.chorevolution.idm.common.types.ServiceAction
;
import
org.apache.syncope.core.logic.ChoreographyLogic
;
import
java.io.InputStream
;
import
org.apache.syncope.common.rest.api.type.ChoreographyAction
;
import
org.apache.syncope.common.rest.api.service.ChoreographyService
;
import
org.
apache.syncope.common.rest.api.type.ServiceAction
;
import
org.
springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
public
class
ChoreographyServiceImpl
extends
AbstractServiceImpl
implements
ChoreographyService
{
@Autowired
private
ChoreographyLogic
logic
;
@Override
public
void
create
(
final
String
id
,
final
InputStream
in
)
{
logic
.
create
(
id
,
in
);
}
@Override
public
void
update
(
final
String
id
,
final
InputStream
in
)
{
logic
.
update
(
id
,
in
);
}
@Override
public
void
delete
(
final
String
id
)
{
logic
.
delete
(
id
);
}
@Override
public
void
onChoreography
(
final
String
id
,
final
ChoreographyAction
action
)
{
// Proxy invocation to EE
}
@Override
public
void
onChoreographyService
(
final
String
id
,
final
String
serviceId
,
final
ServiceAction
action
)
{
// Proxy invocation to EE
}
}
Write
Preview
Supports
Markdown
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