geoportal-data-entry-app/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryService.java

238 lines
7.7 KiB
Java
Raw Normal View History

2020-10-07 17:04:13 +02:00
package org.gcube.portlets.user.geoportaldataentry.client;
import java.util.List;
2022-10-18 16:38:48 +02:00
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData;
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
2022-09-13 16:18:40 +02:00
import org.gcube.application.geoportalcommon.shared.geoportal.config.ActionDefinitionDV;
2023-04-17 16:03:40 +02:00
import org.gcube.application.geoportalcommon.shared.geoportal.config.FilePathDV;
import org.gcube.application.geoportalcommon.shared.geoportal.project.LifecycleInformationDV;
2022-09-13 16:18:40 +02:00
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
import org.gcube.application.geoportalcommon.shared.geoportal.project.TemporalReferenceDV;
2022-10-03 17:52:16 +02:00
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.RelationshipDefinitionDV;
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
import org.gcube.application.geoportaldatamapper.shared.ProjectEdit;
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
import org.gcube.portlets.user.geoportaldataentry.shared.GNADataEntryExtendedConfigProfile;
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
import org.gcube.portlets.user.geoportaldataentry.shared.GeoportalISConfig;
2022-07-08 16:38:45 +02:00
import org.gcube.portlets.user.geoportaldataentry.shared.Tree_Node;
2020-10-07 17:04:13 +02:00
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
/**
* The client side stub for the RPC service.
2021-08-04 17:11:46 +02:00
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
2021-08-05 16:49:04 +02:00
* Aug 4, 2021
2020-10-07 17:04:13 +02:00
*/
2020-10-22 16:50:14 +02:00
@RemoteServiceRelativePath("geoportaldataentryservice")
public interface GeoportalDataEntryService extends RemoteService {
/**
* Save geona data forms.
*
* @param profileID the profile ID
* @param tree_Node the tree node
* @param stepsOnPostCreation the steps on post creation
* @return the commit report
* @throws Exception the exception
*/
CommitReport saveGeonaDataForms(String profileID, Tree_Node<GeoNaFormDataObject> tree_Node,
List<String> stepsOnPostCreation) throws Exception;
2021-08-04 17:11:46 +02:00
/**
* Gets the geona init config.
*
* @return the geona init config
*/
GeoportalISConfig getGeonaInitConfig();
2020-12-01 18:15:13 +01:00
/**
* Gets the links for.
*
* @param itemId the item id
* @param profileID the profile ID
* @return the links for
* @throws Exception the exception
*/
2022-10-18 16:38:48 +02:00
GeoportalItemReferences getLinksFor(String itemId, String profileID) throws Exception;
2021-08-04 17:11:46 +02:00
/**
* Gets the list projects.
2021-08-04 17:11:46 +02:00
*
* @param theProfileID the the profile ID
* @param start the start
* @param limit the limit
* @param filter the filter
2021-08-05 16:49:04 +02:00
* @param reloadFromService the reload from service
* @return the list projects
2021-08-04 17:11:46 +02:00
* @throws Exception the exception
*/
public ResultSetPaginatedData getListProjects(String theProfileID, Integer start, Integer limit,
SearchingFilter filter, boolean reloadFromService) throws Exception;
2021-08-05 16:49:04 +02:00
/**
* Gets the JSON record.
*
* @param profileID the profile ID
* @param projectID the project ID
* @return the JSON record
* @throws Exception the exception
*/
String getJSONDocumentInTheProject(String profileID, String projectID) throws Exception;
/**
* Update record.
*
* @param profileID the profile ID
* @param projectID the project ID
* @param jsonUpdate the json update
* @return the project DV
* @throws Exception the exception
*/
ProjectDV updateRecord(String profileID, String projectID, String jsonUpdate) throws Exception;
2021-09-27 18:32:19 +02:00
/**
2021-12-21 16:51:56 +01:00
* Read data viewer config.
*
2021-12-21 16:51:56 +01:00
* @return the GNA data entry ext config profile
* @throws Exception the exception
*/
GNADataEntryExtendedConfigProfile readDataViewerConfig() throws Exception;
/**
* Gets the list use case descriptors.
*
* @param handlersIds the handlers ids
* @return the list use case descriptors
* @throws Exception the exception
*/
List<UseCaseDescriptorDV> getListUseCaseDescriptors(List<String> handlersIds) throws Exception;
/**
* Gets the lifecycle info for project id.
*
* @param profileID the profile ID
* @param projectID the project ID
* @return the lifecycle info for project id
* @throws Exception the exception
*/
LifecycleInformationDV getLifecycleInfoForProjectId(String profileID, String projectID) throws Exception;
/**
* Delete project.
*
* @param profileID the profile ID
* @param projectID the project ID
* @return true, if successful
* @throws Exception the exception
*/
boolean deleteProject(String profileID, String projectID) throws Exception;
2022-09-13 16:18:40 +02:00
/**
* Perform action steps.
*
* @param profileID the profile ID
* @param projectID the project ID
* @param action the action
* @return the project DV
* @throws Exception the exception
*/
ProjectDV performActionSteps(String profileID, String projectID, ActionDefinitionDV action) throws Exception;
/**
2022-10-03 17:52:16 +02:00
* Gets the relationships definition.
*
* @param profileID the profile ID
2022-10-03 17:52:16 +02:00
* @return the relationships definition
* @throws Exception the exception
*/
2022-10-03 17:52:16 +02:00
List<RelationshipDefinitionDV> getRelationshipsDefinition(String profileID) throws Exception;
2022-09-21 10:52:56 +02:00
/**
* Creates the relationship.
*
2022-10-03 17:52:16 +02:00
* @param fromProfileID the from profile ID
* @param fromProjectID the from project ID
* @param relationshipID the relationship ID
* @param toProfileID the to profile ID
* @param toProjectID the to project ID
2022-09-21 10:52:56 +02:00
* @throws Exception the exception
*/
2022-10-03 17:52:16 +02:00
void createRelationship(String fromProfileID, String fromProjectID, String relationshipID, String toProfileID,
String toProjectID) throws Exception;
2022-09-21 10:52:56 +02:00
/**
* Gets the project by ID.
*
* @param profileID the profile ID
* @param projectID the project ID
* @return the project by ID
* @throws Exception the exception
*/
ProjectDV getProjectByID(String profileID, String projectID) throws Exception;
/**
* Gets the result document fo project by ID.
*
* @param profileID the profile ID
* @param projectID the project ID
* @return the result document fo project by ID
* @throws Exception the exception
*/
ResultDocumentDV getResultDocumentFoProjectByID(String profileID, String projectID) throws Exception;
/**
* Delete relationship.
*
* @param fromProfileID the from profile ID
* @param fromProjectID the from project ID
* @param id the id
* @param toProfileID the to profile ID
* @param toProjectID the to project ID
* @return the result document DV
* @throws Exception the exception
*/
ResultDocumentDV deleteRelationship(String fromProfileID, String fromProjectID, String id, String toProfileID,
String toProjectID) throws Exception;
/**
* Temporal reference for project.
*
* @param profileID the profile ID
* @param projectID the project ID
* @return the temporal reference DV
*/
TemporalReferenceDV temporalReferenceForProject(String profileID, String projectID);
/**
* Gets the project edit.
*
* @param profileID the profile ID
* @param projectID the project ID
* @return the project edit
* @throws Exception the exception
*/
ProjectEdit getProjectEdit(String profileID, String projectID) throws Exception;
2023-04-17 16:03:40 +02:00
/**
* Update geportal data form.
*
* @param profileID the profile ID
* @param projectID the project ID
* @param section the section
* @param sectionPath the section path
* @param listFilePaths the list file paths
* @return the commit report
* @throws Exception the exception
*/
CommitReport updateGeportalDataForm(String profileID, String projectID, GeoNaFormDataObject section,
String sectionPath, List<FilePathDV> listFilePaths) throws Exception;
2020-10-07 17:04:13 +02:00
}