Completed #9760: WS-Thredds synch folder integration
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@154741 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5ddc436148
commit
6dd28cceb7
|
@ -1,13 +1,18 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-17-2"
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-18-0"
|
||||||
date="2017-09-27">
|
date="2017-09-29">
|
||||||
<Change>Incident #9676: fixed. Removed check on get sub-folder public link when operation is performed by an administrator</Change>
|
|
||||||
<Change>Feature #9760: WS-Thredds synch folder integration</Change>
|
<Change>Feature #9760: WS-Thredds synch folder integration</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-17-2"
|
||||||
|
date="2017-09-13">
|
||||||
|
<Change>Incident #9676: fixed. Removed check on get sub-folder public
|
||||||
|
link when operation is performed by an administrator</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-17-1"
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-17-1"
|
||||||
date="2017-07-10">
|
date="2017-07-10">
|
||||||
<Change>Added regex in order to remove list of chars when renaming or
|
<Change>Added regex in order to remove list of chars when renaming or
|
||||||
creating new item. It is different for folder and item name</Change>
|
creating new item. It is different for folder and item name
|
||||||
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-17-0"
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-17-0"
|
||||||
date="2017-05-22">
|
date="2017-05-22">
|
||||||
|
|
18
pom.xml
18
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>workspace-tree-widget</artifactId>
|
<artifactId>workspace-tree-widget</artifactId>
|
||||||
<version>6.17.2-SNAPSHOT</version>
|
<version>6.18.0-SNAPSHOT</version>
|
||||||
<name>gCube Workspace Tree Widget</name>
|
<name>gCube Workspace Tree Widget</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
||||||
|
@ -20,6 +20,15 @@
|
||||||
<developerConnection>scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</developerConnection>
|
<developerConnection>scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</developerConnection>
|
||||||
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</url>
|
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
|
<!-- USED FROM ECLIPSELINK -->
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>eclipselink</id>
|
||||||
|
<url>http://maven.research-infrastructures.eu:8081/nexus/content/repositories/eclipselink/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Convenience property to set the GWT version -->
|
<!-- Convenience property to set the GWT version -->
|
||||||
<gwtVersion>2.7.0</gwtVersion>
|
<gwtVersion>2.7.0</gwtVersion>
|
||||||
|
@ -99,6 +108,13 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.2.11</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.usecases</groupId>
|
<groupId>org.gcube.usecases</groupId>
|
||||||
<artifactId>ws-thredds</artifactId>
|
<artifactId>ws-thredds</artifactId>
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.gcube.portlets.user.workspace.shared.PublicLink;
|
||||||
import org.gcube.portlets.user.workspace.shared.ReportAssignmentACL;
|
import org.gcube.portlets.user.workspace.shared.ReportAssignmentACL;
|
||||||
import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
|
import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
|
||||||
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
||||||
|
import org.gcube.portlets.user.workspace.shared.TransferToThreddsProperty;
|
||||||
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
||||||
import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
|
import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
|
||||||
import org.gcube.portlets.user.workspace.shared.UserBean;
|
import org.gcube.portlets.user.workspace.shared.UserBean;
|
||||||
|
@ -789,24 +790,36 @@ public interface GWTWorkspaceService extends RemoteService{
|
||||||
*/
|
*/
|
||||||
List<GcubeVRE> getListOfVREsForLoggedUser()
|
List<GcubeVRE> getListOfVREsForLoggedUser()
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param folderToPublishId
|
* Publish on thredds catalogue.
|
||||||
* @param folderMetadataId
|
*
|
||||||
* @param vreScope
|
* @param folderToPublishId the folder to publish id
|
||||||
* @param catalogueName
|
* @param folderMetadataId the folder metadata id
|
||||||
* @return
|
* @param vreName the vre name
|
||||||
* @throws Exception
|
* @param vreScope the vre scope
|
||||||
|
* @param catalogueName the catalogue name
|
||||||
|
* @return the transfer on thredds report
|
||||||
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
TransferOnThreddsReport publishOnThreddsCatalogue(
|
TransferOnThreddsReport publishOnThreddsCatalogue(
|
||||||
String folderToPublishId, String folderMetadataId, String vreScope,
|
String folderToPublishId, String folderMetadataId, String vreName, String vreScope,
|
||||||
String catalogueName)
|
String catalogueName)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param transferId
|
* Gets the status of publishing on thredds catalogue.
|
||||||
* @return
|
*
|
||||||
* @throws Exception
|
* @param transferId the transfer id
|
||||||
|
* @return the status of publishing on thredds catalogue
|
||||||
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
TransferOnThreddsReport getStatusOfPublishingOnThreddsCatalogue(String transferId)
|
TransferOnThreddsReport getStatusOfPublishingOnThreddsCatalogue(String transferId)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
/**
|
||||||
|
* @param folderId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
TransferToThreddsProperty getTransferToThreddsProperty(String folderId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.gcube.portlets.user.workspace.shared.GarbageItem;
|
||||||
import org.gcube.portlets.user.workspace.shared.PublicLink;
|
import org.gcube.portlets.user.workspace.shared.PublicLink;
|
||||||
import org.gcube.portlets.user.workspace.shared.ReportAssignmentACL;
|
import org.gcube.portlets.user.workspace.shared.ReportAssignmentACL;
|
||||||
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
||||||
|
import org.gcube.portlets.user.workspace.shared.TransferToThreddsProperty;
|
||||||
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
||||||
import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
|
import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
|
||||||
import org.gcube.portlets.user.workspace.shared.UserBean;
|
import org.gcube.portlets.user.workspace.shared.UserBean;
|
||||||
|
@ -792,16 +793,27 @@ public interface GWTWorkspaceServiceAsync {
|
||||||
*
|
*
|
||||||
* @param folderToPublishId the folder to publish id
|
* @param folderToPublishId the folder to publish id
|
||||||
* @param folderMetadataId the folder metadata id
|
* @param folderMetadataId the folder metadata id
|
||||||
|
* @param vreName the vre name
|
||||||
* @param vreScope the vre scope
|
* @param vreScope the vre scope
|
||||||
* @param catalogueName the catalogue name
|
* @param catalogueName the catalogue name
|
||||||
* @param callback the callback
|
* @param callback the callback
|
||||||
*/
|
*/
|
||||||
void publishOnThreddsCatalogue(
|
void publishOnThreddsCatalogue(
|
||||||
String folderToPublishId, String folderMetadataId, String vreScope,
|
String folderToPublishId, String folderMetadataId, String vreName, String vreScope,
|
||||||
String catalogueName, AsyncCallback<TransferOnThreddsReport> callback);
|
String catalogueName, AsyncCallback<TransferOnThreddsReport> callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the status of publishing on thredds catalogue.
|
||||||
|
*
|
||||||
|
* @param transferId the transfer id
|
||||||
|
* @param callback the callback
|
||||||
|
* @return the status of publishing on thredds catalogue
|
||||||
|
*/
|
||||||
void getStatusOfPublishingOnThreddsCatalogue(
|
void getStatusOfPublishingOnThreddsCatalogue(
|
||||||
String transferId, AsyncCallback<TransferOnThreddsReport> callback);
|
String transferId, AsyncCallback<TransferOnThreddsReport> callback);
|
||||||
|
|
||||||
|
void getTransferToThreddsProperty(
|
||||||
|
String folderId, AsyncCallback<TransferToThreddsProperty> callback);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,13 @@ import org.gcube.portlets.user.workspace.client.event.RefreshFolderEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||||
import org.gcube.portlets.user.workspace.client.model.GcubeVRE;
|
import org.gcube.portlets.user.workspace.client.model.GcubeVRE;
|
||||||
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
||||||
|
import org.gcube.portlets.user.workspace.shared.TransferToThreddsProperty;
|
||||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||||
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
|
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
|
||||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||||
|
|
||||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||||
|
import com.extjs.gxt.ui.client.core.XDOM;
|
||||||
import com.extjs.gxt.ui.client.event.BaseEvent;
|
import com.extjs.gxt.ui.client.event.BaseEvent;
|
||||||
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
||||||
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
||||||
|
@ -61,6 +63,9 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
private ListStore<GcubeVRE> vreStore = new ListStore<GcubeVRE>();
|
private ListStore<GcubeVRE> vreStore = new ListStore<GcubeVRE>();
|
||||||
|
|
||||||
public static List<GcubeVRE> listOfVres = null;
|
public static List<GcubeVRE> listOfVres = null;
|
||||||
|
private Label infoOnLoading = new Label("");
|
||||||
|
|
||||||
|
private DialogPublishOnThredds INSTANCE = this;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,7 +76,48 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
public DialogPublishOnThredds(FileModel theFolderToPublish) {
|
public DialogPublishOnThredds(FileModel theFolderToPublish) {
|
||||||
|
|
||||||
this.theFolderToPublish = theFolderToPublish;
|
this.theFolderToPublish = theFolderToPublish;
|
||||||
|
infoOnLoading.setType(LabelType.INFO);
|
||||||
|
infoOnLoading.setVisible(true);
|
||||||
|
infoOnLoading.setText("Loading Configurations...");
|
||||||
initLayout();
|
initLayout();
|
||||||
|
INSTANCE.enablePublish(false);
|
||||||
|
AppControllerExplorer.rpcWorkspaceService.getTransferToThreddsProperty(theFolderToPublish.getIdentifier(), new AsyncCallback<TransferToThreddsProperty>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
GWT.log("Error on loading TransferToThreddsProperty: "+caught.getMessage());
|
||||||
|
infoOnLoading.setVisible(false);
|
||||||
|
//initiFormFields();
|
||||||
|
INSTANCE.enablePublish(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(TransferToThreddsProperty result) {
|
||||||
|
GWT.log("Loaded TransferToThreddsProperty: "+result);
|
||||||
|
//initiFormFields();
|
||||||
|
|
||||||
|
if(result!=null){
|
||||||
|
txtCatalogueName.setValue(result.getCatalogueName());
|
||||||
|
|
||||||
|
for (GcubeVRE gvre : vreStore.getModels()) {
|
||||||
|
if(gvre.getScope().compareTo(result.getVreScope())==0){
|
||||||
|
selectVRE.setValue(gvre);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(result.getMetadataFolderId()!=null && result.getMetadataFolderName()!=null){
|
||||||
|
|
||||||
|
metadataFolder = new FileModel(result.getMetadataFolderId(), result.getMetadataFolderName(), true);
|
||||||
|
triggerFieldMetadataFolderName.setValue(metadataFolder.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
infoOnLoading.setVisible(false);
|
||||||
|
INSTANCE.enablePublish(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,6 +158,7 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
vreStore.add(listOfVres);
|
vreStore.add(listOfVres);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new dialog add folder and smart.
|
* Instantiates a new dialog add folder and smart.
|
||||||
*/
|
*/
|
||||||
|
@ -135,6 +182,7 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
this.getButtonById(Dialog.OK).setText("Publish");
|
this.getButtonById(Dialog.OK).setText("Publish");
|
||||||
this.getButtonById(Dialog.CANCEL).setText("Close");
|
this.getButtonById(Dialog.CANCEL).setText("Close");
|
||||||
// this.getButtonById(Dialog.CANCEL).setText("Reset");
|
// this.getButtonById(Dialog.CANCEL).setText("Reset");
|
||||||
|
|
||||||
txtCatalogueName = new TextField<String>();
|
txtCatalogueName = new TextField<String>();
|
||||||
txtCatalogueName.setEmptyText("Type a Name...");
|
txtCatalogueName.setEmptyText("Type a Name...");
|
||||||
txtCatalogueName.setAllowBlank(false);
|
txtCatalogueName.setAllowBlank(false);
|
||||||
|
@ -202,11 +250,13 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
if (isValidForm()){
|
if (isValidForm()){
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
|
GWT.log("metadataFolder: "+metadataFolder);
|
||||||
|
|
||||||
String metadataFolderId = metadataFolder!=null?metadataFolder.getIdentifier():null;
|
String metadataFolderId = metadataFolder!=null?metadataFolder.getIdentifier():null;
|
||||||
|
|
||||||
GcubeVRE vre = selectVRE.getSelection().get(0);
|
GcubeVRE vre = selectVRE.getSelection().get(0);
|
||||||
|
GWT.log("metadataFolderId: "+metadataFolderId);
|
||||||
AppControllerExplorer.rpcWorkspaceService.publishOnThreddsCatalogue(theFolderToPublish.getIdentifier(), metadataFolderId, vre.getScope(), txtCatalogueName.getValue(), new AsyncCallback<TransferOnThreddsReport>() {
|
AppControllerExplorer.rpcWorkspaceService.publishOnThreddsCatalogue(theFolderToPublish.getIdentifier(), metadataFolderId, vre.getName(), vre.getScope(), txtCatalogueName.getValue(), new AsyncCallback<TransferOnThreddsReport>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
@ -230,7 +280,9 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
setFocusWidget(txtCatalogueName);
|
setFocusWidget(txtCatalogueName);
|
||||||
|
add(infoOnLoading);
|
||||||
add(txtCatalogueName);
|
add(txtCatalogueName);
|
||||||
add(selectVRE);
|
add(selectVRE);
|
||||||
//add(browse);
|
//add(browse);
|
||||||
|
@ -239,11 +291,25 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
mandatory.setType(LabelType.INFO);
|
mandatory.setType(LabelType.INFO);
|
||||||
//mandatory.getElement().getStyle().set("#FF0000");
|
//mandatory.getElement().getStyle().set("#FF0000");
|
||||||
add(mandatory);
|
add(mandatory);
|
||||||
//add(hp);
|
|
||||||
|
|
||||||
this.show();
|
this.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable publish.
|
||||||
|
*
|
||||||
|
* @param enable the enable
|
||||||
|
*/
|
||||||
|
private void enablePublish(boolean enable){
|
||||||
|
this.getButtonById(Dialog.OK).setEnabled(enable);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show result.
|
||||||
|
*
|
||||||
|
* @param result the result
|
||||||
|
*/
|
||||||
public void showResult(TransferOnThreddsReport result){
|
public void showResult(TransferOnThreddsReport result){
|
||||||
|
|
||||||
|
|
||||||
|
@ -259,6 +325,11 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Polling start.
|
||||||
|
*
|
||||||
|
* @param result the result
|
||||||
|
*/
|
||||||
public void pollingStart(final TransferOnThreddsReport result){
|
public void pollingStart(final TransferOnThreddsReport result){
|
||||||
|
|
||||||
showResult(result);
|
showResult(result);
|
||||||
|
@ -351,6 +422,7 @@ public class DialogPublishOnThredds extends Dialog {
|
||||||
};
|
};
|
||||||
|
|
||||||
navigator.addWorkspaceExplorerSelectNotificationListener(listener);
|
navigator.addWorkspaceExplorerSelectNotificationListener(listener);
|
||||||
|
navigator.setZIndex(XDOM.getTopZIndex()+50);
|
||||||
navigator.show();
|
navigator.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2278,7 +2278,6 @@ public class GWTWorkspaceBuilder {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To version history.
|
* To version history.
|
||||||
*
|
*
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.gcube.common.homelibrary.home.Home;
|
||||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||||
import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException;
|
import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException;
|
||||||
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||||
|
import org.gcube.common.homelibrary.home.workspace.Properties;
|
||||||
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
|
import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
|
||||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||||
|
@ -70,6 +71,7 @@ import org.gcube.portlets.user.workspace.server.util.AclTypeComparator;
|
||||||
import org.gcube.portlets.user.workspace.server.util.DifferenceBetweenInfoContactModel;
|
import org.gcube.portlets.user.workspace.server.util.DifferenceBetweenInfoContactModel;
|
||||||
import org.gcube.portlets.user.workspace.server.util.PortalContextInfo;
|
import org.gcube.portlets.user.workspace.server.util.PortalContextInfo;
|
||||||
import org.gcube.portlets.user.workspace.server.util.StringUtil;
|
import org.gcube.portlets.user.workspace.server.util.StringUtil;
|
||||||
|
import org.gcube.portlets.user.workspace.server.util.TransferringToThreddsUtil;
|
||||||
import org.gcube.portlets.user.workspace.server.util.UserUtil;
|
import org.gcube.portlets.user.workspace.server.util.UserUtil;
|
||||||
import org.gcube.portlets.user.workspace.server.util.WsUtil;
|
import org.gcube.portlets.user.workspace.server.util.WsUtil;
|
||||||
import org.gcube.portlets.user.workspace.server.util.resource.PropertySpecialFolderReader;
|
import org.gcube.portlets.user.workspace.server.util.resource.PropertySpecialFolderReader;
|
||||||
|
@ -81,6 +83,7 @@ import org.gcube.portlets.user.workspace.shared.PublicLink;
|
||||||
import org.gcube.portlets.user.workspace.shared.ReportAssignmentACL;
|
import org.gcube.portlets.user.workspace.shared.ReportAssignmentACL;
|
||||||
import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
|
import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
|
||||||
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
import org.gcube.portlets.user.workspace.shared.TransferOnThreddsReport;
|
||||||
|
import org.gcube.portlets.user.workspace.shared.TransferToThreddsProperty;
|
||||||
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
||||||
import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
|
import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
|
||||||
import org.gcube.portlets.user.workspace.shared.UserBean;
|
import org.gcube.portlets.user.workspace.shared.UserBean;
|
||||||
|
@ -4024,6 +4027,15 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#performOperationOnVersionedFile(java.lang.String, java.util.List, org.gcube.portlets.user.workspace.shared.WorkspaceVersioningOperation)
|
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#performOperationOnVersionedFile(java.lang.String, java.util.List, org.gcube.portlets.user.workspace.shared.WorkspaceVersioningOperation)
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Perform operation on versioned file.
|
||||||
|
*
|
||||||
|
* @param fileId the file id
|
||||||
|
* @param olderVersionIDs the older version i ds
|
||||||
|
* @param operation the operation
|
||||||
|
* @return the list
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<FileVersionModel> performOperationOnVersionedFile(
|
public List<FileVersionModel> performOperationOnVersionedFile(
|
||||||
String fileId, List<String> olderVersionIDs,
|
String fileId, List<String> olderVersionIDs,
|
||||||
|
@ -4108,6 +4120,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#getImagesForFolder(java.lang.String, java.lang.String)
|
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#getImagesForFolder(java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Gets the images for folder.
|
||||||
|
*
|
||||||
|
* @param folderId the folder id
|
||||||
|
* @param currentImageId the current image id
|
||||||
|
* @return the images for folder
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<GWTWorkspaceItem> getImagesForFolder(String folderId, String currentImageId) throws Exception {
|
public List<GWTWorkspaceItem> getImagesForFolder(String folderId, String currentImageId) throws Exception {
|
||||||
|
|
||||||
|
@ -4171,6 +4191,12 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#getListOfVREsForLoggedUser()
|
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#getListOfVREsForLoggedUser()
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Gets the list of vr es for logged user.
|
||||||
|
*
|
||||||
|
* @return the list of vr es for logged user
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<GcubeVRE> getListOfVREsForLoggedUser() throws Exception{
|
public List<GcubeVRE> getListOfVREsForLoggedUser() throws Exception{
|
||||||
workspaceLogger.debug("getListOfVREsForLoggedUser...: ");
|
workspaceLogger.debug("getListOfVREsForLoggedUser...: ");
|
||||||
|
@ -4182,12 +4208,10 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
GroupManager groupManager = new LiferayGroupManager();
|
GroupManager groupManager = new LiferayGroupManager();
|
||||||
List<GcubeVRE> listOfVres = new ArrayList<GcubeVRE>();
|
List<GcubeVRE> listOfVres = new ArrayList<GcubeVRE>();
|
||||||
|
|
||||||
|
|
||||||
if (isTestMode()){
|
if (isTestMode()){
|
||||||
listOfVres.add(new GcubeVRE("devVRE", "/gcube/devsec/devVRE"));
|
listOfVres.add(new GcubeVRE("devVRE", "/gcube/devsec/devVRE"));
|
||||||
listOfVres.add(new GcubeVRE("NextNext", "/gcube/devNext/NextNext"));
|
listOfVres.add(new GcubeVRE("NextNext", "/gcube/devNext/NextNext"));
|
||||||
return listOfVres;
|
return listOfVres;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -4216,23 +4240,51 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
* Publish on thredds catalogue.
|
* Publish on thredds catalogue.
|
||||||
*
|
*
|
||||||
* @param folderToPublishId the folder to publish id
|
* @param folderToPublishId the folder to publish id
|
||||||
* @param folderMetadataId the folder metadata id
|
* @param metadataFolderId the folder metadata id
|
||||||
|
* @param vreName the vre name
|
||||||
* @param vreTargetScope the vre scope
|
* @param vreTargetScope the vre scope
|
||||||
* @param catalogueName the catalogue name
|
* @param catalogueName the catalogue name
|
||||||
* @return the transfer on thredds report
|
* @return the transfer on thredds report
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TransferOnThreddsReport publishOnThreddsCatalogue(String folderToPublishId, String folderMetadataId, String vreTargetScope, String catalogueName) throws Exception{
|
public TransferOnThreddsReport publishOnThreddsCatalogue(final String folderToPublishId, final String metadataFolderId, final String vreName, final String vreTargetScope, final String catalogueName) throws Exception{
|
||||||
workspaceLogger.info("Publishing on thredds the folderId: "+folderToPublishId+", metafolderId: "+folderMetadataId +", vre target scope: "+vreTargetScope);
|
workspaceLogger.info("Publishing on thredds the folderId: "+folderToPublishId+", metadataFolderId: "+metadataFolderId +", vre target scope: "+vreTargetScope);
|
||||||
System.out.println("Publishing on thredds the folderId: "+folderToPublishId+", metafolderId: "+folderMetadataId +", vre target scope: "+vreTargetScope);
|
|
||||||
try{
|
try{
|
||||||
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
|
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
|
||||||
String wsScope = PortalContext.getConfiguration().getCurrentScope(this.getThreadLocalRequest());
|
String wsScope = PortalContext.getConfiguration().getCurrentScope(this.getThreadLocalRequest());
|
||||||
String wsUserToken = PortalContext.getConfiguration().getCurrentUserToken(wsScope, user.getUsername());
|
String wsUserToken = PortalContext.getConfiguration().getCurrentUserToken(wsScope, user.getUsername());
|
||||||
String targetScopeUserToken = PortalContext.getConfiguration().getCurrentUserToken(vreTargetScope, user.getUsername());
|
String targetScopeUserToken = PortalContext.getConfiguration().getCurrentUserToken(vreTargetScope, user.getUsername());
|
||||||
PublishOnThredds pub = new PublishOnThredds(wsUserToken, user.getUsername(), this.getThreadLocalRequest().getSession());
|
PublishOnThredds pub = new PublishOnThredds(wsUserToken, user.getUsername(), this.getThreadLocalRequest().getSession());
|
||||||
return pub.publishFolder(folderToPublishId, folderMetadataId, targetScopeUserToken, catalogueName);
|
TransferOnThreddsReport report = pub.publishFolder(folderToPublishId, metadataFolderId, targetScopeUserToken, catalogueName);
|
||||||
|
workspaceLogger.debug("Report created: "+report);
|
||||||
|
|
||||||
|
try{
|
||||||
|
//SAVING THREDDS TRANSFERING CONFIGURATIONS
|
||||||
|
String metadataFolderName = null;
|
||||||
|
if(metadataFolderId!=null){
|
||||||
|
Workspace ws = getWorkspace();
|
||||||
|
WorkspaceItem metadataFolder = ws.getItem(metadataFolderId);
|
||||||
|
metadataFolderName = metadataFolder.getName();
|
||||||
|
}
|
||||||
|
//System.out.println("metadataFolderName name: "+metadataFolderName);
|
||||||
|
String xmlProperties = TransferringToThreddsUtil.toXML(new TransferToThreddsProperty(folderToPublishId, catalogueName, vreName, vreTargetScope, metadataFolderId, metadataFolderName));
|
||||||
|
workspaceLogger.debug("Transfer to Thredds xmlProperties is:"+ xmlProperties);
|
||||||
|
Map<String, String> properties = getPropertiesForWorkspaceItemId(folderToPublishId);
|
||||||
|
|
||||||
|
if(properties!=null){
|
||||||
|
String key = TransferToThreddsProperty.class.getSimpleName();
|
||||||
|
properties.put(key, xmlProperties);
|
||||||
|
workspaceLogger.info("Adding gcube property ["+key+ ", "+xmlProperties +"] to itemId: "+folderToPublishId);
|
||||||
|
setPropertiesForWorkspaceItemId(folderToPublishId, properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
}catch (Exception e) {
|
||||||
|
workspaceLogger.warn("Error adding the TransferToThreddsProperty to item: "+folderToPublishId, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return report;
|
||||||
|
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
workspaceLogger.error("Error occurred server-side when transfer to Thredds: ", e);
|
workspaceLogger.error("Error occurred server-side when transfer to Thredds: ", e);
|
||||||
throw new Exception("Sorry, an error occurred server-side performing transfer to Thredds, try again later");
|
throw new Exception("Sorry, an error occurred server-side performing transfer to Thredds, try again later");
|
||||||
|
@ -4240,6 +4292,100 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the properties for workspace item id.
|
||||||
|
*
|
||||||
|
* @param itemId the item id
|
||||||
|
* @return the properties for workspace item id
|
||||||
|
*/
|
||||||
|
private Map<String, String> getPropertiesForWorkspaceItemId(String itemId){
|
||||||
|
|
||||||
|
try{
|
||||||
|
if(itemId==null || itemId.isEmpty())
|
||||||
|
return null;
|
||||||
|
|
||||||
|
Workspace ws = getWorkspace();
|
||||||
|
WorkspaceItem workItem = ws.getItem(itemId);
|
||||||
|
Properties properties = workItem.getProperties();
|
||||||
|
return properties.getProperties();
|
||||||
|
}catch(Exception e){
|
||||||
|
workspaceLogger.warn("Error on getting properties for item id: "+itemId, e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the properties for workspace item id.
|
||||||
|
*
|
||||||
|
* @param itemId the item id
|
||||||
|
* @param properties the properties
|
||||||
|
*/
|
||||||
|
private void setPropertiesForWorkspaceItemId(String itemId, Map<String, String> properties){
|
||||||
|
|
||||||
|
try{
|
||||||
|
if(itemId==null || itemId.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
Workspace ws = getWorkspace();
|
||||||
|
WorkspaceItem workItem = ws.getItem(itemId);
|
||||||
|
workItem.getProperties().addProperties(properties);
|
||||||
|
}catch(Exception e){
|
||||||
|
workspaceLogger.warn("Error on setting properties for item id: "+itemId, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the transfer to thredds property read from folderId.
|
||||||
|
*
|
||||||
|
* @param folderId the folder id
|
||||||
|
* @return the transfer to thredds property
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TransferToThreddsProperty getTransferToThreddsProperty(String folderId){
|
||||||
|
workspaceLogger.debug("Performing getTransferToThreddsProperty for folderId: "+folderId);
|
||||||
|
try {
|
||||||
|
Map<String, String> properties = getPropertiesForWorkspaceItemId(folderId);
|
||||||
|
workspaceLogger.trace("Properties are: "+properties);
|
||||||
|
|
||||||
|
if(properties==null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
String theXMLThreddsProperty = properties.get(TransferToThreddsProperty.class.getSimpleName());
|
||||||
|
workspaceLogger.trace(TransferToThreddsProperty.class.getSimpleName() +" is: "+theXMLThreddsProperty);
|
||||||
|
if(theXMLThreddsProperty==null){
|
||||||
|
workspaceLogger.info("Transfer To Thredds properties does not exist for the folder id: "+folderId +", returning null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
TransferToThreddsProperty theObject = TransferringToThreddsUtil.toObject(theXMLThreddsProperty);
|
||||||
|
|
||||||
|
if(theObject.getMetadataFolderId()!=null){
|
||||||
|
Workspace ws = getWorkspace();
|
||||||
|
String metadataFolderName = null;
|
||||||
|
try{
|
||||||
|
FolderItem metadataFolder = (FolderItem) ws.getItem(theObject.getMetadataFolderId());
|
||||||
|
metadataFolderName = metadataFolder.getName();
|
||||||
|
theObject.setMetadataFolderName(metadataFolderName);
|
||||||
|
}catch(Exception e){
|
||||||
|
workspaceLogger.warn("Error on getting metadata folder name for id: "+metadataFolderName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("Returning: "+theObject);
|
||||||
|
workspaceLogger.debug("Returning: "+theObject);
|
||||||
|
return theObject;
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
workspaceLogger.error("Error occurred server-side when gettomg TransferToThreddsProperty for folderId: "+folderId, e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the publishing on thredds catalogue.
|
* Gets the publishing on thredds catalogue.
|
||||||
*
|
*
|
||||||
|
@ -4252,8 +4398,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
workspaceLogger.debug("Getting publishing on thredds for transfer id: "+transferId);
|
workspaceLogger.debug("Getting publishing on thredds for transfer id: "+transferId);
|
||||||
TransferOnThreddsReport tr = null;
|
TransferOnThreddsReport tr = null;
|
||||||
try{
|
try{
|
||||||
tr = PublishOnThredds.getStatusOfTransferId(this.getThreadLocalRequest().getSession(), transferId);
|
return PublishOnThredds.getStatusOfTransferId(this.getThreadLocalRequest().getSession(), transferId);
|
||||||
return tr;
|
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
workspaceLogger.error("Error occurred server-side when getting the status of transferring on Thredds: ", e);
|
workspaceLogger.error("Error occurred server-side when getting the status of transferring on Thredds: ", e);
|
||||||
tr.setOnError(true);
|
tr.setOnError(true);
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.user.workspace.server.util;
|
||||||
|
|
||||||
|
import java.io.StringReader;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
import javax.xml.bind.Marshaller;
|
||||||
|
import javax.xml.bind.Unmarshaller;
|
||||||
|
import javax.xml.transform.stream.StreamSource;
|
||||||
|
|
||||||
|
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.gcube.portlets.user.workspace.shared.TransferToThreddsProperty;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TransferringToThreddsUtil.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* Sep 29, 2017
|
||||||
|
*/
|
||||||
|
public class TransferringToThreddsUtil {
|
||||||
|
|
||||||
|
public static Logger logger = Logger.getLogger(TransferringToThreddsUtil.class);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To xml.
|
||||||
|
*
|
||||||
|
* @param property the property
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
|
public static String toXML(TransferToThreddsProperty property) {
|
||||||
|
logger.debug("Marshalling: "+property);
|
||||||
|
System.out.println("Marshalling: "+property);
|
||||||
|
try{
|
||||||
|
// Create a JaxBContext
|
||||||
|
JAXBContext jc = JAXBContext.newInstance(TransferToThreddsProperty.class);
|
||||||
|
// Create the Marshaller Object using the JaxB Context
|
||||||
|
Marshaller marshaller = jc.createMarshaller();
|
||||||
|
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
|
||||||
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
|
marshaller.marshal(property, baos);
|
||||||
|
String marshallingJsonString = baos.toString("UTF-8");
|
||||||
|
//System.out.println("XML: "+marshallingJsonString);
|
||||||
|
return marshallingJsonString;
|
||||||
|
}catch(JAXBException | UnsupportedEncodingException e){
|
||||||
|
logger.warn("Error during marshalling: "+property, e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unmarshalling To OBJECT.
|
||||||
|
*
|
||||||
|
* @param xml the xml
|
||||||
|
* @return the transfering to thredds property
|
||||||
|
*/
|
||||||
|
public static TransferToThreddsProperty toObject(String xml){
|
||||||
|
// Create a JaxBContext
|
||||||
|
JAXBContext jc;
|
||||||
|
try {
|
||||||
|
|
||||||
|
jc = JAXBContext.newInstance(TransferToThreddsProperty.class);
|
||||||
|
|
||||||
|
// Create the Unmarshaller Object using the JaxB Context
|
||||||
|
Unmarshaller unmarshaller = jc.createUnmarshaller();
|
||||||
|
|
||||||
|
// Create the StreamSource by creating StringReader using the JSON input
|
||||||
|
StreamSource stream = new StreamSource(new StringReader(xml));
|
||||||
|
|
||||||
|
// Getting the TransferingToThreddsProperty pojo again from the json
|
||||||
|
return unmarshaller.unmarshal(stream, TransferToThreddsProperty.class).getValue();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (JAXBException e) {
|
||||||
|
logger.warn("Error during unmarshalling: "+xml, e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,199 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.user.workspace.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TransferToThreddsProperty.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* Sep 29, 2017
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlRootElement
|
||||||
|
public class TransferToThreddsProperty implements Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -7160662779647989154L;
|
||||||
|
|
||||||
|
|
||||||
|
private String folderId;
|
||||||
|
private String catalogueName;
|
||||||
|
private String vreName;
|
||||||
|
private String vreScope;
|
||||||
|
private String metadataFolderId;
|
||||||
|
private String metadataFolderName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new transfering to thredds property.
|
||||||
|
*/
|
||||||
|
public TransferToThreddsProperty() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new transfering to thredds property.
|
||||||
|
*
|
||||||
|
* @param folderId the folder id
|
||||||
|
* @param catalogueName the catalogue name
|
||||||
|
* @param vreName the vre name
|
||||||
|
* @param vreScope the vre scope
|
||||||
|
* @param metadataFolderId the metadata folder id
|
||||||
|
*/
|
||||||
|
public TransferToThreddsProperty(
|
||||||
|
String folderId, String catalogueName, String vreName,
|
||||||
|
String vreScope, String metadataFolderId, String metadataFolderName) {
|
||||||
|
|
||||||
|
super();
|
||||||
|
this.folderId = folderId;
|
||||||
|
this.catalogueName = catalogueName;
|
||||||
|
this.vreName = vreName;
|
||||||
|
this.vreScope = vreScope;
|
||||||
|
this.metadataFolderId = metadataFolderId;
|
||||||
|
this.metadataFolderName = metadataFolderName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the folderId
|
||||||
|
*/
|
||||||
|
public String getFolderId() {
|
||||||
|
|
||||||
|
return folderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the catalogueName
|
||||||
|
*/
|
||||||
|
public String getCatalogueName() {
|
||||||
|
|
||||||
|
return catalogueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the vreName
|
||||||
|
*/
|
||||||
|
public String getVreName() {
|
||||||
|
|
||||||
|
return vreName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the vreScope
|
||||||
|
*/
|
||||||
|
public String getVreScope() {
|
||||||
|
|
||||||
|
return vreScope;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the metadataFolderId
|
||||||
|
*/
|
||||||
|
public String getMetadataFolderId() {
|
||||||
|
|
||||||
|
return metadataFolderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the metadataFolderName
|
||||||
|
*/
|
||||||
|
public String getMetadataFolderName() {
|
||||||
|
|
||||||
|
return metadataFolderName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param folderId the folderId to set
|
||||||
|
*/
|
||||||
|
public void setFolderId(String folderId) {
|
||||||
|
|
||||||
|
this.folderId = folderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param catalogueName the catalogueName to set
|
||||||
|
*/
|
||||||
|
public void setCatalogueName(String catalogueName) {
|
||||||
|
|
||||||
|
this.catalogueName = catalogueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param vreName the vreName to set
|
||||||
|
*/
|
||||||
|
public void setVreName(String vreName) {
|
||||||
|
|
||||||
|
this.vreName = vreName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param vreScope the vreScope to set
|
||||||
|
*/
|
||||||
|
public void setVreScope(String vreScope) {
|
||||||
|
|
||||||
|
this.vreScope = vreScope;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param metadataFolderId the metadataFolderId to set
|
||||||
|
*/
|
||||||
|
public void setMetadataFolderId(String metadataFolderId) {
|
||||||
|
|
||||||
|
this.metadataFolderId = metadataFolderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param metadataFolderName the metadataFolderName to set
|
||||||
|
*/
|
||||||
|
public void setMetadataFolderName(String metadataFolderName) {
|
||||||
|
|
||||||
|
this.metadataFolderName = metadataFolderName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#toString()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("TransferToThreddsProperty [folderId=");
|
||||||
|
builder.append(folderId);
|
||||||
|
builder.append(", catalogueName=");
|
||||||
|
builder.append(catalogueName);
|
||||||
|
builder.append(", vreName=");
|
||||||
|
builder.append(vreName);
|
||||||
|
builder.append(", vreScope=");
|
||||||
|
builder.append(vreScope);
|
||||||
|
builder.append(", metadataFolderId=");
|
||||||
|
builder.append(metadataFolderId);
|
||||||
|
builder.append(", metadataFolderName=");
|
||||||
|
builder.append(metadataFolderName);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue