Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@96451 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1d59b187a4
commit
18ee35ceef
|
@ -337,6 +337,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"CURRENT_TABULAR_RESOURCE has TRId null");
|
"CURRENT_TABULAR_RESOURCE has TRId null");
|
||||||
}
|
}
|
||||||
|
logger.debug("Current TRId: "+currentTR
|
||||||
|
.getTrId());
|
||||||
|
|
||||||
ArrayList<TRMetadata> trMetadatas = getTRMetadata(currentTR
|
ArrayList<TRMetadata> trMetadatas = getTRMetadata(currentTR
|
||||||
.getTrId());
|
.getTrId());
|
||||||
|
@ -3050,7 +3052,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
AuthorizationProvider.instance.set(new AuthorizationToken(
|
AuthorizationProvider.instance.set(new AuthorizationToken(
|
||||||
aslSession.getUsername()));
|
aslSession.getUsername()));
|
||||||
TabularDataService service = TabularDataServiceFactory.getService();
|
TabularDataService service = TabularDataServiceFactory.getService();
|
||||||
|
//TODO
|
||||||
TabularResource tr = service
|
TabularResource tr = service
|
||||||
.getTabularResource(new TabularResourceId(Long.valueOf(trId
|
.getTabularResource(new TabularResourceId(Long.valueOf(trId
|
||||||
.getId())));
|
.getId())));
|
||||||
|
@ -5519,13 +5521,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
AuthorizationProvider.instance.set(new AuthorizationToken(
|
AuthorizationProvider.instance.set(new AuthorizationToken(
|
||||||
aslSession.getUsername()));
|
aslSession.getUsername()));
|
||||||
|
logger.debug("CloneTabularResourceSession: "+cloneTabularResourceSession);
|
||||||
|
|
||||||
TabularDataService service = TabularDataServiceFactory.getService();
|
TabularDataService service = TabularDataServiceFactory.getService();
|
||||||
|
|
||||||
TabularResourceId serviceTR = new TabularResourceId(
|
TabularResourceId serviceTR = new TabularResourceId(
|
||||||
Long.valueOf(cloneTabularResourceSession.getTrId().getId()));
|
Long.valueOf(cloneTabularResourceSession.getTrId().getId()));
|
||||||
|
|
||||||
TabularResource cloned = service.cloneTabularResource(serviceTR);
|
TabularResource cloned = service.cloneTabularResource(serviceTR);
|
||||||
Table table = service.getLastTable(serviceTR);
|
logger.debug("Clone: "+cloned.toString());
|
||||||
|
Table table = service.getLastTable(cloned.getId());
|
||||||
|
|
||||||
Table viewTable = null;
|
Table viewTable = null;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
package org.gcube.portlets.user.td.gwtservice.shared.source;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class UrlSource implements Source {
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -5990408094142286488L;
|
||||||
|
|
||||||
|
public static final UrlSource INSTANCE = new UrlSource();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public String getId() {
|
||||||
|
return "Url";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return "Url source";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public String getDescription() {
|
||||||
|
return "Select this source if you want to retrive document from Url";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("Url source [getId()=");
|
||||||
|
builder.append(getId());
|
||||||
|
builder.append(", getName()=");
|
||||||
|
builder.append(getName());
|
||||||
|
builder.append(", getDescription()=");
|
||||||
|
builder.append(getDescription());
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue