Permalink
Browse files

Project initialization in Git

  • Loading branch information...
0 parents commit 46fb04dbaffd4182755409a609b9d1df6dee5b98 @antoinesd committed Feb 16, 2011
Showing with 2,430 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +74 −0 api/pom.xml
  3. +61 −0 api/src/main/java/org/jboss/seam/social/oauth/OAuthServiceHandler.java
  4. +50 −0 api/src/main/java/org/jboss/seam/social/oauth/OAuthServiceSettings.java
  5. +31 −0 api/src/main/java/org/jboss/seam/social/oauth/Provider.java
  6. +31 −0 api/src/main/java/org/jboss/seam/social/oauth/RestVerb.java
  7. +47 −0 api/src/main/java/org/jboss/seam/social/twitter/Twitter.java
  8. +34 −0 api/src/main/java/org/jboss/seam/social/twitter/TwitterHandler.java
  9. +71 −0 api/src/main/java/org/jboss/seam/social/twitter/domain/SearchResult.java
  10. +160 −0 api/src/main/java/org/jboss/seam/social/twitter/domain/Tweet.java
  11. +28 −0 api/src/main/resources/META-INF/beans.xml
  12. +73 −0 combined/pom.xml
  13. +56 −0 dist/pom.xml
  14. +77 −0 dist/src/main/assembly/assembly.xml
  15. +45 −0 dist/src/main/assembly/readme.txt
  16. +114 −0 docs/reference/pom.xml
  17. +12 −0 docs/reference/src/main/docbook/en-US/author_group.xml
  18. +14 −0 docs/reference/src/main/docbook/en-US/book_info.xml
  19. +14 −0 docs/reference/src/main/docbook/en-US/introduction.xml
  20. +19 −0 docs/reference/src/main/docbook/en-US/master.xml
  21. +107 −0 examples/twitter-web-client/bin/pom.xml
  22. BIN ...twitter-web-client/bin/src/main/java/org/jboss/seam/social/example/twitterweb/TwitterClient.class
  23. +28 −0 examples/twitter-web-client/bin/src/main/resources/META-INF/beans.xml
  24. +3 −0 examples/twitter-web-client/bin/src/main/webapp/META-INF/MANIFEST.MF
  25. +5 −0 examples/twitter-web-client/bin/src/main/webapp/META-INF/context.xml
  26. +14 −0 examples/twitter-web-client/bin/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
  27. +37 −0 examples/twitter-web-client/bin/src/main/webapp/WEB-INF/faces-config.xml
  28. +52 −0 examples/twitter-web-client/bin/src/main/webapp/WEB-INF/templates/default.xhtml
  29. +16 −0 examples/twitter-web-client/bin/src/main/webapp/WEB-INF/web.xml
  30. +23 −0 examples/twitter-web-client/bin/src/main/webapp/callback.xhtml
  31. +14 −0 examples/twitter-web-client/bin/src/main/webapp/home.xhtml
  32. +1 −0 examples/twitter-web-client/bin/src/main/webapp/index.jsp
  33. +39 −0 examples/twitter-web-client/bin/src/main/webapp/resources/css/screen.css
  34. BIN examples/twitter-web-client/bin/src/main/webapp/resources/gfx/banner.png
  35. BIN examples/twitter-web-client/bin/src/main/webapp/resources/gfx/weld.png
  36. +17 −0 examples/twitter-web-client/bin/src/main/webapp/timeline.xhtml
  37. +105 −0 examples/twitter-web-client/pom.xml
  38. +78 −0 ...ples/twitter-web-client/src/main/java/org/jboss/seam/social/example/twitterweb/TwitterClient.java
  39. +28 −0 examples/twitter-web-client/src/main/resources/META-INF/beans.xml
  40. +3 −0 examples/twitter-web-client/src/main/webapp/META-INF/MANIFEST.MF
  41. +5 −0 examples/twitter-web-client/src/main/webapp/META-INF/context.xml
  42. +14 −0 examples/twitter-web-client/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
  43. +37 −0 examples/twitter-web-client/src/main/webapp/WEB-INF/faces-config.xml
  44. +52 −0 examples/twitter-web-client/src/main/webapp/WEB-INF/templates/default.xhtml
  45. +16 −0 examples/twitter-web-client/src/main/webapp/WEB-INF/web.xml
  46. +23 −0 examples/twitter-web-client/src/main/webapp/callback.xhtml
  47. +14 −0 examples/twitter-web-client/src/main/webapp/home.xhtml
  48. +1 −0 examples/twitter-web-client/src/main/webapp/index.jsp
  49. +39 −0 examples/twitter-web-client/src/main/webapp/resources/css/screen.css
  50. BIN examples/twitter-web-client/src/main/webapp/resources/gfx/banner.png
  51. BIN examples/twitter-web-client/src/main/webapp/resources/gfx/weld.png
  52. +17 −0 examples/twitter-web-client/src/main/webapp/timeline.xhtml
  53. +84 −0 impl/pom.xml
  54. +22 −0 impl/src/main/java/org/jboss/seam/social/jackson/ObjectMapperProducer.java
  55. +151 −0 impl/src/main/java/org/jboss/seam/social/oauth/OAuthServiceHandlerScribe.java
  56. +86 −0 impl/src/main/java/org/jboss/seam/social/oauth/OAuthServiceSettingsScribe.java
  57. +4 −0 impl/src/main/java/org/jboss/seam/social/oauth/package-info.java
  58. +59 −0 impl/src/main/java/org/jboss/seam/social/twitter/TwitterHandlerBean.java
  59. +4 −0 impl/src/main/java/org/jboss/seam/social/twitter/package-info.java
  60. +17 −0 impl/src/main/resources/META-INF/beans.xml
  61. 0 impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
  62. +3 −0 impl/src/test/resources-jbossas/jndi.properties
  63. +12 −0 impl/src/test/resources/META-INF/beans.xml
  64. +10 −0 impl/src/test/resources/arquillian.xml
  65. +174 −0 pom.xml
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+*.sw?
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>seam-social-parent</artifactId>
+ <groupId>org.jboss.seam.social</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.jboss.seam.social</groupId>
+ <artifactId>seam-social-api</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+
+ <packaging>jar</packaging>
+ <name>Seam Social Module API</name>
+
+
+ <build>
+ <plugins>
+ <!-- No tests in the api, skip phase -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <scm>
+ <connection>scm:git:git://github.com/seam/social.git</connection>
+ <developerConnection>scm:git:git@github.com:seam/social.git</developerConnection>
+ <url>http://github.com/seam/social</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-core-asl</artifactId>
+ <version>1.7.1</version>
+ <type>jar</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+
+ </dependency>
+ </dependencies>
+
+</project>
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.social.oauth;
+
+import java.util.Map;
+
+/**
+ * Implementation of this interface is used to manage a generic OAuth Service
+ * @author Antoine Sabot-Durand
+ *
+ */
+public interface OAuthServiceHandler
+{
+
+ public void init();
+
+ /**
+ * Send an OAuth request signed without any parameter
+ * @param verb a REST verb
+ * @param uri
+ * @return an Object containing the response. It could be in various format (json, xml, string)
+ */
+ public Object sendSignedRequest(RestVerb verb, String uri);
+
+ /**
+ * Initialize the OAuth access token
+ */
+ public void initAccessToken();
+
+ public String getAuthorizationUrl();
+
+ public Object sendSignedRequest(RestVerb verb, String uri, Map<String, Object> params);
+
+ public Object sendSignedRequest(RestVerb verb, String uri, String key, Object value);
+
+ public void setVerifier(String verifierStr);
+
+ public String getVerifier();
+
+ public String getAccessToken();
+
+}
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.social.oauth;
+
+
+/**
+ * @author antoine
+ *
+ */
+public interface OAuthServiceSettings
+{
+
+ /**
+ * @return
+ */
+ String getApiKey();
+
+
+ Provider getProvider();
+
+ /**
+ * @return
+ */
+ String getApiSecret();
+
+ /**
+ * @return
+ */
+ String getCallback();
+
+}
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.social.oauth;
+
+/**
+ * @author antoine
+ *
+ */
+public enum Provider
+{
+ NONE, Evernote, Facebook, Foursquare, Google, LinkedIn, Twitter, Vimeo, Yahoo, Yammer;
+}
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.social.oauth;
+
+/**
+ * @author antoine
+ *
+ */
+public enum RestVerb
+{
+ GET, POST, PUT, DELETE
+}
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.social.twitter;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+/**
+ * @author antoine
+ *
+ */
+public @interface Twitter
+{
+
+}
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.social.twitter;
+
+import org.jboss.seam.social.oauth.OAuthServiceHandler;
+import org.jboss.seam.social.twitter.domain.SearchResult;
+
+public interface TwitterHandler extends OAuthServiceHandler
+{
+
+ SearchResult search(String string);
+
+ public Object updateStatus(String message);
+
+}
Oops, something went wrong.

0 comments on commit 46fb04d

Please sign in to comment.