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
57c5a51f
Commit
57c5a51f
authored
Mar 07, 2016
by
Gianluca Filippone
Browse files
Added persistence-enanche file and resolved install error
parent
d1e0558e
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/src/test/resources/META-INF/persistence-enhance.xml
0 → 100644
View file @
57c5a51f
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->
<persistence
xmlns=
"http://java.sun.com/xml/ns/persistence"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version=
"2.0"
>
<persistence-unit
name=
"Master"
>
<mapping-file>
META-INF/spring-orm.xml
</mapping-file>
<validation-mode>
NONE
</validation-mode>
</persistence-unit>
</persistence>
\ No newline at end of file
ext/choreography/logic/pom.xml
View file @
57c5a51f
...
...
@@ -52,12 +52,12 @@ limitations under the License.
<artifactId>
syncope-ext-choreography-common-lib
</artifactId>
<version>
${project.version}
</version>
</dependency>
<!--
<dependency>
<groupId>
org.apache.syncope.ext.choreography
</groupId>
<artifactId>
syncope-ext-choreography-persistence-jpa
</artifactId>
<version>
${project.version}
</version>
</dependency>
-->
</dependency>
</dependencies>
<build>
...
...
ext/choreography/logic/src/main/java/org/apache/syncope/core/logic/MonitorLogic.java
View file @
57c5a51f
...
...
@@ -18,29 +18,23 @@ package org.apache.syncope.core.logic;
import
eu.chorevolution.idm.common.to.ChoreographyInstanceTO
;
import
eu.chorevolution.idm.common.to.ChoreographyTO
;
import
eu.chorevolution.idm.common.to.CoordinationDelegateTO
;
import
java.io.Serializable
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.apache.syncope.common.lib.AbstractBaseBean
;
/*
import
eu.choreovolution.idm.common.to.EndRequestTO
;
import
eu.choreovolution.idm.common.to.ForwardRequestTO
;
import
eu.choreovolution.idm.common.to.ForwardResponseTO
;
import
eu.choreovolution.idm.common.to.NumberCoordMessageTO
;
import
eu.choreovolution.idm.common.to.StartRequestTO
;
import java.util.LinkedHashSet;
import java.util.Set;
//
import java.util.LinkedHashSet;
//
import java.util.Set;
import
org.apache.syncope.core.persistence.api.dao.EndRequestDAO
;
import
org.apache.syncope.core.persistence.api.dao.ForwardRequestDAO
;
import
org.apache.syncope.core.persistence.api.dao.ForwardResponseDAO
;
import
org.apache.syncope.core.persistence.api.dao.NumberCoordMessageDAO
;
import
org.apache.syncope.core.persistence.api.dao.StartRequestDAO
;
import org.apache.syncope.core.persistence.api.entity.EndRequest;
import org.apache.syncope.core.persistence.api.entity.ForwardRequest;
import org.apache.syncope.core.persistence.api.entity.ForwardResponse;
import
org.apache.syncope.core.persistence.api.entity.NumberCoordMessage
;
import org.apache.syncope.core.persistence.api.entity.StartRequest;
import
org.apache.syncope.core.persistence.api.entity.TimeData
;
import
org.apache.syncope.core.persistence.jpa.dao.JPAEndRequestDAO
;
import
org.apache.syncope.core.persistence.jpa.dao.JPAForwardRequestDAO
;
...
...
@@ -51,7 +45,7 @@ import org.apache.syncope.core.persistence.jpa.entity.JPAEndRequest;
import
org.apache.syncope.core.persistence.jpa.entity.JPAForwardRequest
;
import
org.apache.syncope.core.persistence.jpa.entity.JPAForwardResponse
;
import
org.apache.syncope.core.persistence.jpa.entity.JPANumberCoordMessage
;
import org.apache.syncope.core.persistence.jpa.entity.JPAStartRequest;
*/
import
org.apache.syncope.core.persistence.jpa.entity.JPAStartRequest
;
import
org.springframework.stereotype.Component
;
@Component
...
...
@@ -310,7 +304,7 @@ public class MonitorLogic extends AbstractTransactionalLogic<AbstractBaseBean> {
* @param type
*/
public
void
saveTimeData
(
final
AbstractBaseBean
data
,
final
String
type
)
{
/*
TimeData
requestEntity
;
switch
(
type
)
{
case
"start_request"
:
...
...
@@ -366,11 +360,10 @@ public class MonitorLogic extends AbstractTransactionalLogic<AbstractBaseBean> {
break
;
default
:
break
;
}
*/
}
}
public
void
saveMessageData
(
final
/*NumberCoordMessageTO*/
Serializable
data
)
{
/*
public
void
saveMessageData
(
final
NumberCoordMessageTO
data
)
{
NumberCoordMessage
requestEntity
=
new
JPANumberCoordMessage
();
requestEntity
.
setCdName
(
data
.
getCdName
());
requestEntity
.
setChoreographyName
(
data
.
getChoreographyName
());
...
...
@@ -380,6 +373,5 @@ public class MonitorLogic extends AbstractTransactionalLogic<AbstractBaseBean> {
NumberCoordMessageDAO
dao
=
new
JPANumberCoordMessageDAO
();
dao
.
save
(
requestEntity
);
*/
}
}
ext/choreography/persistence-jpa/pom.xml
View file @
57c5a51f
...
...
@@ -52,7 +52,6 @@ under the License.
<build>
<plugins>
<!--
<plugin>
<groupId>
org.apache.openjpa
</groupId>
<artifactId>
openjpa-maven-plugin
</artifactId>
...
...
@@ -65,7 +64,7 @@ under the License.
</dependency>
</dependencies>
<configuration>
<persistenceXmlFile>${rootpom.basedir}/core/
persistence-jpa/
src/test/resources/META-INF/persistence-enhance.xml</persistenceXmlFile>
<persistenceXmlFile>
${rootpom.basedir}/core/src/test/resources/META-INF/persistence-enhance.xml
</persistenceXmlFile>
<includes>
org/apache/syncope/core/persistence/jpa/entity/**/*.class
</includes>
<connectionDriverName>
org.springframework.jdbc.datasource.DriverManagerDataSource
</connectionDriverName>
<connectionProperties>
...
...
@@ -85,7 +84,6 @@ under the License.
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-checkstyle-plugin
</artifactId>
...
...
ext/choreography/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CollectorServiceImpl.java
View file @
57c5a51f
...
...
@@ -23,6 +23,10 @@ import eu.choreovolution.idm.common.to.NumberCoordMessageTO;
import
eu.choreovolution.idm.common.to.StartRequestTO
;
import
org.apache.syncope.common.rest.api.service.CollectorService
;
import
org.apache.syncope.core.logic.MonitorLogic
;
import
org.apache.syncope.core.persistence.api.dao.StartRequestDAO
;
import
org.apache.syncope.core.persistence.api.entity.StartRequest
;
import
org.apache.syncope.core.persistence.jpa.dao.JPAStartRequestDAO
;
import
org.apache.syncope.core.persistence.jpa.entity.JPAStartRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -63,7 +67,7 @@ public class CollectorServiceImpl extends AbstractServiceImpl implements Collect
@Override
public
Response
testMethod
(
final
StartRequestTO
data
)
{
StartRequestTO
response
;
/*
StartRequestTO response;
if (data != null) {
response = data;
...
...
@@ -76,8 +80,18 @@ public class CollectorServiceImpl extends AbstractServiceImpl implements Collect
response.setInstanceName("Istanza di prova");
response.setOperationName("Operazione di prova");
response.setTimestamp(1000);
}
}
*/
return
Response
.
ok
(
response
).
build
();
StartRequestDAO
dao
=
new
JPAStartRequestDAO
();
StartRequest
request
=
new
JPAStartRequest
();
request
.
setCdName
(
data
.
getCdName
());
request
.
setChoreographyName
(
data
.
getChoreographyName
());
request
.
setInstanceName
(
data
.
getInstanceName
());
request
.
setOperationName
(
data
.
toString
());
request
.
setRecordTime
(
data
.
getTimestamp
());
dao
.
save
(
request
);
data
.
setInstanceName
(
"Saved"
);
return
Response
.
ok
(
data
).
build
();
}
}
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