Workspace publicLink change
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@99149 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
95efe6be86
commit
d2fd4ea8dc
|
@ -88,10 +88,10 @@ public class FilesStorage {
|
|||
InputStream is = null;
|
||||
try {
|
||||
|
||||
|
||||
org.gcube.common.homelibrary.home.workspace.folder.items.File gcubeItem = ((org.gcube.common.homelibrary.home.workspace.folder.items.File) wi);
|
||||
Handler.activateProtocol();
|
||||
URL smsHome = null;
|
||||
smsHome = new URL(wi.getPublicLink(false));
|
||||
smsHome = new URL(gcubeItem.getPublicLink());
|
||||
logger.debug("smsHome: [host:" + smsHome.getHost() + " path:"
|
||||
+ smsHome.getPath() + " ref:" + smsHome.getRef()
|
||||
+ " userinfo:" + smsHome.getUserInfo() + " ]");
|
||||
|
@ -101,6 +101,7 @@ public class FilesStorage {
|
|||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error retrieving file from storage", e);
|
||||
e.printStackTrace();
|
||||
throw new TDGWTServiceException(
|
||||
"Error retrieving file from storage: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
|
@ -120,6 +121,7 @@ public class FilesStorage {
|
|||
logger.error(
|
||||
"Error trasferring file from storage: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
e.printStackTrace();
|
||||
throw new TDGWTServiceException(
|
||||
"Error trasferring file from storage: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
|
@ -141,10 +143,10 @@ public class FilesStorage {
|
|||
InputStream is = null;
|
||||
try {
|
||||
|
||||
|
||||
org.gcube.common.homelibrary.home.workspace.folder.items.File gcubeItem = ((org.gcube.common.homelibrary.home.workspace.folder.items.File) wi);
|
||||
Handler.activateProtocol();
|
||||
URL smsHome = null;
|
||||
smsHome = new URL(null, wi.getPublicLink(false),
|
||||
smsHome = new URL(null, gcubeItem.getPublicLink(),
|
||||
new URLStreamHandler() {
|
||||
|
||||
@Override
|
||||
|
@ -165,6 +167,7 @@ public class FilesStorage {
|
|||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error retrieving file from storage", e);
|
||||
e.printStackTrace();
|
||||
throw new TDGWTServiceException(
|
||||
"Error retrieving file from storage: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
|
@ -209,6 +212,7 @@ public class FilesStorage {
|
|||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error retrieving file from storage", e);
|
||||
e.printStackTrace();
|
||||
throw new TDGWTServiceException(
|
||||
"Error retrieving file from storage: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
|
@ -268,6 +272,7 @@ public class FilesStorage {
|
|||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error creating item on workspace", e);
|
||||
e.printStackTrace();
|
||||
throw new TDGWTServiceException(
|
||||
"Error creating item on workspace: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
|
|
|
@ -22,6 +22,8 @@ public class TabResource implements Serializable {
|
|||
protected String agency;
|
||||
protected String date;
|
||||
protected String right;
|
||||
protected String validFrom;
|
||||
protected String validUntilTo;
|
||||
protected Contacts owner;
|
||||
protected boolean valid;
|
||||
protected boolean finalized;
|
||||
|
@ -30,12 +32,14 @@ public class TabResource implements Serializable {
|
|||
}
|
||||
|
||||
public TabResource(String id, String name, String description,
|
||||
String agency, String date, String right, TRId trId) {
|
||||
String agency, String date, String right, String validFrom, String validUntilTo, TRId trId) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.agency = agency;
|
||||
this.date = date;
|
||||
this.validFrom = validFrom;
|
||||
this.validUntilTo = validUntilTo;
|
||||
this.right = right;
|
||||
this.trId = trId;
|
||||
}
|
||||
|
@ -136,12 +140,31 @@ public class TabResource implements Serializable {
|
|||
this.finalized = finalized;
|
||||
}
|
||||
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public String getValidUntilTo() {
|
||||
return validUntilTo;
|
||||
}
|
||||
|
||||
public void setValidUntilTo(String validUntilTo) {
|
||||
this.validUntilTo = validUntilTo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TabResource [trId=" + trId + ", id=" + id + ", name=" + name
|
||||
+ ", description=" + description + ", agency=" + agency
|
||||
+ ", date=" + date + ", right=" + right + ", owner=" + owner
|
||||
+ ", valid=" + valid + ", finalized=" + finalized + "]";
|
||||
+ ", date=" + date + ", right=" + right + ", validFrom="
|
||||
+ validFrom + ", validUntilTo=" + validUntilTo + ", owner="
|
||||
+ owner + ", valid=" + valid + ", finalized=" + finalized + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue