refactored service and service impl
This commit is contained in:
parent
13235384d0
commit
cc6b6705fd
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -7,7 +8,8 @@
|
|||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-entry-app-1.0.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -15,7 +17,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -23,7 +26,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -31,7 +35,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -39,7 +44,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -47,10 +53,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="metadata-profile-form-builder-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -58,13 +62,15 @@
|
|||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<property name="context-root" value="geoportal-data-entry-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -72,7 +78,8 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
/**
|
||||
* Create a remote service proxy to talk to the server-side Greeting service.
|
||||
*/
|
||||
private final GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
|
||||
private final GeoportalDataEntryServiceAsync greetingService = GWT.create(GeoportalDataEntryService.class);
|
||||
|
||||
private final HandlerManager appManagerBus = new HandlerManager(null);
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
|
||||
geoNaMainForm = new GeonaDataEntryMainForm(appManagerBus);
|
||||
|
||||
GreetingServiceAsync.Util.getInstance().getGeonaInitConfig(new AsyncCallback<GeonaISConfig>() {
|
||||
GeoportalDataEntryServiceAsync.Util.getInstance().getGeonaInitConfig(new AsyncCallback<GeonaISConfig>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -205,7 +205,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
loader.setText("Trying to save the data, please wait...");
|
||||
modal.add(loader);
|
||||
|
||||
GreetingServiceAsync.Util.getInstance().saveGeonaDataForms(saveGeonaDataFormsEvent.getListGeonaDataForms(), new AsyncCallback<CommitReport>() {
|
||||
GeoportalDataEntryServiceAsync.Util.getInstance().saveGeonaDataForms(saveGeonaDataFormsEvent.getListGeonaDataForms(), new AsyncCallback<CommitReport>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|||
/**
|
||||
* The client side stub for the RPC service.
|
||||
*/
|
||||
@RemoteServiceRelativePath("greet")
|
||||
public interface GreetingService extends RemoteService {
|
||||
@RemoteServiceRelativePath("geoportaldataentryservice")
|
||||
public interface GeoportalDataEntryService extends RemoteService {
|
||||
|
||||
CommitReport saveGeonaDataForms(List<GeoNaFormDataObject> listGeonaFormObjects) throws Exception;
|
||||
|
|
@ -9,7 +9,7 @@ import org.gcube.portlets.user.geoportaldataentry.shared.GeonaISConfig;
|
|||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
public interface GreetingServiceAsync
|
||||
public interface GeoportalDataEntryServiceAsync
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -17,13 +17,13 @@ public interface GreetingServiceAsync
|
|||
*/
|
||||
public static final class Util
|
||||
{
|
||||
private static GreetingServiceAsync instance;
|
||||
private static GeoportalDataEntryServiceAsync instance;
|
||||
|
||||
public static final GreetingServiceAsync getInstance()
|
||||
public static final GeoportalDataEntryServiceAsync getInstance()
|
||||
{
|
||||
if ( instance == null )
|
||||
{
|
||||
instance = (GreetingServiceAsync) GWT.create( GreetingService.class );
|
||||
instance = (GeoportalDataEntryServiceAsync) GWT.create( GeoportalDataEntryService.class );
|
||||
}
|
||||
return instance;
|
||||
}
|
|
@ -15,7 +15,7 @@ import org.gcube.application.geoportal.model.concessioni.RelazioneScavo;
|
|||
import org.gcube.application.geoportal.model.content.UploadedImage;
|
||||
import org.gcube.application.geoportal.model.content.WorkspaceContent;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConcessioniFormCardTitle;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GreetingService;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoportalDataEntryService;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport.STATE;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
||||
|
@ -32,10 +32,10 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
|||
* The server side implementation of the RPC service.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class GreetingServiceImpl extends RemoteServiceServlet implements GreetingService {
|
||||
public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implements GeoportalDataEntryService {
|
||||
|
||||
public static final String GEONA_GENERIC_RESOURCE_SECONDARY_TYPE = "GEONA_GENERIC_RESOURCE_SECONDARY_TYPE";
|
||||
private static final Logger LOG = LoggerFactory.getLogger(GreetingServiceImpl.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(GeoportalDataEntryServiceImpl.class);
|
||||
|
||||
@Override
|
||||
public CommitReport saveGeonaDataForms(List<GeoNaFormDataObject> listGeonaFormObjects) throws Exception {
|
|
@ -6,8 +6,8 @@
|
|||
version="3.0">
|
||||
|
||||
<servlet>
|
||||
<servlet-name>greetServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.geoportaldataentry.server.GreetingServiceImpl</servlet-class>
|
||||
<servlet-name>geoportalDataEntryServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.geoportaldataentry.server.GeoportalDataEntryServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
|
@ -21,8 +21,8 @@
|
|||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>greetServlet</servlet-name>
|
||||
<url-pattern>/GeoPortalDataEntryApp/greet</url-pattern>
|
||||
<servlet-name>geoportalDataEntryServlet</servlet-name>
|
||||
<url-pattern>/GeoPortalDataEntryApp/geoportaldataentryservice</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
|
|
Loading…
Reference in New Issue