Added Destination
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@85620 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a9ade175bf
commit
562c2820c0
|
@ -0,0 +1,27 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.destination;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public interface Destination extends Serializable {
|
||||
|
||||
/**
|
||||
* Returns the document type id.
|
||||
* @return the document type id.
|
||||
*/
|
||||
public String getId();
|
||||
|
||||
/**
|
||||
* Returns the document type name.
|
||||
* @return the document type name.
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/**
|
||||
* Returns the document type description.
|
||||
* @return the document type description.
|
||||
*/
|
||||
public String getDescription();
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.destination;
|
||||
|
||||
|
||||
|
||||
public class FileDestination implements Destination {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -5990408094142286488L;
|
||||
|
||||
public static final FileDestination INSTANCE = new FileDestination();
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getId() {
|
||||
return "File";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return "File destination";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Select this destination if you want to save the document in File";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("File source [getId()=");
|
||||
builder.append(getId());
|
||||
builder.append(", getName()=");
|
||||
builder.append(getName());
|
||||
builder.append(", getDescription()=");
|
||||
builder.append(getDescription());
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.destination;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.source.Source;
|
||||
|
||||
|
||||
|
||||
|
||||
public class SDMXRegistryDestination implements Destination {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 3254879141340681969L;
|
||||
|
||||
public static final SDMXRegistryDestination INSTANCE = new SDMXRegistryDestination();
|
||||
|
||||
protected String url;
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getId() {
|
||||
return "SDMXRegistry";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return "SDMX Registry destination";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Select this destination if you want to save document in SDMX Registry";
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("SDMXRegistry source [getId()=");
|
||||
builder.append(getId());
|
||||
builder.append(", getName()=");
|
||||
builder.append(getName());
|
||||
builder.append(", getDescription()=");
|
||||
builder.append(getDescription());
|
||||
builder.append(", getUrl()=");
|
||||
builder.append(getUrl());
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.destination;
|
||||
|
||||
|
||||
|
||||
|
||||
public class WorkspaceDestination implements Destination {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 2826706131664617270L;
|
||||
|
||||
public static final WorkspaceDestination INSTANCE = new WorkspaceDestination();
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getId() {
|
||||
return "Workspace";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Workspace destination";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Select this destination if you want to save the document in Workspace";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("Workspace 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