Updated uri resolver
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@114486 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
08cb8692a0
commit
bb27dd3754
|
@ -9041,12 +9041,40 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
resolver = new UriResolverManager(uriResolverSession
|
||||
.getApplicationType().toString());
|
||||
params.put("smp-uri", uriResolverSession.getUuid());
|
||||
params.put("fileName", uriResolverSession.getFileName());
|
||||
params.put("contentType", "");
|
||||
if(uriResolverSession.getFileName()==null){
|
||||
params.put("fileName", "");
|
||||
} else {
|
||||
params.put("fileName", uriResolverSession.getFileName());
|
||||
}
|
||||
if(uriResolverSession.getMimeType()==null){
|
||||
params.put("contentType", "");
|
||||
} else {
|
||||
params.put("contentType", uriResolverSession.getMimeType());
|
||||
}
|
||||
logger.debug("Uri Resolver params: " + params);
|
||||
link = resolver.getLink(params, true); // true, link is shorted
|
||||
// otherwise none
|
||||
break;
|
||||
case SMP_ID:
|
||||
resolver = new UriResolverManager(uriResolverSession
|
||||
.getApplicationType().toString());
|
||||
params.put("smp-id", uriResolverSession.getUuid());
|
||||
if(uriResolverSession.getFileName()==null){
|
||||
params.put("fileName", "");
|
||||
} else {
|
||||
params.put("fileName", uriResolverSession.getFileName());
|
||||
}
|
||||
if(uriResolverSession.getMimeType()==null){
|
||||
params.put("contentType", "");
|
||||
} else {
|
||||
params.put("contentType", uriResolverSession.getMimeType());
|
||||
}
|
||||
logger.debug("Uri Resolver params: " + params);
|
||||
link = resolver.getLink(params, true); // true, link is shorted
|
||||
// otherwise none
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
logger.debug("No resolver enable on this application type");
|
||||
throw new TDGWTServiceException(
|
||||
|
|
|
@ -17,7 +17,8 @@ public class UriResolverSession implements Serializable {
|
|||
private String uuid;
|
||||
private ApplicationType applicationType;
|
||||
private String fileName;
|
||||
|
||||
private String mimeType;
|
||||
|
||||
public UriResolverSession() {
|
||||
super();
|
||||
}
|
||||
|
@ -26,13 +27,11 @@ public class UriResolverSession implements Serializable {
|
|||
super();
|
||||
this.uuid = uuid;
|
||||
this.applicationType = applicationType;
|
||||
this.fileName=null;
|
||||
this.fileName = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public UriResolverSession(String uuid, ApplicationType applicationType,
|
||||
String fileName) {
|
||||
String fileName, String mimeType) {
|
||||
super();
|
||||
this.uuid = uuid;
|
||||
this.applicationType = applicationType;
|
||||
|
@ -54,7 +53,6 @@ public class UriResolverSession implements Serializable {
|
|||
public void setApplicationType(ApplicationType applicationType) {
|
||||
this.applicationType = applicationType;
|
||||
}
|
||||
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
|
@ -64,11 +62,21 @@ public class UriResolverSession implements Serializable {
|
|||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UriResolverSession [uuid=" + uuid + ", applicationType="
|
||||
+ applicationType + ", fileName=" + fileName + "]";
|
||||
+ applicationType + ", fileName=" + fileName + ", mimeType="
|
||||
+ mimeType + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue