minor fixes
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@134125 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3f136e00a0
commit
483dd77608
|
@ -20,6 +20,7 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="${webappDirectory}/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="${webappDirectory}/WEB-INF/classes" path="src/main/resources">
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -270,4 +270,5 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<packaging>war</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class CKanMetadataPublisher implements EntryPoint {
|
||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
|
|
||||||
// remove comment to the below line for testing the widget
|
// remove comment to the below line for testing the widget
|
||||||
//startExample();
|
// startExample();
|
||||||
//testMetadata();
|
//testMetadata();
|
||||||
//testSelectionPanel();
|
//testSelectionPanel();
|
||||||
|
|
||||||
|
@ -71,25 +71,26 @@ public class CKanMetadataPublisher implements EntryPoint {
|
||||||
// childrenOfW.add(new ResourceElementBean(elementW, "File J", false, null, "Folder A:File W: File J"));
|
// childrenOfW.add(new ResourceElementBean(elementW, "File J", false, null, "Folder A:File W: File J"));
|
||||||
// listLeft.add(elementA);
|
// listLeft.add(elementA);
|
||||||
//
|
//
|
||||||
// String folderId = "e87bfc7d-4fb0-4795-9c79-0c495500ca9c";
|
|
||||||
// ckanServices.getTreeFolder(folderId, new AsyncCallback<ResourceElementBean>() {
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onSuccess(ResourceElementBean result) {
|
|
||||||
// if(result != null){
|
|
||||||
// RootPanel.get("ckan-metadata-publisher-div").add(new TwinColumnSelectionMainPanel(result));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onFailure(Throwable caught) {
|
|
||||||
//
|
|
||||||
// Window.alert("Failed to retrieve ResourceElementBean");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
|
String folderId = "e87bfc7d-4fb0-4795-9c79-0c495500ca9c";
|
||||||
|
ckanServices.getTreeFolder(folderId, new AsyncCallback<ResourceElementBean>() {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ResourceElementBean result) {
|
||||||
|
if(result != null){
|
||||||
|
RootPanel.get("ckan-metadata-publisher-div").add(new TwinColumnSelectionMainPanel(result));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
|
||||||
|
Window.alert("Failed to retrieve ResourceElementBean");
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
@ -190,7 +191,7 @@ public class CKanMetadataPublisher implements EntryPoint {
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private void startExample() {
|
private void startExample() {
|
||||||
|
|
||||||
String idFolderWorkspace = "d3a37eb9-1589-4c95-a9d0-c473a02d4f0f";
|
String idFolderWorkspace = "e87bfc7d-4fb0-4795-9c79-0c495500ca9c";
|
||||||
String owner = "costantino.perciante";
|
String owner = "costantino.perciante";
|
||||||
RootPanel.get("ckan-metadata-publisher-div").add(new CreateDatasetForm(idFolderWorkspace, eventBus));
|
RootPanel.get("ckan-metadata-publisher-div").add(new CreateDatasetForm(idFolderWorkspace, eventBus));
|
||||||
|
|
||||||
|
|
|
@ -67,10 +67,10 @@ public interface CKanPublisherService extends RemoteService {
|
||||||
*/
|
*/
|
||||||
boolean datasetIdAlreadyExists(String title);
|
boolean datasetIdAlreadyExists(String title);
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * Return a tree object representing the whole folder hierarchy
|
* Return a tree object representing the whole folder hierarchy
|
||||||
// * @param folderId
|
* @param folderId
|
||||||
// * @return ResourceElementBean
|
* @return ResourceElementBean
|
||||||
// */
|
*/
|
||||||
// ResourceElementBean getTreeFolder(String folderId);
|
ResourceElementBean getTreeFolder(String folderId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,12 +68,12 @@ public interface CKanPublisherServiceAsync {
|
||||||
*/
|
*/
|
||||||
void datasetIdAlreadyExists(String title, AsyncCallback<Boolean> callback);
|
void datasetIdAlreadyExists(String title, AsyncCallback<Boolean> callback);
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * Return a tree object representing the whole folder hierarchy
|
* Return a tree object representing the whole folder hierarchy
|
||||||
// * @param folderId
|
* @param folderId
|
||||||
// * @return ResourceElementBean
|
* @return ResourceElementBean
|
||||||
// */
|
*/
|
||||||
// void getTreeFolder(String folderId,
|
void getTreeFolder(String folderId,
|
||||||
// AsyncCallback<ResourceElementBean> callback);
|
AsyncCallback<ResourceElementBean> callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ import com.github.gwtbootstrap.client.ui.constants.AlertType;
|
||||||
import com.github.gwtbootstrap.client.ui.constants.ControlGroupType;
|
import com.github.gwtbootstrap.client.ui.constants.ControlGroupType;
|
||||||
import com.github.gwtbootstrap.client.ui.resources.Bootstrap.Tabs;
|
import com.github.gwtbootstrap.client.ui.resources.Bootstrap.Tabs;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.google.gwt.dom.client.Style.Unit;
|
||||||
import com.google.gwt.event.dom.client.ChangeEvent;
|
import com.google.gwt.event.dom.client.ChangeEvent;
|
||||||
import com.google.gwt.event.dom.client.ChangeHandler;
|
import com.google.gwt.event.dom.client.ChangeHandler;
|
||||||
import com.google.gwt.event.dom.client.ClickEvent;
|
import com.google.gwt.event.dom.client.ClickEvent;
|
||||||
|
@ -653,16 +654,13 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
// we need to show the page to handle resources one by one from the workspace
|
// we need to show the page to handle resources one by one from the workspace
|
||||||
formFirstStep.setVisible(false);
|
formFirstStep.setVisible(false);
|
||||||
boolean hideManageResources =
|
boolean hideManageResources = receivedBean.getResources() == null || receivedBean.getResources().isEmpty();
|
||||||
receivedBean.getResources() == null ||
|
|
||||||
receivedBean.getResources().isEmpty() ||
|
|
||||||
receivedBean.getResources().get(0).getChildren() == null ||
|
|
||||||
receivedBean.getResources().get(0).getChildren().isEmpty();
|
|
||||||
formSecondStep.setVisible(!hideManageResources);
|
formSecondStep.setVisible(!hideManageResources);
|
||||||
formThirdStep.setVisible(hideManageResources);
|
formThirdStep.setVisible(hideManageResources);
|
||||||
|
|
||||||
// add the resources to the container panel
|
// add the resources to the container panel
|
||||||
if(workspaceResourcesContainer.getWidget() == null){
|
if(workspaceResourcesContainer.getWidget() == null){
|
||||||
|
workspaceResourcesContainer.getElement().getStyle().setMarginLeft(20, Unit.PX);
|
||||||
workspaceResourcesContainer.add(resourcesTwinPanel);
|
workspaceResourcesContainer.add(resourcesTwinPanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1198,9 +1196,7 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
// disable profile fields
|
// disable profile fields
|
||||||
for (MetaDataFieldSkeleton field : listOfMetadataFields) {
|
for (MetaDataFieldSkeleton field : listOfMetadataFields) {
|
||||||
|
|
||||||
field.freeze();
|
field.freeze();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// freeze table of resources
|
// freeze table of resources
|
||||||
|
|
|
@ -13,6 +13,8 @@ import com.google.gwt.user.client.ui.Image;
|
||||||
*/
|
*/
|
||||||
public class ResourceCellLeft extends AbstractCell<ResourceElementBean>{
|
public class ResourceCellLeft extends AbstractCell<ResourceElementBean>{
|
||||||
private static final Images image = GWT.create(Images.class);
|
private static final Images image = GWT.create(Images.class);
|
||||||
|
private static final String tipFile = "Hold down the Control (ctrl) or Command button to select multiple options";
|
||||||
|
private static final String tipFolder = "Click on the folder to navigate it";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(com.google.gwt.cell.client.Cell.Context context,
|
public void render(com.google.gwt.cell.client.Cell.Context context,
|
||||||
|
@ -29,7 +31,8 @@ public class ResourceCellLeft extends AbstractCell<ResourceElementBean>{
|
||||||
folder.setWidth("15px");
|
folder.setWidth("15px");
|
||||||
folder.setHeight("15px");
|
folder.setHeight("15px");
|
||||||
|
|
||||||
sb.appendHtmlConstant("<div style='width:100%; min-height:30px; padding-top:5px;'>");
|
String whichTip = value.isFolder() ? tipFolder : tipFile;
|
||||||
|
sb.appendHtmlConstant("<div title='" + whichTip + "' style='width:100%; min-height:30px; padding-top:5px;'>");
|
||||||
sb.appendHtmlConstant("<span style='margin-left:5px;'>");
|
sb.appendHtmlConstant("<span style='margin-left:5px;'>");
|
||||||
sb.appendHtmlConstant(value.isFolder() ? folder.toString() : file.toString());
|
sb.appendHtmlConstant(value.isFolder() ? folder.toString() : file.toString());
|
||||||
sb.appendHtmlConstant("</span>");
|
sb.appendHtmlConstant("</span>");
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.TwinColumnSelection;
|
package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.TwinColumnSelection;
|
||||||
|
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.icons.Images;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.icons.Images;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.utils.GcubeDialogExtended;
|
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.ResourceElementBean;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.ResourceElementBean;
|
||||||
|
|
||||||
import com.google.gwt.cell.client.AbstractCell;
|
import com.google.gwt.cell.client.AbstractCell;
|
||||||
|
@ -19,6 +18,8 @@ import com.google.gwt.user.client.ui.Image;
|
||||||
public class ResourceCellRight extends AbstractCell<ResourceElementBean>{
|
public class ResourceCellRight extends AbstractCell<ResourceElementBean>{
|
||||||
|
|
||||||
private static final Images image = GWT.create(Images.class);
|
private static final Images image = GWT.create(Images.class);
|
||||||
|
private static final String tip = "Hold down the Control (CTRL) or Command button to select multiple options. Double click to access "
|
||||||
|
+ "this resource information";
|
||||||
|
|
||||||
public ResourceCellRight() {
|
public ResourceCellRight() {
|
||||||
super("keydown", "dblclick");
|
super("keydown", "dblclick");
|
||||||
|
@ -36,7 +37,7 @@ public class ResourceCellRight extends AbstractCell<ResourceElementBean>{
|
||||||
file.setWidth("15px");
|
file.setWidth("15px");
|
||||||
file.setHeight("15px");
|
file.setHeight("15px");
|
||||||
|
|
||||||
sb.appendHtmlConstant("<div style='width:100%; min-height:30px'>");
|
sb.appendHtmlConstant("<div title='" + tip + "' style='width:100%; min-height:30px; padding-top:5px;'>");
|
||||||
sb.appendHtmlConstant("<span style='margin-left:5px'>");
|
sb.appendHtmlConstant("<span style='margin-left:5px'>");
|
||||||
sb.appendHtmlConstant(file.toString());
|
sb.appendHtmlConstant(file.toString());
|
||||||
sb.appendHtmlConstant("</span>");
|
sb.appendHtmlConstant("</span>");
|
||||||
|
@ -52,13 +53,13 @@ public class ResourceCellRight extends AbstractCell<ResourceElementBean>{
|
||||||
public void onBrowserEvent(com.google.gwt.cell.client.Cell.Context context,
|
public void onBrowserEvent(com.google.gwt.cell.client.Cell.Context context,
|
||||||
Element parent, ResourceElementBean value, NativeEvent event,
|
Element parent, ResourceElementBean value, NativeEvent event,
|
||||||
ValueUpdater<ResourceElementBean> valueUpdater) {
|
ValueUpdater<ResourceElementBean> valueUpdater) {
|
||||||
if(value == null)
|
if(value == null || TwinColumnSelectionMainPanel.freezed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
super.onBrowserEvent(context, parent, value, event, valueUpdater);
|
super.onBrowserEvent(context, parent, value, event, valueUpdater);
|
||||||
ResourceInfoForm info = new ResourceInfoForm(value, valueUpdater);
|
ResourceInfoForm info = new ResourceInfoForm(value, valueUpdater);
|
||||||
GcubeDialogExtended panel = new GcubeDialogExtended(info);
|
if(TwinColumnSelectionMainPanel.detailContainer.getWidget() != null)
|
||||||
panel.setPopupPosition(parent.getAbsoluteLeft(), parent.getAbsoluteTop());
|
TwinColumnSelectionMainPanel.detailContainer.clear();
|
||||||
panel.show();
|
TwinColumnSelectionMainPanel.detailContainer.add(info);
|
||||||
|
TwinColumnSelectionMainPanel.detailContainer.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,10 @@ import com.github.gwtbootstrap.client.ui.ControlGroup;
|
||||||
import com.github.gwtbootstrap.client.ui.TextArea;
|
import com.github.gwtbootstrap.client.ui.TextArea;
|
||||||
import com.github.gwtbootstrap.client.ui.TextBox;
|
import com.github.gwtbootstrap.client.ui.TextBox;
|
||||||
import com.github.gwtbootstrap.client.ui.constants.ControlGroupType;
|
import com.github.gwtbootstrap.client.ui.constants.ControlGroupType;
|
||||||
|
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||||
import com.google.gwt.cell.client.ValueUpdater;
|
import com.google.gwt.cell.client.ValueUpdater;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.google.gwt.dom.client.Style.Float;
|
||||||
import com.google.gwt.event.dom.client.ClickEvent;
|
import com.google.gwt.event.dom.client.ClickEvent;
|
||||||
import com.google.gwt.event.dom.client.ClickHandler;
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
import com.google.gwt.uibinder.client.UiBinder;
|
import com.google.gwt.uibinder.client.UiBinder;
|
||||||
|
@ -25,17 +27,17 @@ import com.google.gwt.user.client.ui.Widget;
|
||||||
public class ResourceInfoForm extends Composite{
|
public class ResourceInfoForm extends Composite{
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
TextBox resourceName;
|
public TextBox resourceName;
|
||||||
@UiField
|
@UiField
|
||||||
TextBox resourcePath;
|
public TextBox resourcePath;
|
||||||
@UiField
|
@UiField
|
||||||
TextBox resourceFormat;
|
public TextBox resourceFormat;
|
||||||
@UiField
|
@UiField
|
||||||
TextArea resourceDescription;
|
public TextArea resourceDescription;
|
||||||
@UiField
|
@UiField
|
||||||
Button updateResourceButton;
|
public Button updateResourceButton;
|
||||||
// @UiField
|
@UiField
|
||||||
// Button cancelButton;
|
Button closeButton;
|
||||||
@UiField
|
@UiField
|
||||||
HorizontalPanel commandPanel;
|
HorizontalPanel commandPanel;
|
||||||
@UiField
|
@UiField
|
||||||
|
@ -56,28 +58,20 @@ public class ResourceInfoForm extends Composite{
|
||||||
|
|
||||||
public ResourceInfoForm(final ResourceElementBean resource, final ValueUpdater<ResourceElementBean> valueUpdater) {
|
public ResourceInfoForm(final ResourceElementBean resource, final ValueUpdater<ResourceElementBean> valueUpdater) {
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
this.resourceBean = resource;
|
|
||||||
this.resourceDescription.setText(resource.getDescription());
|
resourceBean = resource;
|
||||||
this.resourceFormat.setText(resource.getMimeType() == null? "Unavailable" : resource.getMimeType());
|
resourceDescription.setText(resource.getDescription());
|
||||||
this.resourceName.setText(resource.getName());
|
resourceFormat.setText(resource.getMimeType() == null? "Unavailable" : resource.getMimeType());
|
||||||
this.resourcePath.setText(resource.getFullPath());
|
resourceName.setText(resource.getEditableName());
|
||||||
|
resourcePath.setText(resource.getFullPath());
|
||||||
|
closeButton.getElement().getStyle().setFloat(Float.RIGHT);
|
||||||
|
closeButton.setIcon(IconType.REMOVE_CIRCLE);
|
||||||
commandPanel.setCellHorizontalAlignment(updateResourceButton, HasHorizontalAlignment.ALIGN_RIGHT);
|
commandPanel.setCellHorizontalAlignment(updateResourceButton, HasHorizontalAlignment.ALIGN_RIGHT);
|
||||||
|
|
||||||
// handlers
|
|
||||||
// cancelButton.addClickHandler(new ClickHandler() {
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onClick(ClickEvent event) {
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
updateResourceButton.addClickHandler(new ClickHandler() {
|
updateResourceButton.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
removeError(controlName);
|
removeError(controlName);
|
||||||
|
|
||||||
// check description
|
// check description
|
||||||
|
@ -93,6 +87,16 @@ public class ResourceInfoForm extends Composite{
|
||||||
valueUpdater.update(resourceBean);
|
valueUpdater.update(resourceBean);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
closeButton.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
|
clearPanel();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getResourceName() {
|
public String getResourceName() {
|
||||||
|
@ -135,4 +139,7 @@ public class ResourceInfoForm extends Composite{
|
||||||
control.setType(ControlGroupType.ERROR);
|
control.setType(ControlGroupType.ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void clearPanel() {
|
||||||
|
this.removeFromParent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,53 +3,71 @@
|
||||||
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||||
<ui:style>
|
<ui:style>
|
||||||
.legend-style {
|
.legend-style {
|
||||||
width: auto;
|
width: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-style {
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.labels-style {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls-style {
|
||||||
|
margin-left: 10px !important;
|
||||||
}
|
}
|
||||||
</ui:style>
|
</ui:style>
|
||||||
<g:HTMLPanel>
|
<g:HTMLPanel styleName="{style.panel-style}">
|
||||||
<b:Form type="VERTICAL">
|
<b:Form type="VERTICAL" width="100%">
|
||||||
<!-- <b:Fieldset styleName="{style.fieldset-border-style}"> -->
|
<!-- <b:Fieldset styleName="{style.fieldset-border-style}"> -->
|
||||||
<b:Legend styleName="{style.legend-style}">
|
<b:Legend styleName="{style.legend-style}">
|
||||||
Resource Information
|
<b>Resource Information</b>
|
||||||
|
<b:Button ui:field="closeButton" type="LINK" title="Close details"></b:Button>
|
||||||
</b:Legend>
|
</b:Legend>
|
||||||
<b:Label></b:Label>
|
|
||||||
<b:ControlGroup ui:field="controlName">
|
<b:ControlGroup ui:field="controlName">
|
||||||
<b:ControlLabel for="name"
|
<b:ControlLabel for="name" styleName="{style.labels-style}"
|
||||||
title="The name the resource will have on the catalogue">
|
title="The name the resource will have on the catalogue">
|
||||||
<b>Name:</b>
|
<b>Name:</b>
|
||||||
</b:ControlLabel>
|
</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls styleName="{style.controls-style}">
|
||||||
<b:TextBox placeholder="Resource name" b:id="name"
|
<b:TextBox placeholder="Resource name" b:id="name"
|
||||||
title="The name the resource will have on the catalogue" ui:field="resourceName" />
|
enabled="true" title="The name the resource will have on the catalogue"
|
||||||
|
ui:field="resourceName" />
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
<b:ControlGroup>
|
<b:ControlGroup>
|
||||||
<b:ControlLabel for="path" title="Resource path">
|
<b:ControlLabel for="path" title="Resource path"
|
||||||
|
styleName="{style.labels-style}">
|
||||||
<b>Path:</b>
|
<b>Path:</b>
|
||||||
</b:ControlLabel>
|
</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls styleName="{style.controls-style}">
|
||||||
<b:TextBox placeholder="Resource path" b:id="path"
|
<b:TextBox placeholder="Resource path" b:id="path"
|
||||||
readOnly="true" title="Resource path" ui:field="resourcePath" />
|
readOnly="true" title="Resource path" ui:field="resourcePath" />
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
<b:ControlGroup>
|
<b:ControlGroup>
|
||||||
<b:ControlLabel for="description"
|
<b:ControlLabel for="description" styleName="{style.labels-style}"
|
||||||
title="The description the resource will have on the catalogue">
|
title="The description the resource will have on the catalogue">
|
||||||
<b>Description:</b>
|
<b>Description:</b>
|
||||||
</b:ControlLabel>
|
</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls styleName="{style.controls-style}">
|
||||||
<b:TextArea placeholder="Resource description" b:id="description"
|
<b:TextArea placeholder="Resource description" b:id="description"
|
||||||
title="The description the resource will have on the catalogue"
|
title="The description the resource will have on the catalogue"
|
||||||
ui:field="resourceDescription"></b:TextArea>
|
ui:field="resourceDescription"></b:TextArea>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
<b:ControlGroup>
|
<b:ControlGroup>
|
||||||
<b:ControlLabel for="format" title="The MIME type">
|
<b:ControlLabel for="format" styleName="{style.labels-style}"
|
||||||
|
title="The MIME type">
|
||||||
<b>Format:</b>
|
<b>Format:</b>
|
||||||
</b:ControlLabel>
|
</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls styleName="{style.controls-style}">
|
||||||
<b:TextBox placeholder="Resource format" b:id="format"
|
<b:TextBox placeholder="Resource format" b:id="format"
|
||||||
title="The MIME type" ui:field="resourceFormat" readOnly="true" />
|
title="The MIME type" ui:field="resourceFormat" readOnly="true" />
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
|
|
|
@ -15,6 +15,7 @@ import com.github.gwtbootstrap.client.ui.NavLink;
|
||||||
import com.google.gwt.cell.client.ValueUpdater;
|
import com.google.gwt.cell.client.ValueUpdater;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.dom.client.Style.BorderStyle;
|
import com.google.gwt.dom.client.Style.BorderStyle;
|
||||||
|
import com.google.gwt.dom.client.Style.FontWeight;
|
||||||
import com.google.gwt.dom.client.Style.Unit;
|
import com.google.gwt.dom.client.Style.Unit;
|
||||||
import com.google.gwt.event.dom.client.ClickEvent;
|
import com.google.gwt.event.dom.client.ClickEvent;
|
||||||
import com.google.gwt.event.dom.client.ClickHandler;
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
|
@ -23,6 +24,7 @@ import com.google.gwt.uibinder.client.UiField;
|
||||||
import com.google.gwt.user.cellview.client.CellList;
|
import com.google.gwt.user.cellview.client.CellList;
|
||||||
import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy;
|
import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy;
|
||||||
import com.google.gwt.user.client.ui.Composite;
|
import com.google.gwt.user.client.ui.Composite;
|
||||||
|
import com.google.gwt.user.client.ui.SimplePanel;
|
||||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
import com.google.gwt.view.client.ListDataProvider;
|
import com.google.gwt.view.client.ListDataProvider;
|
||||||
|
@ -59,6 +61,8 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
FluidContainer mainContainerResourcesSelection;
|
FluidContainer mainContainerResourcesSelection;
|
||||||
// @UiField
|
// @UiField
|
||||||
// Button getResources;
|
// Button getResources;
|
||||||
|
@UiField
|
||||||
|
public static SimplePanel detailContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The breadcrumb subpath with the linked folder
|
* The breadcrumb subpath with the linked folder
|
||||||
|
@ -74,6 +78,7 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean freezed = false;
|
||||||
private List<PathBean> pathListBeans = new ArrayList<PathBean>();
|
private List<PathBean> pathListBeans = new ArrayList<PathBean>();
|
||||||
private static final String PANEL_BORDER_COLOR = "#8899a6";
|
private static final String PANEL_BORDER_COLOR = "#8899a6";
|
||||||
private static final String PANEL_HEIGHT = "400px";
|
private static final String PANEL_HEIGHT = "400px";
|
||||||
|
@ -118,6 +123,13 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
// resourceInfoButton.getElement().getStyle().setPaddingRight(0, Unit.PX);
|
// resourceInfoButton.getElement().getStyle().setPaddingRight(0, Unit.PX);
|
||||||
mainContainerResourcesSelection.getElement().getStyle().setPadding(10, Unit.PX);
|
mainContainerResourcesSelection.getElement().getStyle().setPadding(10, Unit.PX);
|
||||||
|
|
||||||
|
breadcrumbs.getElement().getStyle().setBackgroundColor("white");
|
||||||
|
breadcrumbs.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
||||||
|
breadcrumbs.getElement().getStyle().setMarginLeft(0, Unit.PX);
|
||||||
|
mainContainerResourcesSelection.getElement().getStyle().setMarginLeft(10, Unit.PX);
|
||||||
|
mainContainerResourcesSelection.getElement().getStyle().setMarginBottom(20, Unit.PX);
|
||||||
|
mainContainerResourcesSelection.getElement().getStyle().setMarginTop(0, Unit.PX);
|
||||||
|
|
||||||
prepareHandlers();
|
prepareHandlers();
|
||||||
initLeftSidePanel(initialBean);
|
initLeftSidePanel(initialBean);
|
||||||
initRightSidePanel();
|
initRightSidePanel();
|
||||||
|
@ -144,6 +156,10 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
selectionModelLeft.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
|
selectionModelLeft.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
|
||||||
|
|
||||||
public void onSelectionChange(SelectionChangeEvent event) {
|
public void onSelectionChange(SelectionChangeEvent event) {
|
||||||
|
|
||||||
|
if(freezed)
|
||||||
|
return;
|
||||||
|
|
||||||
Iterator<ResourceElementBean> selectedObjectsIterator = selectionModelLeft.getSelectedSet().iterator();
|
Iterator<ResourceElementBean> selectedObjectsIterator = selectionModelLeft.getSelectedSet().iterator();
|
||||||
|
|
||||||
while (selectedObjectsIterator.hasNext()) {
|
while (selectedObjectsIterator.hasNext()) {
|
||||||
|
@ -155,6 +171,7 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
|
|
||||||
// update path
|
// update path
|
||||||
final NavLink navElem = new NavLink(selectedBean.getName());
|
final NavLink navElem = new NavLink(selectedBean.getName());
|
||||||
|
navElem.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
||||||
final PathBean pathBean = new PathBean(navElem, selectedBean);
|
final PathBean pathBean = new PathBean(navElem, selectedBean);
|
||||||
|
|
||||||
navElem.addClickHandler(new ClickHandler() {
|
navElem.addClickHandler(new ClickHandler() {
|
||||||
|
@ -196,6 +213,7 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
// add root to breadcrumb
|
// add root to breadcrumb
|
||||||
final NavLink root = new NavLink(initialBean.getName());
|
final NavLink root = new NavLink(initialBean.getName());
|
||||||
final PathBean pathBean = new PathBean(root, initialBean);
|
final PathBean pathBean = new PathBean(root, initialBean);
|
||||||
|
root.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
||||||
pathListBeans.add(pathBean);
|
pathListBeans.add(pathBean);
|
||||||
breadcrumbs.add(root);
|
breadcrumbs.add(root);
|
||||||
|
|
||||||
|
@ -293,6 +311,10 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
// perform an action on selection
|
// perform an action on selection
|
||||||
selectionModelRight.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
|
selectionModelRight.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
|
||||||
public void onSelectionChange(SelectionChangeEvent event) {
|
public void onSelectionChange(SelectionChangeEvent event) {
|
||||||
|
|
||||||
|
if(freezed)
|
||||||
|
return;
|
||||||
|
|
||||||
enableMoveToLeftButtons(selectionModelRight.getSelectedSet());
|
enableMoveToLeftButtons(selectionModelRight.getSelectedSet());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -440,12 +462,15 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
*/
|
*/
|
||||||
public void freeze() {
|
public void freeze() {
|
||||||
|
|
||||||
|
freezed = true;
|
||||||
|
|
||||||
Iterator<Widget> iteratorOverPath = breadcrumbs.iterator();
|
Iterator<Widget> iteratorOverPath = breadcrumbs.iterator();
|
||||||
while (iteratorOverPath.hasNext()) {
|
while (iteratorOverPath.hasNext()) {
|
||||||
Widget widget = (Widget) iteratorOverPath.next();
|
Widget widget = (Widget) iteratorOverPath.next();
|
||||||
if(widget instanceof NavLink)
|
if(widget instanceof NavLink)
|
||||||
((NavLink)widget).setActive(false);
|
((NavLink)widget).setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
allToRightButton.setEnabled(false);
|
allToRightButton.setEnabled(false);
|
||||||
toRightButton.setEnabled(false);
|
toRightButton.setEnabled(false);
|
||||||
allToLeftButton.setEnabled(false);
|
allToLeftButton.setEnabled(false);
|
||||||
|
|
|
@ -16,21 +16,21 @@
|
||||||
<!-- </b:Column> -->
|
<!-- </b:Column> -->
|
||||||
<!-- </b:FluidRow> -->
|
<!-- </b:FluidRow> -->
|
||||||
<b:FluidRow>
|
<b:FluidRow>
|
||||||
<b:Column offset="1" size="10">
|
<b:Column size="11">
|
||||||
<b:Breadcrumbs ui:field="breadcrumbs" divider=">"
|
<b:Breadcrumbs ui:field="breadcrumbs" divider=">"
|
||||||
title="Current path">
|
title="Current path">
|
||||||
</b:Breadcrumbs>
|
</b:Breadcrumbs>
|
||||||
</b:Column>
|
</b:Column>
|
||||||
</b:FluidRow>
|
</b:FluidRow>
|
||||||
<b:FluidRow>
|
<b:FluidRow>
|
||||||
<b:Column offset="1" size="4" ui:field="leftColumn">
|
<b:Column size="3" ui:field="leftColumn">
|
||||||
<!-- <b:Button enabled="true" type="LINK" ui:field="goRootButton">Root
|
<!-- <b:Button enabled="true" type="LINK" ui:field="goRootButton">Root
|
||||||
level</b:Button> -->
|
level</b:Button> -->
|
||||||
<!-- <b:Button enabled="true" type="LINK" ui:field="goUpButton">Go up</b:Button> -->
|
<!-- <b:Button enabled="true" type="LINK" ui:field="goUpButton">Go up</b:Button> -->
|
||||||
<g:VerticalPanel ui:field="leftContainer" width="100%">
|
<g:VerticalPanel ui:field="leftContainer" width="100%">
|
||||||
</g:VerticalPanel>
|
</g:VerticalPanel>
|
||||||
</b:Column>
|
</b:Column>
|
||||||
<b:Column size="2" ui:field="centralPanel">
|
<b:Column size="1" ui:field="centralPanel">
|
||||||
<g:VerticalPanel ui:field="buttonsPanel">
|
<g:VerticalPanel ui:field="buttonsPanel">
|
||||||
<b:Button ui:field="allToRightButton" name="toRight"
|
<b:Button ui:field="allToRightButton" name="toRight"
|
||||||
enabled="false" title="Add selected files" text=">>" />
|
enabled="false" title="Add selected files" text=">>" />
|
||||||
|
@ -42,9 +42,12 @@
|
||||||
enabled="false" title="Remove selected files" text="<<" />
|
enabled="false" title="Remove selected files" text="<<" />
|
||||||
</g:VerticalPanel>
|
</g:VerticalPanel>
|
||||||
</b:Column>
|
</b:Column>
|
||||||
<b:Column size="4" ui:field="rightColumn">
|
<b:Column size="3" ui:field="rightColumn">
|
||||||
<g:VerticalPanel ui:field="rightContainer" width="100%"></g:VerticalPanel>
|
<g:VerticalPanel ui:field="rightContainer" width="100%"></g:VerticalPanel>
|
||||||
</b:Column>
|
</b:Column>
|
||||||
|
<b:Column size="3" ui:field="detailColumn">
|
||||||
|
<g:SimplePanel ui:field="detailContainer" width="100%"></g:SimplePanel>
|
||||||
|
</b:Column>
|
||||||
<!-- <b:Column size="2"> -->
|
<!-- <b:Column size="2"> -->
|
||||||
<!-- <m:ResourceInfoForm ui:field="resourceInfoForm"></m:ResourceInfoForm> -->
|
<!-- <m:ResourceInfoForm ui:field="resourceInfoForm"></m:ResourceInfoForm> -->
|
||||||
<!-- </b:Column> -->
|
<!-- </b:Column> -->
|
||||||
|
|
|
@ -4,6 +4,7 @@ import org.gcube.portlets.user.gcubewidgets.client.popup.GCubeDialog;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.TwinColumnSelection.ResourceInfoForm;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.TwinColumnSelection.ResourceInfoForm;
|
||||||
|
|
||||||
import com.github.gwtbootstrap.client.ui.Paragraph;
|
import com.github.gwtbootstrap.client.ui.Paragraph;
|
||||||
|
import com.google.gwt.core.shared.GWT;
|
||||||
import com.google.gwt.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
import com.google.gwt.dom.client.EventTarget;
|
import com.google.gwt.dom.client.EventTarget;
|
||||||
import com.google.gwt.dom.client.Style.Cursor;
|
import com.google.gwt.dom.client.Style.Cursor;
|
||||||
|
@ -15,6 +16,7 @@ import com.google.gwt.user.client.ui.Anchor;
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
import com.google.gwt.user.client.ui.FlexTable;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||||
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extended version of the GcubeDialog with close symbol on the caption
|
* Extended version of the GcubeDialog with close symbol on the caption
|
||||||
|
@ -109,29 +111,45 @@ public class GcubeDialogExtended extends GCubeDialog {
|
||||||
});
|
});
|
||||||
|
|
||||||
setWidget(form);
|
setWidget(form);
|
||||||
HTML widget = (HTML)getWidget();
|
Widget widget = getWidget();
|
||||||
|
|
||||||
widget.addClickHandler(new ClickHandler() {
|
ClickHandler click = new ClickHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
EventTarget target = event.getNativeEvent().getEventTarget();
|
EventTarget target = event.getNativeEvent().getEventTarget();
|
||||||
Element targetElement = (Element) target.cast();
|
Element targetElement = (Element) target.cast();
|
||||||
if (targetElement == form.getElement()) {
|
GWT.log("Target elem is " + targetElement);
|
||||||
|
if (targetElement == form.resourceDescription.getElement()) {
|
||||||
|
GWT.log("Fired click");
|
||||||
|
form.resourceDescription.fireEvent(event);
|
||||||
|
}else if (targetElement == form.resourceName.getElement()) {
|
||||||
|
GWT.log("Fired click");
|
||||||
|
form.resourceName.fireEvent(event);
|
||||||
|
}else if(targetElement == form.getElement()){
|
||||||
form.fireEvent(event);
|
form.fireEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
widget.addDomHandler(click, ClickEvent.getType());
|
||||||
|
|
||||||
widget.addDoubleClickHandler(new DoubleClickHandler() {
|
widget.addDomHandler(new DoubleClickHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDoubleClick(DoubleClickEvent event) {
|
public void onDoubleClick(DoubleClickEvent event) {
|
||||||
EventTarget target = event.getNativeEvent().getEventTarget();
|
EventTarget target = event.getNativeEvent().getEventTarget();
|
||||||
Element targetElement = (Element) target.cast();
|
Element targetElement = (Element) target.cast();
|
||||||
if (targetElement == form.getElement()) {
|
GWT.log("Target elem is " + targetElement);
|
||||||
|
if (targetElement == form.resourceDescription.getElement()) {
|
||||||
|
GWT.log("Fired click");
|
||||||
|
form.resourceDescription.fireEvent(event);
|
||||||
|
}else if (targetElement == form.resourceName.getElement()) {
|
||||||
|
GWT.log("Fired click");
|
||||||
|
form.resourceName.fireEvent(event);
|
||||||
|
}else if(targetElement == form.getElement()){
|
||||||
form.fireEvent(event);
|
form.fireEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}, DoubleClickEvent.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.gcube.application.framework.core.session.ASLSession;
|
import org.gcube.application.framework.core.session.ASLSession;
|
||||||
import org.gcube.application.framework.core.session.SessionManager;
|
import org.gcube.application.framework.core.session.SessionManager;
|
||||||
|
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||||
|
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||||
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue;
|
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue;
|
||||||
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogueFactory;
|
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogueFactory;
|
||||||
import org.gcube.datacatalogue.ckanutillibrary.models.ResourceBean;
|
import org.gcube.datacatalogue.ckanutillibrary.models.ResourceBean;
|
||||||
|
@ -556,44 +558,44 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public ResourceElementBean getTreeFolder(String folderId) {
|
public ResourceElementBean getTreeFolder(String folderId) {
|
||||||
//
|
|
||||||
// if(folderId == null || folderId.isEmpty()){
|
if(folderId == null || folderId.isEmpty()){
|
||||||
// logger.warn("Empty folder id or null, returning");
|
logger.warn("Empty folder id or null, returning");
|
||||||
// return null;
|
return null;
|
||||||
// }
|
}
|
||||||
// ASLSession session = getASLSession();
|
ASLSession session = getASLSession();
|
||||||
// try{
|
try{
|
||||||
// if(!isWithinPortal()){
|
if(!isWithinPortal()){
|
||||||
// logger.warn("Running outside the portal");
|
logger.warn("Running outside the portal");
|
||||||
// Workspace ws = getFakeWS();
|
Workspace ws = getFakeWS();
|
||||||
// ResourceElementBean toReturn = WorkspaceUtils.getTreeFromFolder(folderId, ws);
|
ResourceElementBean toReturn = WorkspaceUtils.getTreeFromFolder(folderId, ws);
|
||||||
// logger.debug("Returning " + toReturn);
|
logger.debug("Returning " + toReturn);
|
||||||
// return toReturn;
|
return toReturn;
|
||||||
// }else{
|
}else{
|
||||||
// if(session.getUsername().equals(TEST_USER)){
|
if(session.getUsername().equals(TEST_USER)){
|
||||||
// return null;
|
return null;
|
||||||
// }else{
|
}else{
|
||||||
// // TODO
|
// TODO
|
||||||
// return null;
|
return null;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }catch(Exception e){
|
}catch(Exception e){
|
||||||
// logger.error("Failed to build the tree", e);
|
logger.error("Failed to build the tree", e);
|
||||||
// }
|
}
|
||||||
// return null;
|
return null;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * Retrieve the workspace for the development user
|
* Retrieve the workspace for the development user
|
||||||
// * @return
|
* @return
|
||||||
// * @throws Exception
|
* @throws Exception
|
||||||
// */
|
*/
|
||||||
// private Workspace getFakeWS() throws Exception{
|
private Workspace getFakeWS() throws Exception{
|
||||||
// return HomeLibrary
|
return HomeLibrary
|
||||||
// .getHomeManagerFactory()
|
.getHomeManagerFactory()
|
||||||
// .getHomeManager()
|
.getHomeManager()
|
||||||
// .getHome(getDevelopmentUser()).getWorkspace();
|
.getHome(getDevelopmentUser()).getWorkspace();
|
||||||
// }
|
}
|
||||||
}
|
}
|
|
@ -10,12 +10,6 @@ import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.apache.http.HttpEntity;
|
|
||||||
import org.apache.http.HttpResponse;
|
|
||||||
import org.apache.http.client.methods.HttpPost;
|
|
||||||
import org.apache.http.entity.StringEntity;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
|
||||||
import org.apache.http.impl.client.HttpClientBuilder;
|
|
||||||
import org.gcube.application.framework.core.session.ASLSession;
|
import org.gcube.application.framework.core.session.ASLSession;
|
||||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||||
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||||
|
@ -53,6 +47,12 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
import eu.trentorise.opendata.jackan.internal.org.apache.http.HttpEntity;
|
||||||
|
import eu.trentorise.opendata.jackan.internal.org.apache.http.HttpResponse;
|
||||||
|
import eu.trentorise.opendata.jackan.internal.org.apache.http.client.methods.HttpPost;
|
||||||
|
import eu.trentorise.opendata.jackan.internal.org.apache.http.entity.StringEntity;
|
||||||
|
import eu.trentorise.opendata.jackan.internal.org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
import eu.trentorise.opendata.jackan.internal.org.apache.http.impl.client.HttpClientBuilder;
|
||||||
import eu.trentorise.opendata.jackan.model.CkanOrganization;
|
import eu.trentorise.opendata.jackan.model.CkanOrganization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,7 @@ public class TestClass {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUser() {
|
public void testUser() {
|
||||||
assert(new CKANPublisherServicesImpl().getDevelopmentUser().equals(CKANPublisherServicesImpl.TEST_USER));
|
// assert(new CKANPublisherServicesImpl().getDevelopmentUser().equals(CKANPublisherServicesImpl.TEST_USER));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue