From 5862cdc01619b10a29465bf81136a0bfffc7056b Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Tue, 2 Mar 2021 14:40:38 +0100 Subject: [PATCH] just formatted the code --- .../utillibrary/server/DataCatalogue.java | 106 +++++++++--------- 1 file changed, 51 insertions(+), 55 deletions(-) diff --git a/src/main/java/org/gcube/datacatalogue/utillibrary/server/DataCatalogue.java b/src/main/java/org/gcube/datacatalogue/utillibrary/server/DataCatalogue.java index cba2f99..3817917 100644 --- a/src/main/java/org/gcube/datacatalogue/utillibrary/server/DataCatalogue.java +++ b/src/main/java/org/gcube/datacatalogue/utillibrary/server/DataCatalogue.java @@ -11,13 +11,12 @@ import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup; import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanLicense; import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization; - /** * The Interface DataCatalogue. * * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) * - * Feb 12, 2021 + * Feb 12, 2021 */ public interface DataCatalogue { @@ -110,7 +109,7 @@ public interface DataCatalogue { * Retrieve a ckan dataset given its id. * * @param datasetIdOrName the dataset id or name - * @param username the username + * @param username the username * @return the dataset */ CkanDataset getDataset(String datasetIdOrName, String username); @@ -201,8 +200,8 @@ public interface DataCatalogue { * Check if this role is present for this user in the organization. If he/she is * not present we need to add it with the given role. * - * @param username the username - * @param organizationName the organization name + * @param username the username + * @param organizationName the organization name * @param correspondentRoleToCheck the correspondent role to check * @return true if the role can be set, false if it cannot */ @@ -213,8 +212,8 @@ public interface DataCatalogue { * Check if this role is present for this user in the group. If he/she is not * present we need to add it with the given role. * - * @param username the username - * @param groupName the group name + * @param username the username + * @param groupName the group name * @param correspondentRoleToCheck the correspondent role to check * @return true if the role can be set, false if it cannot */ @@ -242,7 +241,7 @@ public interface DataCatalogue { * Get the parent groups of this group. * * @param groupName the group name - * @param apiKey the api key + * @param apiKey the api key * @return the group parent, if any */ List getParentGroups(String groupName, String apiKey); @@ -263,7 +262,6 @@ public interface DataCatalogue { */ boolean isNotificationToUsersEnabled(); - /** * *************************************************************************** * @@ -273,23 +271,23 @@ public interface DataCatalogue { * * ***************************************************************************. * - * @param username the username - * @param title the title - * @param name the name - * @param organizationName the organization name - * @param author the author - * @param authorMail the author mail - * @param maintainer the maintainer - * @param maintainerMail the maintainer mail - * @param version the version - * @param description the description - * @param licenseId the license id - * @param tags the tags + * @param username the username + * @param title the title + * @param name the name + * @param organizationName the organization name + * @param author the author + * @param authorMail the author mail + * @param maintainer the maintainer + * @param maintainerMail the maintainer mail + * @param version the version + * @param description the description + * @param licenseId the license id + * @param tags the tags * @param customFieldsMultiple the custom fields multiple - * @param resources the resources - * @param setPublic the set public - * @param setSearchable the set searchable - * @param socialPost the social post + * @param resources the resources + * @param setPublic the set public + * @param setSearchable the set searchable + * @param socialPost the social post * @return the string * @throws Exception the exception */ @@ -326,28 +324,13 @@ public interface DataCatalogue { List resources, boolean setPublic, boolean setSearchable, boolean socialPost) throws Exception; -// /** -// * Patch a product with product id productId by using the couples in -// * customFieldsToChange. NOTE: only the specified custom fields will be changed. -// * If a custom field with a given key already exists, and removeOld is set to -// * false, the new values are added at the end of the list. Otherwise they are -// * lost. -// * -// * @param productId the product id -// * @param customFieldsToChange the custom fields to change -// * @param removeOld the remove old -// * @return true, if successful -// */ -// boolean patchProductCustomFields(String productId, Map> customFieldsToChange, -// boolean removeOld); - /** * Add a resource described by the bean to the dataset id into * resource.datasetId * - * @param resourceBean the resource bean + * @param resourceBean the resource bean * @param organizationName the organization name - * @param username the username + * @param username the username * @return String the id of the resource on success, null otherwise */ String addResourceToDataset(ResourceBean resourceBean, String organizationName, String username) throws Exception; @@ -400,23 +383,38 @@ public interface DataCatalogue { * @return true, if successful */ boolean assignDatasetToGroup(String groupNameOrId, String datasetNameOrId); - - + /** - * Patch a product with product id productId by using the couples in customFieldsToChange. - * NOTE: only the specified custom fields will be changed. If a custom field with a given key - * already exists, and removeOld is set to false, the new values are added at the end of the list. Otherwise they are lost. + * Patch a product with product id productId by using the couples in + * customFieldsToChange. NOTE: only the specified custom fields will be changed. + * If a custom field with a given key already exists, and removeOld is set to + * false, the new values are added at the end of the list. Otherwise they are + * lost. * - * @param productId the product id - * @param username the username + * @param productId the product id + * @param username the username * @param customFieldsToChange the custom fields to change - * @param removeOld the remove old + * @param removeOld the remove old * @return true, if successful */ boolean patchProductCustomFields(String productId, String username, Map> customFieldsToChange, boolean removeOld); - + /** + * Patch a product with product id productId by using the couples in + * customFieldsToChange. NOTE: only the specified custom fields will be changed. + * If a custom field with a given key already exists, and removeOld is set to + * false, the new values are added at the end of the list. Otherwise they are + * lost. + * + * @param productId the product id + * @param customFieldsToChange the custom fields to change + * @param removeOld the remove old + * @return true, if successful + */ +// boolean patchProductCustomFields(String productId, Map> customFieldsToChange, +// boolean removeOld); + /** * ******************************************************************************** * @@ -426,9 +424,9 @@ public interface DataCatalogue { * * ********************************************************************************. * - * @param username the username + * @param username the username * @param sourceOrganization the source organization - * @param currentRole the current role + * @param currentRole the current role */ /** @@ -441,6 +439,4 @@ public interface DataCatalogue { */ void assignRolesOtherOrganization(String username, String sourceOrganization, RolesCkanGroupOrOrg currentRole); - - }