task_24166 #8

Merged
francesco.mangiacrapa merged 14 commits from task_24166 into master 2023-05-11 15:49:17 +02:00
4 changed files with 57 additions and 21 deletions
Showing only changes of commit d58d933816 - Show all commits

View File

@ -4,11 +4,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.4-SNAPSHOT] - 2023-04-12
## [v2.1.0-SNAPSHOT] - 2023-04-12
- Integrated the deleteFileset method [#24977]
## [v2.0.3-SNAPSHOT] - 2023-02-09
## [v2.0.3] - 2023-02-09
#### Enhancements

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-data-common</artifactId>
<version>2.0.4-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<description>GeoPortal Data Common is common library used by GUI components developed for GeoNA</description>
<scm>

View File

@ -163,15 +163,15 @@ public class ProjectsCaller {
/**
* Gets the relationship chain.
*
* @param profileID the profile ID
* @param projectID the project ID
* @param profileID the profile ID
* @param projectID the project ID
* @param relationID the relation ID
* @param deep the deep
* @param deep the deep
* @return the relationship chain
* @throws Exception the exception
*/
public Iterator<RelationshipNavigationObject> getRelationshipChain(String profileID, String projectID, String relationID, Boolean deep)
throws Exception {
public Iterator<RelationshipNavigationObject> getRelationshipChain(String profileID, String projectID,
String relationID, Boolean deep) throws Exception {
LOG.info("getRelationshipChain called for projectID: {}, relationID: {}", projectID, projectID);
Projects<Project> client = (Projects<Project>) getClient(profileID);
return client.getRelationshipChain(projectID, relationID, deep);
@ -347,11 +347,11 @@ public class ProjectsCaller {
/**
* Creates the relationship.
*
* @param fromProfileID the from profile ID
* @param fromProjectID the from project ID
* @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
* @param toProfileID the to profile ID
* @param toProjectID the to project ID
* @throws RemoteException the remote exception
*/
public void createRelationship(String fromProfileID, String fromProjectID, String relationshipId,
@ -391,11 +391,34 @@ public class ProjectsCaller {
client.deleteRelation(request);
}
/**
* Delete fileset.
*
* @param profileID the profile ID
* @param projectID the project ID
* @param jsonPathToFileset the json path to fileset
* @param force the force
* @return the project
* @throws RemoteException the remote exception
*/
public Project deleteFileset(String profileID, String projectID, String jsonPathToFileset, Boolean force)
throws RemoteException {
LOG.info("deleteFileset called for profileID {} and projectID {}, fileset path: {}", profileID, projectID,
jsonPathToFileset);
Projects<Project> client = (Projects<Project>) getClient(profileID);
Project project = client.deleteFileSet(projectID, jsonPathToFileset, force);
LOG.info("fileset {} deleted", jsonPathToFileset);
LOG.debug("returning new project: {} ", project.getTheDocument());
return project;
}
/**
* Simple query.
*
* @param profileID the profile ID
* @param filter the filter
* @param filter the filter
* @return the iterator
* @throws Exception the exception
*/

View File

@ -6,24 +6,32 @@ import java.util.List;
public class FilesetDV implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3108729581669778828L;
private String name;
private String gcubeProfileFieldName; // It is the gcubeProfileFieldName in the UCD filePaths
private String filesetFieldName; // It is the fieldName in the UCD filePaths
private List<PayloadDV> listPayloads = new ArrayList<PayloadDV>();
public FilesetDV() {
}
public String getName() {
return name;
public String getFilesetFieldName() {
return filesetFieldName;
}
public void setName(String name) {
this.name = name;
public void setFilesetFieldName(String filesetFieldName) {
this.filesetFieldName = filesetFieldName;
}
public String getGcubeProfileFieldName() {
return gcubeProfileFieldName;
}
public void setGcubeProfileFieldName(String name) {
this.gcubeProfileFieldName = name;
}
public List<PayloadDV> getListPayload() {
@ -41,12 +49,17 @@ public class FilesetDV implements Serializable {
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("FilesetDV [name=");
builder.append(name);
builder.append("FilesetDV [gcubeProfileFieldName=");
builder.append(gcubeProfileFieldName);
builder.append(", filesetFieldName=");
builder.append(filesetFieldName);
builder.append(", listPayloads=");
builder.append(listPayloads);
builder.append("]");
return builder.toString();
}
}