diff --git a/template-client/.classpath b/template-client/.classpath deleted file mode 100644 index cd1d475d6..000000000 --- a/template-client/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/template-client/.project b/template-client/.project deleted file mode 100644 index 66279e9c1..000000000 --- a/template-client/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - template-client - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - com.springsource.sts.gradle.core.nature - org.eclipse.jdt.core.javanature - org.eclipse.jdt.groovy.core.groovyNature - - diff --git a/template-client/.settings/gradle/com.springsource.sts.gradle.core.prefs b/template-client/.settings/gradle/com.springsource.sts.gradle.core.prefs deleted file mode 100644 index 1e7f02283..000000000 --- a/template-client/.settings/gradle/com.springsource.sts.gradle.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#com.springsource.sts.gradle.core.preferences.GradleProjectPreferences -#Sat Mar 17 22:40:30 PDT 2012 -com.springsource.sts.gradle.rootprojectloc=.. -com.springsource.sts.gradle.linkedresources= diff --git a/template-client/.settings/gradle/com.springsource.sts.gradle.refresh.prefs b/template-client/.settings/gradle/com.springsource.sts.gradle.refresh.prefs deleted file mode 100644 index 394fb107f..000000000 --- a/template-client/.settings/gradle/com.springsource.sts.gradle.refresh.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#com.springsource.sts.gradle.core.actions.GradleRefreshPreferences -#Sat Mar 17 22:40:30 PDT 2012 -enableAfterTasks=true -afterTasks=afterEclipseImport; -useHierarchicalNames=false -enableBeforeTasks=true -addResourceFilters=true -enableDSLD=true -beforeTasks=cleanEclipse;eclipse; diff --git a/template-client/bin/com/netflix/template/common/Conversation.class b/template-client/bin/com/netflix/template/common/Conversation.class deleted file mode 100644 index 86d42f575..000000000 Binary files a/template-client/bin/com/netflix/template/common/Conversation.class and /dev/null differ diff --git a/template-client/src/main/java/com/netflix/template/client/TalkClient.java b/template-client/src/main/java/com/netflix/template/client/TalkClient.java deleted file mode 100644 index fc9d20d33..000000000 --- a/template-client/src/main/java/com/netflix/template/client/TalkClient.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.netflix.template.client; - -import com.netflix.template.common.Conversation; -import com.netflix.template.common.Sentence; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.filter.LoggingFilter; - -import javax.ws.rs.core.MediaType; - -/** - * Delegates to remote TalkServer over REST. - * @author jryan - * - */ -public class TalkClient implements Conversation { - - private WebResource webResource; - - /** - * Instantiate client. - * - * @param location URL to the base of resources, e.g. http://localhost:8080/template-server/rest - */ - public TalkClient(String location) { - Client client = Client.create(); - client.addFilter(new LoggingFilter(System.out)); - webResource = client.resource(location + "/talk"); - } - - @Override - public Sentence greeting() { - Sentence s = webResource.accept(MediaType.APPLICATION_XML).get(Sentence.class); - return s; - } - - @Override - public Sentence farewell() { - Sentence s = webResource.accept(MediaType.APPLICATION_XML).delete(Sentence.class); - return s; - } - - /** - * Tests out client. - * @param args Not applicable - */ - public static void main(String[] args) { - TalkClient remote = new TalkClient("http://localhost:8080/template-server/rest"); - System.out.println(remote.greeting().getWhole()); - System.out.println(remote.farewell().getWhole()); - } -} diff --git a/template-client/src/main/java/com/netflix/template/common/Conversation.java b/template-client/src/main/java/com/netflix/template/common/Conversation.java deleted file mode 100644 index c190f03bb..000000000 --- a/template-client/src/main/java/com/netflix/template/common/Conversation.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.netflix.template.common; - -/** - * Hold a conversation. - * @author jryan - * - */ -public interface Conversation { - - /** - * Initiates a conversation. - * @return Sentence words from geeting - */ - Sentence greeting(); - - /** - * End the conversation. - * @return - */ - Sentence farewell(); -} diff --git a/template-client/src/main/java/com/netflix/template/common/Sentence.java b/template-client/src/main/java/com/netflix/template/common/Sentence.java deleted file mode 100644 index 616f72efb..000000000 --- a/template-client/src/main/java/com/netflix/template/common/Sentence.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.netflix.template.common; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * Container for words going back and forth. - * @author jryan - * - */ -@XmlRootElement -public class Sentence { - private String whole; - - @SuppressWarnings("unused") - private Sentence() { - }; - - /** - * Initialize sentence. - * @param whole - */ - public Sentence(String whole) { - this.whole = whole; - } - - /** - * whole getter. - * @return - */ - @XmlElement - public String getWhole() { - return whole; - } - - public void setWhole(String whole) { - this.whole = whole; - } -} diff --git a/template-server/.classpath b/template-server/.classpath deleted file mode 100644 index 09505c5c7..000000000 --- a/template-server/.classpath +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/template-server/.project b/template-server/.project deleted file mode 100644 index 0b2a3869f..000000000 --- a/template-server/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - template-server - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - com.springsource.sts.gradle.core.nature - org.eclipse.jdt.core.javanature - org.eclipse.jdt.groovy.core.groovyNature - - diff --git a/template-server/.settings/gradle/com.springsource.sts.gradle.core.prefs b/template-server/.settings/gradle/com.springsource.sts.gradle.core.prefs deleted file mode 100644 index 1e7f02283..000000000 --- a/template-server/.settings/gradle/com.springsource.sts.gradle.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#com.springsource.sts.gradle.core.preferences.GradleProjectPreferences -#Sat Mar 17 22:40:30 PDT 2012 -com.springsource.sts.gradle.rootprojectloc=.. -com.springsource.sts.gradle.linkedresources= diff --git a/template-server/.settings/gradle/com.springsource.sts.gradle.refresh.prefs b/template-server/.settings/gradle/com.springsource.sts.gradle.refresh.prefs deleted file mode 100644 index 394fb107f..000000000 --- a/template-server/.settings/gradle/com.springsource.sts.gradle.refresh.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#com.springsource.sts.gradle.core.actions.GradleRefreshPreferences -#Sat Mar 17 22:40:30 PDT 2012 -enableAfterTasks=true -afterTasks=afterEclipseImport; -useHierarchicalNames=false -enableBeforeTasks=true -addResourceFilters=true -enableDSLD=true -beforeTasks=cleanEclipse;eclipse; diff --git a/template-server/bin/com/netflix/template/server/TalkServer.class b/template-server/bin/com/netflix/template/server/TalkServer.class deleted file mode 100644 index f534d0627..000000000 Binary files a/template-server/bin/com/netflix/template/server/TalkServer.class and /dev/null differ diff --git a/template-server/src/main/java/com/netflix/template/server/TalkServer.java b/template-server/src/main/java/com/netflix/template/server/TalkServer.java deleted file mode 100644 index a856ce88a..000000000 --- a/template-server/src/main/java/com/netflix/template/server/TalkServer.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.netflix.template.server; - -import com.netflix.template.common.Conversation; -import com.netflix.template.common.Sentence; - -import javax.ws.rs.GET; -import javax.ws.rs.DELETE; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - -@Path("/talk") -public class TalkServer implements Conversation { - - @GET - @Produces(MediaType.APPLICATION_XML) - public Sentence greeting() { - return new Sentence("Hello"); - } - - @DELETE - @Produces(MediaType.APPLICATION_XML) - public Sentence farewell() { - return new Sentence("Goodbye"); - } -} \ No newline at end of file diff --git a/template-server/src/main/webapp/WEB-INF/web.xml b/template-server/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 273135a29..000000000 --- a/template-server/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - Jersey REST Service - - com.sun.jersey.spi.container.servlet.ServletContainer - - - com.sun.jersey.config.property.packages - com.netflix.template.server - - - com.sun.jersey.api.json.POJOMappingFeature - true - - 1 - - - - Jersey REST Service - /rest/* - -