diff --git a/pom.xml b/pom.xml index b3d3573..964efc8 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.gcube.portlets.widgets ckan-metadata-publisher-widget - 1.2.1-SNAPSHOT + 1.2.2-SNAPSHOT gCube Ckan metadata publisher widget diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java index c838c28..92133b1 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java @@ -168,9 +168,9 @@ public class CreateDatasetForm extends Composite{ private static final String NONE_PROFILE = "none"; // error/info messages - protected static final String ERROR_PRODUCT_CREATION = "There was an error while trying to publish your product, sorry.. Retry later"; - protected static final String PRODUCT_CREATED_OK = "Product correctly published!"; - private static final String TRYING_TO_CREATE_PRODUCT = "Trying to publish the product, please wait"; + protected static final String ERROR_PRODUCT_CREATION = "There was an error while trying to publish your item, sorry.. Retry later"; + protected static final String PRODUCT_CREATED_OK = "Item correctly published!"; + private static final String TRYING_TO_CREATE_PRODUCT = "Trying to publish the item, please wait"; protected static final String MISSING_PUBLISH_RIGHTS = "It seems you are not authorized to publish on catalogue. Request it to the VRE manager or the portal administrator."; // tab panel @@ -699,14 +699,14 @@ public class CreateDatasetForm extends Composite{ if(!titleTextBox.isEnabled()) actionsAfterOnContinue(); else{ - alertOnContinue("Checking if a product with such title already exists, please wait...", AlertType.INFO); + alertOnContinue("Checking if a item with such title already exists, please wait...", AlertType.INFO); ckanServices.datasetIdAlreadyExists(titleTextBox.getText(), new AsyncCallback() { @Override public void onSuccess(Boolean result) { if(result){ - alertOnContinue("Sorry but a product with such title already exists, try to change it", AlertType.WARNING); + alertOnContinue("Sorry but an item with such title already exists, try to change it", AlertType.WARNING); }else{ actionsAfterOnContinue(); } @@ -1283,7 +1283,7 @@ public class CreateDatasetForm extends Composite{ // at least one tag.. if(tagsPanel.getTags().isEmpty()){ tagsPanel.setGroupPanelType(ControlGroupType.ERROR); - return "Please add at least one meaningful tag for the product"; + return "Please add at least one meaningful tag for the item"; } return null; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml index bcb7a47..6ce794e 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml @@ -51,7 +51,7 @@ - Insert Product Information + Insert Item Information * is required @@ -63,13 +63,13 @@ visible="false" ui:field="infoBlock" styleName="{style.block-alert-style}"> - + * Title : - + @@ -82,12 +82,12 @@ - + Description: - License: - @@ -133,9 +133,9 @@ - Visibility: + Visibility: - Restricted Public @@ -154,7 +154,7 @@ Publish in: + to publish the item">Publish in: @@ -164,23 +164,23 @@ + title="Item version expressed as positive integer number"> Version: + width="90%" title="Item version" ui:field="versionTextbox" /> - + * Author: - + * Author Email: + title="Item author" ui:field="authorEmailTextbox" /> @@ -214,12 +214,12 @@ - + Maintainer: - + Maintainer Email: - Product + Item Profile: none @@ -273,11 +273,11 @@ - Product Groups: + Item Groups: @@ -294,7 +294,7 @@ + text="Please note that the item you are going to publish will not have resources."> @@ -347,7 +347,7 @@ ui:field="formThirdStep" visible="false"> - Insert Product Profile Information + Insert Item Profile Information * is required @@ -386,15 +386,15 @@ - Go to product - Go to the Item + - Add Resources - Create - Go to product - Go to the Item + diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/utils/InfoIconsLabels.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/utils/InfoIconsLabels.java index 170090a..c47e3c6 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/utils/InfoIconsLabels.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/utils/InfoIconsLabels.java @@ -26,7 +26,7 @@ public class InfoIconsLabels { public static final String TAGS_INFO_ID_POPUP = "tags-popup-panel-info"; public static final String TAGS_INFO_CAPTION = "Tags"; public static final String TAGS_INFO_TEXT = "Tags are meaningful information that can be associated to the " - + "product and by means of them it can be retrieved. A tag can contain only alphanumeric characters. " + + "item and by means of them it can be retrieved. A tag can contain only alphanumeric characters. " + "If the tag is composed by a single word it must have a size of at least two characters." + "Examples of good tags: \"This is a sample tag\", \"tagY\". Example of bad tag: \"c\"."; @@ -38,12 +38,12 @@ public class InfoIconsLabels { // VISIBILITY public static final String VISIBILITY_INFO_ID_POPUP = "visibility-popup-panel-info"; public static final String VISIBILITY_INFO_CAPTION = "Visibility"; - public static final String VISIBILITY_INFO_TEXT = "Restricted products can only be accessed by certain users, while Public products can be accessed by anyone."; + public static final String VISIBILITY_INFO_TEXT = "Restricted items can only be accessed by certain users, while public items can be accessed by anyone."; // AUTHOR public static final String AUTHOR_INFO_ID_POPUP = "author-popup-panel-info"; public static final String AUTHOR_INFO_CAPTION = "Author's fullname"; - public static final String AUTHOR_INFO_TEXT = "The author of this product. Example: Joe Bloggs."; + public static final String AUTHOR_INFO_TEXT = "The author of this item. Example: Joe Bloggs."; // AUTHOR EMAIL public static final String AUTHOR_EMAIL_INFO_ID_POPUP = "author-email-popup-panel-info"; @@ -53,7 +53,7 @@ public class InfoIconsLabels { // MAINTAINER public static final String MAINTAINER_INFO_ID_POPUP = "maintainer-popup-panel-info"; public static final String MAINTAINER_INFO_CAPTION = "Maintainer"; - public static final String MAINTAINER_INFO_TEXT = "The maintainer of this product (a person or an organization). Examples: Joe Bloggs, D4Science"; + public static final String MAINTAINER_INFO_TEXT = "The maintainer of this item (a person or an organization). Examples: Joe Bloggs, D4Science"; // MAINTAINER EMAIL public static final String MAINTAINER_EMAIL_INFO_ID_POPUP = "maintainer-email-popup-panel-info"; @@ -62,35 +62,35 @@ public class InfoIconsLabels { // PROFILES public static final String PROFILES_INFO_ID_POPUP = "product-profiles-popup-panel-info"; - public static final String PROFILES_INFO_CAPTION = "Product Profiles"; - public static final String PROFILES_INFO_TEXT = "Select a profile, different from none, for your product among the ones available"; + public static final String PROFILES_INFO_CAPTION = "Item Profiles"; + public static final String PROFILES_INFO_TEXT = "Select a profile, different from none, for your item among the ones available"; // RESOURCES public static final String RESOURCES_INFO_ID_POPUP = "resouces-popup-panel-info"; - public static final String RESOURCES_INFO_CAPTION = "Manage resource products"; - public static final String RESOURCES_INFO_TEXT = "Move the files you want to attach to the product on the right panel below. Double click on the item for changing resource's name or description." + public static final String RESOURCES_INFO_CAPTION = "Manage resource items"; + public static final String RESOURCES_INFO_TEXT = "Move the files you want to attach to the item on the right panel below. Double click on the item for changing resource's name or description." + " Please consider that any complex hierarchy structure you may have will be flatten."; // CUSTOM FIELDS public static final String CUSTOM_FIELDS_INFO_ID_POPUP = "custom-fields-popup-panel-info"; - public static final String CUSTOM_FIELDS_INFO_CAPTION = "Product Custom Fields"; - public static final String CUSTOM_FIELDS_INFO_TEXT = "Custom fields are customable metadata that will be added to the product. You have to choose a unique key for the field and a value for this. You can remove them at any time until you create the product."; + public static final String CUSTOM_FIELDS_INFO_CAPTION = "Item Custom Fields"; + public static final String CUSTOM_FIELDS_INFO_TEXT = "Custom fields are customable metadata that will be added to the item. You can remove them at any time until you create the item."; // TITLE public static final String TITLE_INFO_ID_POPUP = "title-popup-panel-info"; - public static final String TITLE_INFO_TEXT = "Product Title must contain only alphanumer characters, dots, underscore or hyphen minus. No others symbols are allowed. Please note that this field will be always visible, despite the product's visibility."; - public static final String TITLE_INFO_CAPTION = "Product Title"; + public static final String TITLE_INFO_TEXT = "Item Title must contain only alphanumer characters, dots, underscore or hyphen minus. No others symbols are allowed. Please note that this field will be always visible, despite the item's visibility."; + public static final String TITLE_INFO_CAPTION = "Item Title"; // DESCRIPTION public static final String DESCRIPTION_INFO_ID_POPUP = "description-popup-panel-info"; public static final String DESCRIPTION_INFO_TEXT = "Description of a few sentences, written in plain language. Should provide a sufficiently comprehensive overview of the resource for anyone, " - + "to understand its content, origins, and any continuing work on it. The description can be written at the end, since it summarizes key, information from the other metadata fields. Please note that this field will be always visible, despite the product's visibility."; - public static final String DESCRIPTION_INFO_CAPTION = "Product Description"; + + "to understand its content, origins, and any continuing work on it. The description can be written at the end, since it summarizes key, information from the other metadata fields. Please note that this field will be always visible, despite the item's visibility."; + public static final String DESCRIPTION_INFO_CAPTION = "Item Description"; // GROUPS public static final String GROUPS_INFO_ID_POPUP = "groups-popup-panel-info"; - public static final String GROUPS_INFO_TEXT = "Associate this product to groups. A group is a view of products belonging to one or more organization."; - public static final String GROUPS_INFO_CAPTION = "Product Groups"; + public static final String GROUPS_INFO_TEXT = "Associate this item to groups. A group is a view of items belonging to one or more organization."; + public static final String GROUPS_INFO_CAPTION = "Item Groups"; /** diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java index 7250e68..deb2371 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java @@ -56,7 +56,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C // Logger //private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CKANPublisherServicesImpl.class); private static final Log logger = LogFactoryUtil.getLog(CKANPublisherServicesImpl.class); - private static final String PRODUCT_URL_FIELD = "Product URL"; + private static final String ITEM_URL_FIELD = "Item URL"; // map private ConcurrentHashMap mapOrganizationScope = new ConcurrentHashMap(); @@ -291,7 +291,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C // add also this information as custom field Map> addField = new HashMap>(); - addField.put(PRODUCT_URL_FIELD, Arrays.asList(datasetUrl)); + addField.put(ITEM_URL_FIELD, Arrays.asList(datasetUrl)); utils.patchProductCustomFields(datasetId, userApiKey, addField); // start a thread that will associate this dataset with the group diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java index 34ef2c1..d651f5c 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java @@ -28,8 +28,8 @@ public class AssociationToGroupAndNotifyThread extends Thread { //private static final Logger logger = LoggerFactory.getLogger(AssociationToGroupAndNotifyThread.class); private static final Log logger = LogFactoryUtil.getLog(AssociationToGroupAndNotifyThread.class); - private static final String PRODUCT_ASSOCIATED_TO_GROUP_SUBJECT = "Product $TITLE added to group $GROUP"; - private static final String PRODUCT_ASSOCIATED_TO_GROUP_BODY = "Dear user,
a new product named '$TITLE' has been " + private static final String PRODUCT_ASSOCIATED_TO_GROUP_SUBJECT = "Item $TITLE added to group $GROUP"; + private static final String PRODUCT_ASSOCIATED_TO_GROUP_BODY = "Dear user,
a new item named '$TITLE' has been " + "just published by $USER_FULLNAME in $GROUP .
" + "You can find it here $DATASET_URL"; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/utils/Utils.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/utils/Utils.java index b833aca..b3bab73 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/utils/Utils.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/utils/Utils.java @@ -71,7 +71,7 @@ public class Utils { //private static final org.slf4j.Logger logger = LoggerFactory.getLogger(Utils.class); private static final Log logger = LogFactoryUtil.getLog(Utils.class); private static final String APPLICATION_ID_CATALOGUE_MANAGER = "org.gcube.datacatalogue.ProductCatalogue"; - private static final String NOTIFICATION_MESSAGE = "Dear members,
The product 'PRODUCT_TITLE' has been just published by USER_FULLNAME.
You can find it here: PRODUCT_URL
"; + private static final String NOTIFICATION_MESSAGE = "Dear members,
The item 'PRODUCT_TITLE' has been just published by USER_FULLNAME.
You can find it here: PRODUCT_URL
"; private static final String SOCIAL_SERVICE_APPLICATION_TOKEN = "/2/tokens/generate-application-token"; private static final String SOCIAL_SERVICE_WRITE_APPLICATION_POST = "/2/posts/write-post-app"; private static final String MEDIATYPE_JSON = "application/json";