passing object instead of List<String> into GWT-RPC
This commit is contained in:
parent
86f9234c83
commit
d358a21182
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +13,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-entry-app-2.0.0-SNAPSHOT">
|
<wb-module deploy-name="geoportal-data-entry-app-2.0.0-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +27,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,7 +41,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +55,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +69,8 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +83,8 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="geoportal-data-entry-app"/>
|
<property name="context-root" value="geoportal-data-entry-app"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,7 +97,8 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +111,8 @@
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
8
pom.xml
8
pom.xml
|
@ -59,7 +59,7 @@
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- needed to compile with gwt > 2.7 -->
|
<!-- needed to compile with gwt > 2.7 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
|
@ -87,6 +87,12 @@
|
||||||
<version>${gwtVersion}</version>
|
<version>${gwtVersion}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.gwt</groupId>
|
||||||
|
<artifactId>gwt-servlet</artifactId>
|
||||||
|
<version>${gwtVersion}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.gwtbootstrap</groupId>
|
<groupId>com.github.gwtbootstrap</groupId>
|
||||||
<artifactId>gwt-bootstrap</artifactId>
|
<artifactId>gwt-bootstrap</artifactId>
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.products.paths.FileSetPathsDV;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
||||||
|
@ -53,41 +54,59 @@ public interface GeoportalDataEntryService extends RemoteService {
|
||||||
/**
|
/**
|
||||||
* Gets the list concessioni.
|
* Gets the list concessioni.
|
||||||
*
|
*
|
||||||
* @param start the start
|
* @param start the start
|
||||||
* @param limit the limit
|
* @param limit the limit
|
||||||
* @param filter the filter
|
* @param filter the filter
|
||||||
* @param reloadFromService the reload from service
|
* @param reloadFromService the reload from service
|
||||||
* @return the list concessioni
|
* @return the list concessioni
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public ResultSetPaginatedData getListConcessioni(Integer start, Integer limit, SortFilter filter, boolean reloadFromService) throws Exception;
|
public ResultSetPaginatedData getListConcessioni(Integer start, Integer limit, SortFilter filter,
|
||||||
|
boolean reloadFromService) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete record.
|
* Delete record.
|
||||||
*
|
*
|
||||||
* @param itemId the item id
|
* @param itemId the item id
|
||||||
* @param recordType the record type
|
* @param recordType the record type
|
||||||
* @return true, if successful
|
* @return true, if successful
|
||||||
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
boolean deleteRecord(String itemId, RECORD_TYPE recordType) throws Exception;
|
boolean deleteRecord(String itemId, RECORD_TYPE recordType) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the JSON record.
|
||||||
|
*
|
||||||
|
* @param itemId the item id
|
||||||
|
* @param recordType the record type
|
||||||
|
* @return the JSON record
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
String getJSONRecord(String itemId, RECORD_TYPE recordType) throws Exception;
|
String getJSONRecord(String itemId, RECORD_TYPE recordType) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update record.
|
||||||
|
*
|
||||||
|
* @param itemId the item id
|
||||||
|
* @param jsonUpdate the json update
|
||||||
|
* @param recordType the record type
|
||||||
|
* @return the concessione DV
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
ConcessioneDV updateRecord(String itemId, String jsonUpdate, RECORD_TYPE recordType) throws Exception;
|
ConcessioneDV updateRecord(String itemId, String jsonUpdate, RECORD_TYPE recordType) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read file set paths.
|
* Read file set paths.
|
||||||
*
|
*
|
||||||
* @return the list
|
* @return the file set paths DV
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
List<String> readFileSetPaths() throws Exception;
|
FileSetPathsDV readFileSetPaths() throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the record.
|
* Gets the record.
|
||||||
*
|
*
|
||||||
* @param itemId the item id
|
* @param itemId the item id
|
||||||
* @param recordType the record type
|
* @param recordType the record type
|
||||||
* @return the record
|
* @return the record
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.products.paths.FileSetPathsDV;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
||||||
|
@ -62,7 +63,7 @@ public interface GeoportalDataEntryServiceAsync
|
||||||
void updateRecord(String itemId, String jsonUpdate, RECORD_TYPE recordType, AsyncCallback<ConcessioneDV> callback);
|
void updateRecord(String itemId, String jsonUpdate, RECORD_TYPE recordType, AsyncCallback<ConcessioneDV> callback);
|
||||||
|
|
||||||
|
|
||||||
void readFileSetPaths(AsyncCallback<List<String>> callback);
|
void readFileSetPaths(AsyncCallback<FileSetPathsDV> callback);
|
||||||
|
|
||||||
|
|
||||||
void getRecord(String itemId, RECORD_TYPE recordType, AsyncCallback<ConcessioneDV> callback);
|
void getRecord(String itemId, RECORD_TYPE recordType, AsyncCallback<ConcessioneDV> callback);
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.gcube.application.geoportalcommon.shared.products.BaseConcessioneDV;
|
import org.gcube.application.geoportalcommon.shared.products.BaseConcessioneDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.products.paths.FileSetPathsDV;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.ACTION_ON_ITEM;
|
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.ACTION_ON_ITEM;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalDataEntryApp;
|
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalDataEntryApp;
|
||||||
|
@ -87,7 +88,7 @@ public class EditModeRecord extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void instanceUpdateFilesetEditor() {
|
private void instanceUpdateFilesetEditor() {
|
||||||
GeoPortalDataEntryApp.geoportalDataEntryService.readFileSetPaths(new AsyncCallback<List<String>>() {
|
GeoPortalDataEntryApp.geoportalDataEntryService.readFileSetPaths(new AsyncCallback<FileSetPathsDV>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
@ -96,8 +97,8 @@ public class EditModeRecord extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<String> listFileSetPaths) {
|
public void onSuccess(FileSetPathsDV fileSetPaths) {
|
||||||
UpdateFileset updateFileset = new UpdateFileset(selectedConcessione, recordType, listFileSetPaths);
|
UpdateFileset updateFileset = new UpdateFileset(selectedConcessione, recordType, fileSetPaths.getFileSetPaths());
|
||||||
filesUpdatePanel.add(updateFileset);
|
filesUpdatePanel.add(updateFileset);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
|
||||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.model.ValidationReportDV;
|
import org.gcube.application.geoportalcommon.shared.products.model.ValidationReportDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.products.paths.FileSetPathsDV;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ConcessioniFormCardTitle;
|
import org.gcube.portlets.user.geoportaldataentry.client.ConcessioniFormCardTitle;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_FIELD;
|
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_FIELD;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||||
|
@ -723,15 +724,9 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<String> readFileSetPaths() throws Exception {
|
public FileSetPathsDV readFileSetPaths() throws Exception {
|
||||||
LOG.info("readFileSetPaths called");
|
LOG.info("readFileSetPaths called");
|
||||||
List<String> fileSetPaths = new ArrayList<String>();
|
return ConvertToDataViewModel.getFileSetPaths();
|
||||||
fileSetPaths.add(Concessione.Paths.ABSTRACT_RELAZIONE);
|
|
||||||
fileSetPaths.add(Concessione.Paths.RELAZIONE);
|
|
||||||
fileSetPaths.add(Concessione.Paths.IMMAGINI);
|
|
||||||
fileSetPaths.add(Concessione.Paths.POSIZIONAMENTO);
|
|
||||||
fileSetPaths.add(Concessione.Paths.PIANTE);
|
|
||||||
return fileSetPaths;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ h1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-fielset-edit {
|
.form-fielset-edit {
|
||||||
margin: 10px 0px;
|
margin: 10px 0px !important;
|
||||||
border: 1px groove #ddd;
|
border: 1px groove #ddd !important;
|
||||||
padding: 10px;
|
padding: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue