add rootFolderId as parameter
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portal/ws-synchronized-module-library@165493 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
634ca52339
commit
a41af18f23
|
@ -30,23 +30,43 @@ public class ThSynchFolderConfiguration implements Serializable{
|
||||||
/** The remote persistence. */
|
/** The remote persistence. */
|
||||||
private String remotePersistence="thredds";
|
private String remotePersistence="thredds";
|
||||||
|
|
||||||
|
private String rootFolderId;
|
||||||
|
|
||||||
|
|
||||||
public ThSynchFolderConfiguration() {
|
public ThSynchFolderConfiguration() {
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
public ThSynchFolderConfiguration(String remotePath, String filter, String targetToken, String toCreateCatalogName,
|
public ThSynchFolderConfiguration(String remotePath, String filter, String targetToken, String toCreateCatalogName,
|
||||||
String remotePersistence) {
|
String remotePersistence, String rootFolderId) {
|
||||||
super();
|
super();
|
||||||
this.remotePath = remotePath;
|
this.remotePath = remotePath;
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
this.targetToken = targetToken;
|
this.targetToken = targetToken;
|
||||||
this.toCreateCatalogName = toCreateCatalogName;
|
this.toCreateCatalogName = toCreateCatalogName;
|
||||||
this.remotePersistence = remotePersistence;
|
this.remotePersistence = remotePersistence;
|
||||||
|
this.rootFolderId = rootFolderId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the rootFolderId
|
||||||
|
*/
|
||||||
|
public String getRootFolderId() {
|
||||||
|
|
||||||
|
return rootFolderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param rootFolderId the rootFolderId to set
|
||||||
|
*/
|
||||||
|
public void setRootFolderId(String rootFolderId) {
|
||||||
|
|
||||||
|
this.rootFolderId = rootFolderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getRemotePath() {
|
public String getRemotePath() {
|
||||||
return remotePath;
|
return remotePath;
|
||||||
|
@ -115,23 +135,28 @@ public class ThSynchFolderConfiguration implements Serializable{
|
||||||
this.remotePersistence = remotePersistence;
|
this.remotePersistence = remotePersistence;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#toString()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append("ThSynchFolderConfiguration [remotePath=");
|
builder.append("ThSynchFolderConfiguration [remotePath=");
|
||||||
builder.append(remotePath);
|
builder.append(remotePath);
|
||||||
builder.append(", filter=");
|
builder.append(", filter=");
|
||||||
builder.append(filter);
|
builder.append(filter);
|
||||||
builder.append(", targetToken=");
|
builder.append(", targetToken=");
|
||||||
builder.append(targetToken!=null && targetToken.length()>3?targetToken.substring(0,targetToken.length()-3):"");
|
builder.append(targetToken);
|
||||||
builder.append(", toCreateCatalogName=");
|
builder.append(", toCreateCatalogName=");
|
||||||
builder.append(toCreateCatalogName);
|
builder.append(toCreateCatalogName);
|
||||||
builder.append(", remotePersistence=");
|
builder.append(", remotePersistence=");
|
||||||
builder.append(remotePersistence);
|
builder.append(remotePersistence);
|
||||||
|
builder.append(", rootFolderId=");
|
||||||
|
builder.append(rootFolderId);
|
||||||
builder.append("]");
|
builder.append("]");
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,9 @@ public class ThreddsConverter {
|
||||||
|
|
||||||
String filter = t.getFilter()!=null && !t.getFilter().isEmpty()?t.getFilter():THREDDS_FILTER_NC_NCML_ASC;
|
String filter = t.getFilter()!=null && !t.getFilter().isEmpty()?t.getFilter():THREDDS_FILTER_NC_NCML_ASC;
|
||||||
|
|
||||||
return new SynchFolderConfiguration(t.getRemotePath(), filter, t.getTargetToken(), t.getToCreateCatalogName());
|
// return new SynchFolderConfiguration(t.getRemotePath(), filter, t.getTargetToken(), t.getToCreateCatalogName());
|
||||||
|
|
||||||
|
return new SynchFolderConfiguration(t.getRemotePath(), filter, t.getTargetToken(), t.getToCreateCatalogName(), t.getRootFolderId());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,6 +102,7 @@ public class ThreddsConverter {
|
||||||
mySync.setRemotePersistence(t.getRemotePersistence());
|
mySync.setRemotePersistence(t.getRemotePersistence());
|
||||||
mySync.setTargetToken(t.getTargetToken());
|
mySync.setTargetToken(t.getTargetToken());
|
||||||
mySync.setToCreateCatalogName(t.getToCreateCatalogName());
|
mySync.setToCreateCatalogName(t.getToCreateCatalogName());
|
||||||
|
mySync.setRootFolderId(t.getRootFolderId());
|
||||||
return mySync;
|
return mySync;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.util.concurrent.Semaphore;
|
|
||||||
|
|
||||||
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;
|
||||||
|
@ -70,7 +69,7 @@ public class TestWsThreddsEngine {
|
||||||
String remotePersistence = "";
|
String remotePersistence = "";
|
||||||
String remotePath = "";
|
String remotePath = "";
|
||||||
String targetToken = "";
|
String targetToken = "";
|
||||||
SynchFolderConfiguration config = new SynchFolderConfiguration(remotePath, filter, targetToken, remotePersistence);
|
SynchFolderConfiguration config = new SynchFolderConfiguration(remotePath, filter, targetToken, remotePersistence, folder.getId());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//try to clean it up, first..
|
//try to clean it up, first..
|
||||||
|
|
Loading…
Reference in New Issue