You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
745 B
Java
39 lines
745 B
Java
package org.gcube.common.calls.jaxrs;
|
|
|
|
import static org.gcube.common.calls.jaxrs.Utils.notNull;
|
|
|
|
import javax.xml.namespace.QName;
|
|
|
|
import org.gcube.common.calls.jaxrs.GcubeServiceBuilderDSL.NameClause;
|
|
import org.gcube.common.calls.jaxrs.GcubeServiceBuilderDSL.StubClause;
|
|
|
|
|
|
/**
|
|
* Builds {@link GCoreService} instances.
|
|
*
|
|
* @author Fabio Simeoni
|
|
*
|
|
*/
|
|
public class GcubeServiceBuilder implements NameClause, StubClause {
|
|
|
|
private QName name;
|
|
|
|
public StubClause withName(QName name) {
|
|
|
|
notNull("service name", name);
|
|
|
|
this.name=name;
|
|
|
|
return this;
|
|
}
|
|
|
|
public GcubeService andPath(String path) {
|
|
return new GcubeService(name, path);
|
|
}
|
|
|
|
public GcubeService useRootPath() {
|
|
return new GcubeService(name, "/");
|
|
}
|
|
|
|
}
|