You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/06/23 08:23:59 UTC
svn commit: r957119 [1/6] - in /shindig/branches/2.0.x: ./
assembly/src/main/assembly/ config/
extras/src/main/java/org/apache/shindig/extras/as/sample/
extras/src/main/javascript/features-extras/ features/
features/src/main/javascript/features/ featur...
Author: lindner
Date: Wed Jun 23 06:23:54 2010
New Revision: 957119
URL: http://svn.apache.org/viewvc?rev=957119&view=rev
Log:
sync trunk to 2.0.x
Added:
shindig/branches/2.0.x/features/src/main/javascript/features/shindig.auth/
- copied from r957117, shindig/trunk/features/src/main/javascript/features/shindig.auth/
shindig/branches/2.0.x/features/src/main/javascript/features/shindig.auth/auth-init.js
- copied unchanged from r957117, shindig/trunk/features/src/main/javascript/features/shindig.auth/auth-init.js
shindig/branches/2.0.x/features/src/main/javascript/features/shindig.auth/auth.js
- copied unchanged from r957117, shindig/trunk/features/src/main/javascript/features/shindig.auth/auth.js
shindig/branches/2.0.x/features/src/main/javascript/features/shindig.auth/feature.xml
- copied unchanged from r957117, shindig/trunk/features/src/main/javascript/features/shindig.auth/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/shindig.xhrwrapper/
- copied from r957117, shindig/trunk/features/src/main/javascript/features/shindig.xhrwrapper/
shindig/branches/2.0.x/features/src/main/javascript/features/shindig.xhrwrapper/feature.xml
- copied unchanged from r957117, shindig/trunk/features/src/main/javascript/features/shindig.xhrwrapper/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/shindig.xhrwrapper/xhrwrapper.js
- copied unchanged from r957117, shindig/trunk/features/src/main/javascript/features/shindig.xhrwrapper/xhrwrapper.js
shindig/branches/2.0.x/java/common/src/test/java/org/apache/shindig/common/util/HashUtilTest.java
- copied unchanged from r957117, shindig/trunk/java/common/src/test/java/org/apache/shindig/common/util/HashUtilTest.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/
- copied from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/ConfigContributor.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/ConfigContributor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/CoreUtilConfigContributor.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/CoreUtilConfigContributor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/OsapiServicesConfigContributor.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/OsapiServicesConfigContributor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/ShindigAuthConfigContributor.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/ShindigAuthConfigContributor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/XhrwrapperConfigContributor.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/config/XhrwrapperConfigContributor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/SocialDataTags.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/SocialDataTags.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/AbsolutePathReferenceRewriter.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/AbsolutePathReferenceRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/BaseTagRemoverRewriter.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/BaseTagRemoverRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/AccelUriManager.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/AccelUriManager.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/UriUtils.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/UriUtils.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/BaseTagRemoverRewriterTest.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/BaseTagRemoverRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/AccelUriManagerTest.java
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/AccelUriManagerTest.java
shindig/branches/2.0.x/java/gadgets/src/test/resources/org/apache/shindig/gadgets/rewrite/rewritestylemedia-expected.html
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/rewrite/rewritestylemedia-expected.html
shindig/branches/2.0.x/java/gadgets/src/test/resources/org/apache/shindig/gadgets/rewrite/rewritestylemedia.html
- copied unchanged from r957117, shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/rewrite/rewritestylemedia.html
Removed:
shindig/branches/2.0.x/features/src/main/javascript/features/core.auth/auth-init.js
shindig/branches/2.0.x/features/src/main/javascript/features/core.auth/auth.js
shindig/branches/2.0.x/features/src/main/javascript/features/core.auth/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/xhrwrapper/xhrwrapper.js
shindig/branches/2.0.x/java/common/src/main/resources/ehcache.properties
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultUrlGenerator.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/UrlGenerator.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/UrlValidationStatus.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/GlueUrlGenerator.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/DefaultUrlGeneratorTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/GlueUrlGeneratorTest.java
shindig/branches/2.0.x/php/src/gadgets/oauth/OAuth.php
shindig/branches/2.0.x/php/src/social/oauth/OAuth.php
Modified:
shindig/branches/2.0.x/ (props changed)
shindig/branches/2.0.x/BUILD-JAVA
shindig/branches/2.0.x/UPGRADING
shindig/branches/2.0.x/assembly/src/main/assembly/java.xml
shindig/branches/2.0.x/assembly/src/main/assembly/php.xml
shindig/branches/2.0.x/config/container.js
shindig/branches/2.0.x/extras/src/main/java/org/apache/shindig/extras/as/sample/ActivityStreamsJsonDbService.java
shindig/branches/2.0.x/extras/src/main/javascript/features-extras/features.txt
shindig/branches/2.0.x/features/pom.xml
shindig/branches/2.0.x/features/src/main/javascript/features/analytics/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/auth-refresh/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/container/container.js
shindig/branches/2.0.x/features/src/main/javascript/features/container/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_holder.js
shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_site.js
shindig/branches/2.0.x/features/src/main/javascript/features/container/init.js
shindig/branches/2.0.x/features/src/main/javascript/features/container/service.js
shindig/branches/2.0.x/features/src/main/javascript/features/container/util.js
shindig/branches/2.0.x/features/src/main/javascript/features/core.io/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/core/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/features.txt
shindig/branches/2.0.x/features/src/main/javascript/features/flash/flash.js
shindig/branches/2.0.x/features/src/main/javascript/features/globals/globals.js
shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js
shindig/branches/2.0.x/features/src/main/javascript/features/osapi/feature.xml
shindig/branches/2.0.x/features/src/main/javascript/features/tabs/tabs.js
shindig/branches/2.0.x/features/src/main/javascript/features/xhrwrapper/feature.xml
shindig/branches/2.0.x/features/src/test/javascript/features/xhrwrapper/xhrwrappertest.js
shindig/branches/2.0.x/java/common/conf/shindig.properties
shindig/branches/2.0.x/java/common/pom.xml
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/AuthenticationServletFilter.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/UrlParameterAuthenticationHandler.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/cache/ehcache/EhCacheCacheProvider.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/crypto/Crypto.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/util/HashUtil.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/config/DynamicConfigProperty.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/ApiServlet.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/ContentTypes.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/DataServiceServlet.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/DefaultHandlerRegistry.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanAtomConverter.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanXmlConverter.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/conversion/xstream/InterfaceClassMapper.java
shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/protocol/conversion/xstream/MapConverter.java
shindig/branches/2.0.x/java/common/src/main/resources/org/apache/shindig/common/cache/ehcache/ehcacheConfig.xml
shindig/branches/2.0.x/java/common/src/test/java/org/apache/shindig/protocol/conversion/BeanXmlConverterTest.java
shindig/branches/2.0.x/java/gadgets/pom.xml
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/AbstractSpecFactory.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactory.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGuiceModule.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/features/FeatureRegistry.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/features/FeatureResourceLoader.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/http/AbstractHttpCache.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/http/BasicHttpFetcher.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponseMetadataHelper.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/GadgetOAuthCallbackGenerator.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthCommandLine.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthModule.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthRequest.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthResponseParams.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializer.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaCssLexerParser.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaCssParser.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaCssSanitizer.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaHtmlParser.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/old/CajaCssSanitizer.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/preload/PipelineExecutor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/OpenSocialI18NGadgetRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/SanitizingResponseRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/old/SanitizingRequestRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/AbsolutePathReferenceVisitor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/ConcatVisitor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/ContentRewriterFeature.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/CssResponseRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/MutableContent.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/PipelineDataGadgetRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/RewriteModule.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/BaseOptimizer.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/BasicImageRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/old/CssRequestRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/old/HTMLContentRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CajaContentRewriter.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetRenderingServlet.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/HtmlAccelServlet.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/JsServlet.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/JsonRpcGadgetContext.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/JsonRpcHandler.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyBase.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyHandler.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/RpcServlet.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/ModulePrefs.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/ContainerTagLibraryFactory.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/DefaultTemplateProcessor.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/MessageELResolver.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/TemplateLibraryFactory.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java
shindig/branches/2.0.x/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactoryTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/DefaultMessageBundleFactoryTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/features/FeatureResourceLoaderTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/http/AbstractHttpCacheTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/http/AbstractHttpFetcherTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/http/BasicHttpFetcherTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/oauth/GadgetOAuthCallbackGeneratorTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/oauth/GadgetTokenStoreTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractSocialMarkupHtmlParserTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/caja/CajaSocialMarkupHtmlParserTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/DefaultRpcServiceLookupTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/DefaultServiceFetcherTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/OpenSocialI18NGadgetRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/SanitizingGadgetRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/SanitizingResponseRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/old/SanitizingGadgetRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/render/old/SanitizingRequestRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/AbsolutePathReferenceVisitorTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ConcatVisitorTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentRewriterFeatureTestCase.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentRewriterFeatureTestCaseOS9.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/MutableContentTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/RewriterTestBase.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/old/BaseRewriterTestCase.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/old/HTMLContentRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/old/ProxyingLinkRewriterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/ConcatProxyServletTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/GadgetRenderingServletTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/HtmlAccelServletTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/JsonRpcHandlerTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/ServletTestFixture.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ModulePrefsTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/DefaultTemplateProcessorTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/tags/RenderTagHandlerTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/tags/TemplateBasedTagHandlerTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManagerTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManagerTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/UriManagerTestBase.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/variables/BidiSubstituterTest.java
shindig/branches/2.0.x/java/gadgets/src/test/java/org/apache/shindig/gadgets/variables/VariableSubstituterTest.java
shindig/branches/2.0.x/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/MediaItemDb.java
shindig/branches/2.0.x/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/spi/ActivityServiceDb.java
shindig/branches/2.0.x/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/spi/PersonServiceDb.java
shindig/branches/2.0.x/java/samples/src/test/java/org/apache/shindig/social/opensocial/jpa/spi/integration/JpaTestGuiceModule.java
shindig/branches/2.0.x/java/samples/src/test/java/org/apache/shindig/social/opensocial/jpa/test/PersonPopulate.java
shindig/branches/2.0.x/java/server/pom.xml
shindig/branches/2.0.x/java/server/src/main/webapp/WEB-INF/web.xml
shindig/branches/2.0.x/java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndServer.java
shindig/branches/2.0.x/java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndTest.java
shindig/branches/2.0.x/java/server/src/test/resources/endtoend/errorTest.xml
shindig/branches/2.0.x/java/social-api/pom.xml
shindig/branches/2.0.x/java/social-api/src/main/java/org/apache/shindig/social/core/oauth/OAuthAuthenticationHandler.java
shindig/branches/2.0.x/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java
shindig/branches/2.0.x/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java
shindig/branches/2.0.x/java/social-api/src/main/java/org/apache/shindig/social/opensocial/oauth/OAuthEntry.java
shindig/branches/2.0.x/java/social-api/src/main/java/org/apache/shindig/social/sample/SampleModule.java
shindig/branches/2.0.x/java/social-api/src/main/java/org/apache/shindig/social/sample/oauth/SampleOAuthDataStore.java
shindig/branches/2.0.x/java/social-api/src/main/java/org/apache/shindig/social/sample/oauth/SampleOAuthServlet.java
shindig/branches/2.0.x/java/social-api/src/test/java/org/apache/shindig/social/core/oauth/OAuthAuthenticationHanderTest.java
shindig/branches/2.0.x/php/external/OAuth/OAuth.php
shindig/branches/2.0.x/php/src/gadgets/GadgetSpecParser.php
shindig/branches/2.0.x/php/src/gadgets/SigningFetcher.php
shindig/branches/2.0.x/php/src/gadgets/oauth/OAuthFetcher.php
shindig/branches/2.0.x/php/test/gadgets/SigningFetcherTest.php
shindig/branches/2.0.x/pom.xml
Propchange: shindig/branches/2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 23 06:23:54 2010
@@ -1 +1 @@
-/shindig/trunk:945873-950436
+/shindig/trunk:945873-957117
Modified: shindig/branches/2.0.x/BUILD-JAVA
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/BUILD-JAVA?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/BUILD-JAVA (original)
+++ shindig/branches/2.0.x/BUILD-JAVA Wed Jun 23 06:23:54 2010
@@ -122,8 +122,8 @@ Caja is an important part of OpenSocial
Caja is managed in a separate open source project hosted by Google code projects.
For more information on Caja, see: http://code.google.com/p/google-caja/wiki/GettingStarted
- 1) Load this page: http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html
- 2) Point it to this gadget: http://localhost:8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml
+ 1) Load this page: http://localhost:8080/samplecontainer/samplecontainer.html
+ 2) Point it to this gadget: http://localhost:8080/samplecontainer/examples/SocialHelloWorld.xml
To see the cajoled code (Firefox only), right-click inside the iframe and do "This Frame -> View Frame Source"
Modified: shindig/branches/2.0.x/UPGRADING
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/UPGRADING?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/UPGRADING (original)
+++ shindig/branches/2.0.x/UPGRADING Wed Jun 23 06:23:54 2010
@@ -75,6 +75,24 @@ provision for reading "original" HttpRes
ImageRewriters may be migrated to ResponseRewriters as well by mutating the builder,
where previously a new HttpResponse was returned.
+* UrlManager -> IframeUriManager, JsUriManager, OAuthUriManager
+
+The UrlManager interface has been removed. In its place are IframeUriManager, JsUriManager, and OAuthUriManager,
+producing Uris (equivalent to previous Strings). This change is done to better encapsulate Uri logic, putting
+creation and processing logic in the same place.
+
+@see (now-removed) shim class
+http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/GlueUrlGenerator.java?revision=906688&view=markup
+
+...for a schematic on how the previous methods map to new versions. This class was a bridge between the new
+and old interfaces.
+
+Default implementations of each UriManager class are provided in org.apache.shindig.gadgets.uri, each
+named DefaultX, where X = interface. These classes are suitable for subclassing to extend, should you prefer.
+Note that the ContainerConfig values the default implementations use are different (mostly by name/key)
+than those DefaultUrlGenerator used. Specific values are documented in the class comment and statics
+for each impl.
+
* MediaItem
Location field changed from String to Address.
Modified: shindig/branches/2.0.x/assembly/src/main/assembly/java.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/assembly/src/main/assembly/java.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/assembly/src/main/assembly/java.xml (original)
+++ shindig/branches/2.0.x/assembly/src/main/assembly/java.xml Wed Jun 23 06:23:54 2010
@@ -26,7 +26,7 @@
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
- <outputDirectory>shindig-${pom.version}-java</outputDirectory>
+ <outputDirectory>shindig-${project.version}-java</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<useTransitiveDependencies>false</useTransitiveDependencies>
<includes>
@@ -39,7 +39,7 @@
</dependencySets>
<fileSets>
<fileSet>
- <outputDirectory>shindig-${pom.version}-java</outputDirectory>
+ <outputDirectory>shindig-${project.version}-java</outputDirectory>
<directory>../</directory>
<includes>
<include>UPGRADING</include>
@@ -51,7 +51,7 @@
</excludes>
</fileSet>
<fileSet>
- <outputDirectory>shindig-${pom.version}-java</outputDirectory>
+ <outputDirectory>shindig-${project.version}-java</outputDirectory>
<directory>../java</directory>
<includes>
<include>LICENSE</include>
@@ -61,12 +61,12 @@
<files>
<file>
<source>../java/README</source>
- <outputDirectory>shindig-${pom.version}-java</outputDirectory>
+ <outputDirectory>shindig-${project.version}-java</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>../java/NOTICE</source>
- <outputDirectory>shindig-${pom.version}-java</outputDirectory>
+ <outputDirectory>shindig-${projet.version}-java</outputDirectory>
<filtered>true</filtered>
</file>
</files>
Modified: shindig/branches/2.0.x/assembly/src/main/assembly/php.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/assembly/src/main/assembly/php.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/assembly/src/main/assembly/php.xml (original)
+++ shindig/branches/2.0.x/assembly/src/main/assembly/php.xml Wed Jun 23 06:23:54 2010
@@ -26,7 +26,7 @@
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
- <outputDirectory>shindig-${pom.version}-php</outputDirectory>
+ <outputDirectory>shindig-${project.version}-php</outputDirectory>
<directory>../</directory>
<includes>
<include>features/**</include>
@@ -65,7 +65,7 @@
</excludes>
</fileSet>
<fileSet>
- <outputDirectory>shindig-${pom.version}-php</outputDirectory>
+ <outputDirectory>shindig-${project.version}-php</outputDirectory>
<directory>../php</directory>
<excludes>
<exclude>config/**</exclude>
@@ -104,7 +104,7 @@
<!-- Using the temp container.php created by Maven using Antrun plugin to rewrite
default configuration to release structure -->
<fileSet>
- <outputDirectory>shindig-${pom.version}-php/config</outputDirectory>
+ <outputDirectory>shindig-${project.version}-php/config</outputDirectory>
<directory>target/php/config</directory>
<excludes>
<!-- scm -->
@@ -116,12 +116,12 @@
<files>
<file>
<source>../php/README</source>
- <outputDirectory>shindig-${pom.version}-php</outputDirectory>
+ <outputDirectory>shindig-${project.version}-php</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>../php/NOTICE</source>
- <outputDirectory>shindig-${pom.version}-php</outputDirectory>
+ <outputDirectory>shindig-${project.version}-php</outputDirectory>
<filtered>true</filtered>
</file>
</files>
Modified: shindig/branches/2.0.x/config/container.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/config/container.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/config/container.js (original)
+++ shindig/branches/2.0.x/config/container.js Wed Jun 23 06:23:54 2010
@@ -59,7 +59,7 @@
// DNS domain on which gadgets should render.
"gadgets.lockedDomainSuffix" : "-a.example.com:8080",
-
+
// Origins for CORS requests and/or Referer validation
// Indicate a set of origins or an entry with * to indicate that all origins are allowed
"gadgets.parentOrigins" : ["*"],
@@ -69,12 +69,22 @@
// if locked domain is enabled and the implementation supports it.
// query parameters will be added.
"gadgets.iframeBaseUri" : "/gadgets/ifr",
+"gadgets.uri.iframe.basePath" : "/gadgets/ifr",
// jsUriTemplate will have %host% and %js% substituted.
// No locked domain special cases, but jsUriTemplate must
// never conflict with a lockedDomainSuffix.
"gadgets.jsUriTemplate" : "http://%host%/gadgets/js/%js%",
+//New configuration for iframeUri generation:
+"gadgets.uri.iframe.lockedDomainSuffix" : "-a.example.com:8080",
+"gadgets.uri.iframe.unlockedDomain" : "www.example.com:8080",
+"gadgets.uri.iframe.basePath" : "/gadgets/ifr",
+
+"gadgets.uri.js.host" : "http://www.example.com/",
+"gadgets.uri.js.path" : "/gadgets/js",
+
+
// Callback URL. Scheme relative URL for easy switch between https/http.
"gadgets.oauthGadgetCallbackTemplate" : "//%host%/gadgets/oauthcallback",
@@ -91,10 +101,28 @@
//"gadgets.securityTokenType" : "secure",
//"gadgets.securityTokenKeyFile" : "/path/to/key/file.txt",
+// URI for the default shindig test instance.
+"defaultShindigTestHost": "http://localhost:9003",
+
+// Authority (host:port without scheme) for the proxy and concat servlets.
+"defaultShindigProxyConcatAuthority": "localhost:9003",
+
+// Default Uri config: these must be overridden - specified here for testing purposes
+"gadgets.uri.iframe.unlockedDomain": "${Cur['defaultShindigTestHost']}",
+"gadgets.uri.iframe.lockedDomainSuffix": "${Cur['defaultShindigTestHost']}",
+
+// Default Js Uri config: also must be overridden.
+"gadgets.uri.js.host": "${Cur['defaultShindigTestHost']}",
+"gadgets.uri.js.path": "/gadgets/js",
// Default concat Uri config; used for testing.
-"gadgets.uri.concat.host" : "localhost:9003",
+"gadgets.uri.concat.host" : "${Cur['defaultShindigProxyConcatAuthority']}",
"gadgets.uri.concat.path" : "/gadgets/concat",
+"gadgets.uri.concat.js.splitToken" : "false",
+
+// Default proxy Uri config; used for testing.
+"gadgets.uri.proxy.host" : "${Cur['defaultShindigProxyConcatAuthority']}",
+"gadgets.uri.proxy.path" : "/gadgets/proxy",
// This config data will be passed down to javascript. Please
// configure your object using the feature name rather than
@@ -146,7 +174,7 @@
"opensocial" : {
// Path to fetch opensocial data from
// Must be on the same domain as the gadget rendering server
- "path" : "http://%host%/social/rpc",
+ "path" : "http://%host%/rpc",
// Path to issue invalidate calls
"invalidatePath" : "http://%host%/rpc",
"domain" : "shindig",
Modified: shindig/branches/2.0.x/extras/src/main/java/org/apache/shindig/extras/as/sample/ActivityStreamsJsonDbService.java
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/extras/src/main/java/org/apache/shindig/extras/as/sample/ActivityStreamsJsonDbService.java?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/extras/src/main/java/org/apache/shindig/extras/as/sample/ActivityStreamsJsonDbService.java (original)
+++ shindig/branches/2.0.x/extras/src/main/java/org/apache/shindig/extras/as/sample/ActivityStreamsJsonDbService.java Wed Jun 23 06:23:54 2010
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
package org.apache.shindig.extras.as.sample;
import com.google.common.collect.Lists;
@@ -172,7 +189,7 @@ public class ActivityStreamsJsonDbServic
JSONObject actor = new JSONObject(activityEntry.get(ActivityEntry.Field.ACTOR.toString()));
String actorId = actor.get(ActivityObject.Field.ID.toString()).toString();
if (actorId.equals(user)
- && activityIds.contains(activityEntry.getString(ActivityEntry.Field.ID.toString()).toString())) {
+ && activityIds.contains(activityEntry.getString(ActivityEntry.Field.ID.toString()))) {
result.add(jsonDb.filterFields(activityEntry, fields, ActivityEntry.class));
}
}
Modified: shindig/branches/2.0.x/extras/src/main/javascript/features-extras/features.txt
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/extras/src/main/javascript/features-extras/features.txt?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/extras/src/main/javascript/features-extras/features.txt (original)
+++ shindig/branches/2.0.x/extras/src/main/javascript/features-extras/features.txt Wed Jun 23 06:23:54 2010
@@ -1 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
features/org.jquery.core-1.4.2/feature.xml
Modified: shindig/branches/2.0.x/features/pom.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/pom.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/pom.xml (original)
+++ shindig/branches/2.0.x/features/pom.xml Wed Jun 23 06:23:54 2010
@@ -109,7 +109,7 @@
<source>globals/globals.js</source>
<source>core.config/config.js</source>
<source>core.json/json.js</source>
- <source>core.auth/auth.js</source>
+ <source>shindig.auth/auth.js</source>
<source>core.util/util.js</source>
<source>core.prefs/prefs.js</source>
<source>core.log/log.js</source>
@@ -121,7 +121,7 @@
<source>i18n/numberformat.js</source>
<source>setprefs/setprefs.js</source>
<source>views/views.js</source>
- <source>xhrwrapper/xhrwrapper.js</source>
+ <source>shindig.xhrwrapper/xhrwrapper.js</source>
<source>xmlutil/xmlutil.js</source>
<source>opensocial-data-context/datacontext.js</source>
<source>opensocial-data/data.js</source>
@@ -155,7 +155,7 @@
<source>osapi/jsonrpctransport.js</source>
<source>osapi/peoplehelpers.js</source>
<source>../../../../src/test/javascript/lib/testutils.js</source>
- <source>oauthpopup/oauthpopup.js</source>
+ <source>oauthpopup/oauthpopup.js</source>
</sources>
<testSourceDirectory>${basedir}/src/test/javascript/features</testSourceDirectory>
<testSuites>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/analytics/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/analytics/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/analytics/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/analytics/feature.xml Wed Jun 23 06:23:54 2010
@@ -20,7 +20,7 @@ specific language governing permissions
<name>analytics</name>
<dependency>core.legacy</dependency>
<gadget>
- <script src="http://www.google-analytics.com/urchin.js"/>
- <script src="http://www.google.com/ig/lib/libanalytics.js"/>
+ <script inline="true" src="http://www.google-analytics.com/urchin.js"/>
+ <script inline="true" src="http://www.google.com/ig/lib/libanalytics.js"/>
</gadget>
</feature>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/auth-refresh/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/auth-refresh/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/auth-refresh/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/auth-refresh/feature.xml Wed Jun 23 06:23:54 2010
@@ -18,7 +18,7 @@ specific language governing permissions
-->
<feature>
<name>auth-refresh</name>
- <dependency>core.auth</dependency>
+ <dependency>shindig.auth</dependency>
<dependency>rpc</dependency>
<gadget>
<script src="auth-refresh.js"/>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/com.google.gadgets.analytics/feature.xml Wed Jun 23 06:23:54 2010
@@ -20,7 +20,7 @@ specific language governing permissions
<name>com.google.gadgets.analytics</name>
<dependency>core.legacy</dependency>
<gadget>
- <script src="http://www.google.com/ig/lib/libga.js"/>
+ <script inline="true" src="http://www.google.com/ig/lib/libga.js"/>
<script src="analytics.js"/>
<script src="taming.js"/>
</gadget>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/container/container.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/container/container.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/container/container.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/container/container.js Wed Jun 23 06:23:54 2010
@@ -16,11 +16,13 @@
* specific language governing permissions and limitations under the License.
*/
+
/**
* @fileoverview This represents the container for the current window or create
* the container if none already exists.
*/
+
/**
* @param {Object=} opt_config Configuration JSON.
* @constructor
@@ -52,17 +54,11 @@ shindig.container.Container = function(o
shindig.container.ContainerConfig.RENDER_TEST, false));
/**
- * @type {boolean}
- */
- this.sameDomain_ = Boolean(shindig.container.util.getSafeJsonValue(config,
- shindig.container.ContainerConfig.SAME_DOMAIN, true));
-
- /**
* Security token refresh interval (in ms) for debugging.
* @type {number}
*/
- this.tokenRefreshInterval_ = Number(shindig.container.util.getSafeJsonValue(config,
- shindig.container.ContainerConfig.TOKEN_REFRESH_INTERVAL,
+ this.tokenRefreshInterval_ = Number(shindig.container.util.getSafeJsonValue(
+ config, shindig.container.ContainerConfig.TOKEN_REFRESH_INTERVAL,
30 * 60 * 1000));
/**
@@ -75,7 +71,7 @@ shindig.container.Container = function(o
* @type {number|null}
*/
this.tokenRefreshTimer_ = null;
-
+
this.registerRpcServices_();
this.onConstructed(config);
@@ -86,7 +82,7 @@ shindig.container.Container = function(o
* Create a new gadget site.
* @param {Element} gadgetEl HTML element into which to render
* @param {Element=} opt_bufferEl Optional HTML element for double buffering.
- * @return {shindig.container.GadgetSite} site created for application to hold to.
+ * @return {shindig.container.GadgetSite} site created for client to hold to.
*/
shindig.container.Container.prototype.newGadgetSite = function(
gadgetEl, opt_bufferEl) {
@@ -99,7 +95,7 @@ shindig.container.Container.prototype.ne
/**
* @param {string} id Iframe ID of gadget site to get.
- * @return {shindig.container.GadgetSite} The gadget site with given holder's iframeId.
+ * @return {shindig.container.GadgetSite} The gadget site with the given id.
*/
shindig.container.Container.prototype.getGadgetSite = function(id) {
// TODO: Support getting only the loading/active gadget in 2x buffers.
@@ -130,14 +126,15 @@ shindig.container.Container.prototype.ge
/**
* Called when gadget is navigated.
*
- * @param {shindig.container.GadgetSite} site the site where navigation is ocurring
- * @param {string} gadgetUrl The URI of the gadget
- * @param {Object} gadgetParams view params for the gadget
- * @param {Object} renderParams render parameters, including the view
- * @param {function(Object)=} opt_callback Callback that occurs after gadget is loaded
+ * @param {shindig.container.GadgetSite} site destination gadget to navigate to.
+ * @param {string} gadgetUrl The URI of the gadget.
+ * @param {Object} gadgetParams view params for the gadget.
+ * @param {Object} renderParams render parameters, including the view.
+ * @param {function(Object)=} opt_callback Callback after gadget is loaded.
*/
shindig.container.Container.prototype.navigateGadget = function(
site, gadgetUrl, gadgetParams, renderParams, opt_callback) {
+ var callback = opt_callback || function() {};
if (this.renderDebug_) {
renderParams['nocache'] = true;
renderParams['debug'] = true;
@@ -145,26 +142,24 @@ shindig.container.Container.prototype.na
if (this.renderTest_) {
renderParams['testmode'] = true;
}
+
var self = this;
- var callback = function(response) {
+ // TODO: Lifecycle, add ability for current gadget to cancel nav.
+ site.navigateTo(gadgetUrl, gadgetParams, renderParams, function(response) {
// TODO: Navigate to error screen on primary gadget load failure
// TODO: Should display error without doing a standard navigate.
// TODO: Bad if the error gadget fails to load.
if (!response.error) {
self.scheduleRefreshTokens_();
}
- if (opt_callback) {
- opt_callback(response);
- }
- };
- // TODO: Lifecycle, add ability for current gadget to cancel nav.
- site.navigateTo(gadgetUrl, gadgetParams, renderParams, callback);
+ callback(response);
+ });
};
/**
* Called when gadget is closed. This may stop refreshing of tokens.
- * @param {shindig.container.GadgetSite} site the site where navigation occurred.
+ * @param {shindig.container.GadgetSite} site navigate gadget to close.
*/
shindig.container.Container.prototype.closeGadget = function(site) {
var id = site.getId();
@@ -192,10 +187,8 @@ shindig.container.Container.prototype.pr
var self = this;
this.service_.getGadgetMetadata(metadataRequest, function(response) {
if (!response.error) {
- var data = response.data;
- var ids = shindig.container.util.toArrayOfJsonKeys(data);
- for (var i = 0; i < ids.length; i++) {
- self.addPreloadedGadgetUrl_(ids[i]);
+ for (var id in response) {
+ self.addPreloadedGadgetUrl_(id);
}
self.scheduleRefreshTokens_();
}
@@ -226,10 +219,9 @@ shindig.container.ContainerConfig = {};
shindig.container.ContainerConfig.RENDER_DEBUG = 'renderDebug';
// Whether test mode is turned on.
shindig.container.ContainerConfig.RENDER_TEST = 'renderTest';
-// Toggle to render gadgets in the same domain.
-shindig.container.ContainerConfig.SAME_DOMAIN = 'sameDomain';
// Security token refresh interval (in ms) for debugging.
-shindig.container.ContainerConfig.TOKEN_REFRESH_INTERVAL = 'tokenRefreshInterval';
+shindig.container.ContainerConfig.TOKEN_REFRESH_INTERVAL =
+ 'tokenRefreshInterval';
/**
@@ -312,7 +304,8 @@ shindig.container.Container.prototype.re
* @param {string} gadgetUrl URL of preloaded gadget.
* @private
*/
-shindig.container.Container.prototype.addPreloadedGadgetUrl_ = function(gadgetUrl) {
+shindig.container.Container.prototype.addPreloadedGadgetUrl_ = function(
+ gadgetUrl) {
this.preloadedGadgetUrls_[gadgetUrl] = null;
};
@@ -323,7 +316,8 @@ shindig.container.Container.prototype.ad
* @return {Array} An array of URLs of gadgets.
* @private
*/
-shindig.container.Container.prototype.getTokenRefreshableGadgetUrls_ = function() {
+shindig.container.Container.prototype.getTokenRefreshableGadgetUrls_ =
+ function() {
// Uses a JSON to ensure uniqueness. Collect all preloaded gadget URLs.
var result = shindig.container.util.mergeJsons({}, this.preloadedGadgetUrls_);
@@ -352,16 +346,15 @@ shindig.container.Container.prototype.re
};
var self = this;
- osapi.gadgets.getToken(request, function(response) {
+ this.service_.getGadgetToken(request, function(response) {
if (!response.error) {
// Update current (visible) gadgets with new tokens (already stored in
// cache). Do not need to update pre-loaded gadgets, since new tokens will
// take effect when they are navigated to.
- var data = response.data;
for (var key in self.sites_) {
var holder = self.sites_[key].getActiveGadget();
if (holder) {
- var token = data[holder.getUrl()]['token'];
+ var token = response[holder.getUrl()]['token'];
gadgets.rpc.call(holder.getIframeId(), 'update_security_token', null,
token);
}
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/container/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/container/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/container/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/container/feature.xml Wed Jun 23 06:23:54 2010
@@ -21,6 +21,7 @@ under the License.
<name>container</name>
<dependency>globals</dependency>
<dependency>core.log</dependency>
+ <dependency>shindig.auth</dependency>
<dependency>core.util</dependency>
<dependency>osapi</dependency>
<dependency>rpc</dependency>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_holder.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_holder.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_holder.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_holder.js Wed Jun 23 06:23:54 2010
@@ -16,10 +16,12 @@
* specific language governing permissions and limitations under the License.
*/
+
/**
* @fileoverview This represents an HTML element and the associated gadget.
*/
+
/**
* @param {number} siteId The id of site containing this holder.
* @param {Element} el The element to render gadgets in.
@@ -179,10 +181,13 @@ shindig.container.GadgetHolder.prototype
* Render a gadget into the element.
* @param {Object} gadgetInfo the JSON gadget description.
* @param {Object} gadgetParams View parameters for the gadget.
- * @param {Object} renderParams Render parameters for the gadget, including: view, width, height.
+ * @param {Object} renderParams Render parameters for the gadget, including:
+ * view, width, height.
*/
-shindig.container.GadgetHolder.prototype.render = function(gadgetInfo, gadgetParams, renderParams) {
- this.iframeId_ = shindig.container.GadgetHolder.IFRAME_ID_PREFIX_ + this.siteId_;
+shindig.container.GadgetHolder.prototype.render = function(
+ gadgetInfo, gadgetParams, renderParams) {
+ this.iframeId_ = shindig.container.GadgetHolder.IFRAME_ID_PREFIX_
+ + this.siteId_;
this.gadgetInfo_ = gadgetInfo;
this.gadgetParams_ = gadgetParams;
this.hasGadgetParams_ = false;
@@ -306,7 +311,8 @@ shindig.container.GadgetHolder.prototype
* @return {string} The URL with param append to.
* @private
*/
-shindig.container.GadgetHolder.prototype.updateBooleanParam_ = function(uri, param) {
+shindig.container.GadgetHolder.prototype.updateBooleanParam_
+ = function(uri, param) {
if (this.renderParams_[param]) {
uri = this.addQueryParam_(uri, param, "1");
}
@@ -362,7 +368,8 @@ shindig.container.GadgetHolder.prototype
* @return {string} The new URI.
* @private
*/
-shindig.container.GadgetHolder.prototype.addHashParam_ = function(uri, key, value) {
+shindig.container.GadgetHolder.prototype.addHashParam_ = function(
+ uri, key, value) {
return uri + ((uri.indexOf('#') == -1) ? '#' : '&') + key + '=' + value;
};
@@ -375,7 +382,8 @@ shindig.container.GadgetHolder.prototype
* @return {string} The new URI.
* @private
*/
-shindig.container.GadgetHolder.prototype.addQueryParam_ = function(uri, key, value) {
+shindig.container.GadgetHolder.prototype.addQueryParam_ = function(
+ uri, key, value) {
var hasQuery = uri.indexOf('?') != -1;
var insertPos = (uri.indexOf('#') != -1) ? uri.indexOf('#') : uri.length;
return uri.substring(0, insertPos) + (hasQuery ? '&' : '?') +
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_site.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_site.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_site.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/container/gadget_site.js Wed Jun 23 06:23:54 2010
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations under the License.
*/
+
/**
* @fileoverview This manages rendering of gadgets in a place holder, within an
* HTML element in the container. The API for this is low-level. Use the
@@ -198,12 +199,12 @@ shindig.container.GadgetSite.prototype.g
* @param {function(Object)=} opt_callback Function called with gadget info after
* navigation has occurred.
*/
-shindig.container.GadgetSite.prototype.navigateTo = function(gadgetUrl, gadgetParams,
- renderParams, opt_callback) {
+shindig.container.GadgetSite.prototype.navigateTo = function(
+ gadgetUrl, gadgetParams, renderParams, opt_callback) {
var callback = opt_callback || function() {};
- var gadgetInfo = osapi.gadgets.getCachedMetadataInfo(gadgetUrl);
-
+
// If metadata has been loaded/cached.
+ var gadgetInfo = this.service_.getCachedGadgetMetadata(gadgetUrl);
if (gadgetInfo) {
this.render(gadgetInfo, gadgetParams, renderParams);
callback(gadgetInfo);
@@ -217,9 +218,10 @@ shindig.container.GadgetSite.prototype.n
var self = this;
this.service_.getGadgetMetadata(request, function(response) {
if (!response.error) {
- var data = response.data;
- var gadgetInfo = data[gadgetUrl];
+ var gadgetInfo = response[gadgetUrl];
self.render(gadgetInfo, gadgetParams, renderParams);
+ callback(gadgetInfo);
+ } else {
callback(response);
}
});
@@ -234,8 +236,8 @@ shindig.container.GadgetSite.prototype.n
* @param {Object} renderParams. Render parameters for the gadget, including:
* view, width, height.
*/
-shindig.container.GadgetSite.prototype.render = function(gadgetInfo, gadgetParams,
- renderParams) {
+shindig.container.GadgetSite.prototype.render = function(
+ gadgetInfo, gadgetParams, renderParams) {
var curUrl = this.curGadget_ ? this.curGadget_.getUrl() : null;
var previousView = null;
@@ -290,7 +292,8 @@ shindig.container.GadgetSite.prototype.r
* @param {function(Object)} callback Function to call upon RPC completion.
* @param {...number} var_args payload to pass to the recipient.
*/
-shindig.container.GadgetSite.prototype.rpcCall = function(serviceName, callback, var_args) {
+shindig.container.GadgetSite.prototype.rpcCall = function(
+ serviceName, callback, var_args) {
if (this.curGadget_) {
gadgets.rpc.call(this.curGadget_.getIframeId(), serviceName, callback, var_args);
}
@@ -306,7 +309,7 @@ shindig.container.GadgetSite.prototype.r
*/
shindig.container.GadgetSite.prototype.updateSecurityToken_
= function(gadgetInfo, renderParams) {
- var tokenInfo = osapi.gadgets.getCachedTokenInfo(gadgetInfo['url']);
+ var tokenInfo = this.service_.getCachedGadgetToken(gadgetInfo['url']);
if (tokenInfo) {
var token = tokenInfo['token'];
this.loadingGadget_.setSecurityToken(token);
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/container/init.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/container/init.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/container/init.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/container/init.js Wed Jun 23 06:23:54 2010
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations under the License.
*/
+
/**
* @fileoverview Initial configuration/boot-strapping work for common container
* to operate. This includes setting up gadgets config and global environment
@@ -23,15 +24,18 @@
*/
(function() {
- function initializeGadgetsConfig() {
+ function initializeConfig() {
gadgets.config.init({
- 'rpc': {
- parentRelayUrl: ''
- },
- 'core.io': {
- jsonProxyUrl: 'http://%host%/gadgets/makeRequest',
- proxyUrl: 'http://%host%/gadgets/proxy?refresh=%refresh%&container=%container%%rewriteMime%&gadget=%gadget%/%rawurl%'
- }
+ 'rpc': {
+ parentRelayUrl: ''
+ },
+ 'core.io': {
+ jsonProxyUrl: 'http://%host%/gadgets/makeRequest',
+ proxyUrl: 'http://%host%/gadgets/proxy' +
+ '?refresh=%refresh%' +
+ '&container=%container%%rewriteMime%' +
+ '&gadget=%gadget%/%rawurl%'
+ }
});
}
@@ -48,23 +52,6 @@
}
}
- /**
- * Call a callback function if specified in &onload= query param. This is
- * required for dynamic source script inclusion, which is asynchronous.
- */
- function runOnloadCallback() {
- var scriptSrc = getLastScriptSrc();
- if (scriptSrc) {
- var onload = shindig.container.util.getParamValue(scriptSrc, 'onload');
- if (onload) {
- var re = /(^[A-Za-z0-9_]+$)/;
- if (re.test(onload) && (typeof window[onload] === "function")) {
- window[onload]();
- }
- }
- }
- }
-
function getLastScriptSrc() {
var scriptEls = document.getElementsByTagName('script');
return (scriptEls.length > 0)
@@ -72,7 +59,6 @@
: null;
}
- initializeGadgetsConfig();
+ initializeConfig();
initializeGlobalVars();
- runOnloadCallback();
})();
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/container/service.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/container/service.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/container/service.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/container/service.js Wed Jun 23 06:23:54 2010
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations under the License.
*/
+
/**
* @fileoverview This represents the service layer that talks to OSAPI
* endpoints. All RPC requests should go into this class.
@@ -23,17 +24,50 @@
/**
- * @param {Object=} opt_config. Configuration JSON.
+ * @param {Object=} opt_config Configuration JSON.
* @constructor
*/
shindig.container.Service = function(opt_config) {
var config = opt_config || {};
/**
+ * @type {string}
+ */
+ this.apiHost_ = String(google.container.util.getSafeJsonValue(config,
+ shindig.container.ServiceConfig.API_HOST, window.__API_HOST));
+
+ /**
+ * @type {string}
+ */
+ this.apiPrefixPath_ = String(google.container.util.getSafeJsonValue(config,
+ shindig.container.ServiceConfig.API_PREFIX_PATH,
+ window.__API_PREFIX_PATH));
+
+ /**
+ * @type {string}
+ */
+ this.apiPath_ = String(google.container.util.getSafeJsonValue(config,
+ shindig.container.ServiceConfig.API_PATH, '/api/rpc/cs'));
+
+ /**
* @type {boolean}
*/
this.sameDomain_ = Boolean(shindig.container.util.getSafeJsonValue(config,
- shindig.container.ServiceConfig.SAME_DOMAIN, true));
+ shindig.container.ServiceConfig.SAME_DOMAIN, false));
+
+ /**
+ * Map of gadget URLs to cached gadgetInfo response.
+ * @type {Object}
+ */
+ this.cachedMetadatas_ = {};
+
+ /**
+ * Map of gadget URLs to cached tokenInfo response.
+ * @type {Object}
+ */
+ this.cachedTokens_ = {};
+
+ this.initializeOsapi_();
this.onConstructed(config);
};
@@ -57,21 +91,45 @@ shindig.container.Service.prototype.onCo
*/
shindig.container.Service.prototype.getGadgetMetadata = function(
request, opt_callback) {
- var callback = opt_callback || function(a) {};
+ var callback = opt_callback || function() {};
var self = this;
- osapi.gadgets.getMetadata(request, function(response) {
+ osapi.gadgets.metadata.get(request).execute(function(response) {
if (response.error) {
- // This hides internal server error.
+ // Hides internal server error.
callback({
- error : 'Failed to retrieve gadget.',
+ error : 'Failed to retrieve gadget metadata.',
errorCode : 'NOLOAD'
});
} else {
- var data = response.data;
- var gadgetUrls = shindig.container.util.toArrayOfJsonKeys(data);
- for (var i = 0; i < gadgetUrls.length; i++) {
- var gadgetInfo = data[gadgetUrls[i]];
+ for (var id in response) {
+ var gadgetInfo = response[id];
self.processSameDomain_(gadgetInfo);
+ self.cachedMetadatas_[id] = gadgetInfo;
+ }
+ callback(response);
+ }
+ });
+};
+
+
+/**
+ * @param {Object} request JSON object representing the request.
+ * @param {function(Object)=} opt_callback function to call upon data receive.
+ */
+shindig.container.Service.prototype.getGadgetToken = function(
+ request, opt_callback) {
+ var callback = opt_callback || function() {};
+ var self = this;
+ osapi.gadgets.token.get(request).execute(function(response) {
+ if (response.error) {
+ // Hides internal server error.
+ callback({
+ error : 'Failed to retrieve gadget token.',
+ errorCode : 'NOLOAD'
+ });
+ } else {
+ for (var id in response) {
+ self.cachedTokens_[id] = response[id];
}
callback(response);
}
@@ -80,11 +138,55 @@ shindig.container.Service.prototype.getG
/**
+ * @param {string} url gadget URL to use as key to get cached metadata.
+ * @return {string} the gadgetInfo referenced by this URL.
+ */
+shindig.container.Service.prototype.getCachedGadgetMetadata = function(url) {
+ return this.cachedMetadatas_[url];
+};
+
+
+/**
+ * @param {string} url gadget URL to use as key to get cached token.
+ * @return {string} the tokenInfo referenced by this URL.
+ */
+shindig.container.Service.prototype.getCachedGadgetToken = function(url) {
+ return this.cachedTokens_[url];
+};
+
+
+/**
* @param {Object} gadgetInfo
* @private
*/
shindig.container.Service.prototype.processSameDomain_ = function(gadgetInfo) {
- gadgetInfo['sameDomain'] = this.sameDomain_;
+ if (this.sameDomain_ && gadgetInfo['sameDomain']) {
+ var views = gadgetInfo['views'] || {};
+ for (var view in views) {
+ views[view]['iframeHost'] = this.apiHost_;
+ }
+ }
+};
+
+
+/**
+ * Initialize OSAPI endpoint methods/interfaces.
+ * @private
+ */
+shindig.container.Service.prototype.initializeOsapi_ = function() {
+ var endPoint = this.apiHost_ + this.apiPrefixPath_ + this.apiPath_;
+
+ var osapiServicesConfig = {};
+ osapiServicesConfig['gadgets.rpc'] = [ 'container.listMethods' ];
+ osapiServicesConfig[endPoint] = [
+ 'gadgets.metadata.get',
+ 'gadgets.token.get'
+ ];
+
+ gadgets.config.init({
+ 'osapi': { 'endPoints': [ endPoint ] },
+ 'osapi.services': osapiServicesConfig
+ });
};
@@ -92,13 +194,18 @@ shindig.container.Service.prototype.proc
// Configuration
// -----------------------------------------------------------------------------
+
/**
* Enumeration of configuration keys for this service. This is specified in
* JSON to provide extensible configuration.
* @enum {string}
*/
shindig.container.ServiceConfig = {};
-
-//Toggle to render gadgets in the same domain.
-/** @type {string} */
+//Host to fetch gadget information, via XHR.
+shindig.container.ServiceConfig.API_HOST = 'apiHost';
+// Prefix to path to fetch gadget information, via XHR.
+shindig.container.ServiceConfig.API_PREFIX_PATH = 'apiPrefixPath';
+// Path (appears after API_PREFIX_PATH) to fetch gadget information, via XHR.
+shindig.container.ServiceConfig.API_PATH = 'apiPath';
+// Toggle to render gadgets in the same domain.
shindig.container.ServiceConfig.SAME_DOMAIN = 'sameDomain';
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/container/util.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/container/util.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/container/util.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/container/util.js Wed Jun 23 06:23:54 2010
@@ -16,15 +16,18 @@
* specific language governing permissions and limitations under the License.
*/
+
/**
- * @fileoverview Utility methods common container.
+ * @fileoverview Utility methods for common container.
*/
+
/**
* @type {Object}
*/
shindig.container = {};
+
/**
* @type {Object}
*/
@@ -61,6 +64,7 @@ shindig.container.util.parsePrefixPath =
return path;
};
+
/**
* Extract path of a URL.
* @param {string} uri The URL to extract path from.
@@ -127,20 +131,3 @@ shindig.container.util.toArrayOfJsonKeys
}
return result;
};
-
-
-// TODO unused?
-/**
- * Count the number of own/self properties in json.
- * @param {Object} json the JSON to act on.
- * @return {number} Number of elements in json.
- */
-shindig.container.util.countProperties = function(json) {
- var count = 0;
- for (var key in json) {
- if (json.hasOwnProperty(key)) {
- count++;
- }
- }
- return count;
-};
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/core.io/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/core.io/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/core.io/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/core.io/feature.xml Wed Jun 23 06:23:54 2010
@@ -29,7 +29,7 @@
-->
<name>core.io</name>
<dependency>globals</dependency>
- <dependency>core.auth</dependency>
+ <dependency>shindig.auth</dependency>
<dependency>core.config</dependency>
<dependency>core.json</dependency>
<dependency>core.util</dependency>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/core/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/core/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/core/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/core/feature.xml Wed Jun 23 06:23:54 2010
@@ -24,7 +24,7 @@
core.* libs.
-->
<name>core</name>
- <dependency>core.auth</dependency>
+ <dependency>shindig.auth</dependency>
<dependency>core.config</dependency>
<dependency>core.json</dependency>
<dependency>core.legacy</dependency>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/features.txt
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/features.txt?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/features.txt (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/features.txt Wed Jun 23 06:23:54 2010
@@ -24,7 +24,6 @@ features/auth-refresh/feature.xml
features/caja/feature.xml
features/container/feature.xml
features/content-rewrite/feature.xml
-features/core.auth/feature.xml
features/core.config/feature.xml
features/core.io/feature.xml
features/core.json/feature.xml
@@ -60,8 +59,10 @@ features/rpc/feature.xml
features/security-token/feature.xml
features/setprefs/feature.xml
features/settitle/feature.xml
+features/shindig.auth/feature.xml
features/shindig.container/feature.xml
features/shindig.container-1.0/feature.xml
+features/shindig.xhrwrapper/feature.xml
features/skins/feature.xml
features/swfobject/feature.xml
features/tabs/feature.xml
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/flash/flash.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/flash/flash.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/flash/flash.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/flash/flash.js Wed Jun 23 06:23:54 2010
@@ -195,6 +195,7 @@ gadgets.flash.embedFlash = function(swfU
html += '</object>';
}
swfContainer.innerHTML = html;
+ return true;
}
}
return false;
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/globals/globals.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/globals/globals.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/globals/globals.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/globals/globals.js Wed Jun 23 06:23:54 2010
@@ -1,4 +1,22 @@
-/**
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+
+/**
* @namespace The global gadgets namespace
* @type {Object}
*/
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/feature.xml Wed Jun 23 06:23:54 2010
@@ -19,7 +19,7 @@
-->
<feature>
<name>opensocial-jsonrpc</name>
- <dependency>core.auth</dependency>
+ <dependency>shindig.auth</dependency>
<dependency>core.prefs</dependency>
<dependency>core.io</dependency>
<dependency>core.json</dependency>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js Wed Jun 23 06:23:54 2010
@@ -189,7 +189,7 @@ var JsonRpcRequestItem = function(rpc, o
") and response id(" + response.id + ") do not match";
}
- var rawData = response.result || result.data;
+ var rawData = response.result || response.data;
var error = response.error;
var errorMessage = "";
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/osapi/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/osapi/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/osapi/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/osapi/feature.xml Wed Jun 23 06:23:54 2010
@@ -20,7 +20,7 @@
<feature>
<name>osapi</name>
<dependency>globals</dependency>
- <dependency>core.auth</dependency>
+ <dependency>shindig.auth</dependency>
<dependency>core.config</dependency>
<dependency>core.io</dependency>
<dependency>core.json</dependency>
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/tabs/tabs.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/tabs/tabs.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/tabs/tabs.js (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/tabs/tabs.js Wed Jun 23 06:23:54 2010
@@ -230,8 +230,13 @@ gadgets.TabSet.prototype.addTab = functi
this.saveSelectedTabIndex_();
}
- if (tabName == this.defaultTabName_ || (!this.defaultTabName_ && tabIndex === 0)) {
- this.selectTab_(tab);
+ var selectedIndex = parseInt(this.selectedTabIndex_, 10);
+ if (isNaN(selectedIndex)) {
+ if (tabName == this.defaultTabName_ || (!this.defaultTabName_ && tabIndex === 0)) {
+ this.selectTab_(tab);
+ }
+ } else if (selectedIndex == tabIndex) {
+ this.selectTab_(tab, true);
}
this.tabsAdded_++;
Modified: shindig/branches/2.0.x/features/src/main/javascript/features/xhrwrapper/feature.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/main/javascript/features/xhrwrapper/feature.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/main/javascript/features/xhrwrapper/feature.xml (original)
+++ shindig/branches/2.0.x/features/src/main/javascript/features/xhrwrapper/feature.xml Wed Jun 23 06:23:54 2010
@@ -18,9 +18,6 @@ specific language governing permissions
-->
<feature>
<name>xhrwrapper</name>
- <dependency>core.io</dependency>
- <dependency>xmlutil</dependency>
- <gadget>
- <script src="xhrwrapper.js"/>
- </gadget>
+ <!-- deprecated usage -->
+ <dependency>shindig.xhrwrapper</dependency>
</feature>
Modified: shindig/branches/2.0.x/features/src/test/javascript/features/xhrwrapper/xhrwrappertest.js
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/features/src/test/javascript/features/xhrwrapper/xhrwrappertest.js?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/features/src/test/javascript/features/xhrwrapper/xhrwrappertest.js (original)
+++ shindig/branches/2.0.x/features/src/test/javascript/features/xhrwrapper/xhrwrappertest.js Wed Jun 23 06:23:54 2010
@@ -234,4 +234,4 @@ XhrWrapperTest.prototype.checkOAuth = fu
this.assertEquals('OAUTH', this.madeRequest.params['AUTHORIZATION']);
this.assertEquals(service, this.madeRequest.params['OAUTH_SERVICE_NAME']);
this.assertEquals(opt_token, this.madeRequest.params['OAUTH_TOKEN_NAME']);
-};
\ No newline at end of file
+};
Modified: shindig/branches/2.0.x/java/common/conf/shindig.properties
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/java/common/conf/shindig.properties?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/java/common/conf/shindig.properties (original)
+++ shindig/branches/2.0.x/java/common/conf/shindig.properties Wed Jun 23 06:23:54 2010
@@ -124,6 +124,10 @@ shindig.http.client.max-object-size-byte
shindig.uri.proxy.use-strict-parsing=false
shindig.uri.concat.use-strict-parsing=false
+# Host:port of the proxy to use while fetching urls. Leave blank if proxy is
+# not to be used.
+org.apache.shindig.gadgets.http.basicHttpFetcherProxy=
+
org.apache.shindig.serviceExpirationDurationMinutes=60
#
Modified: shindig/branches/2.0.x/java/common/pom.xml
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/java/common/pom.xml?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/java/common/pom.xml (original)
+++ shindig/branches/2.0.x/java/common/pom.xml Wed Jun 23 06:23:54 2010
@@ -73,6 +73,24 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>reporting</id>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <configuration>
+ <comparisonVersion>1.0.1</comparisonVersion>
+ </configuration>
+ <version>2.2.2</version>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+ </profiles>
+
<dependencies>
<!-- external dependencies -->
<dependency>
Modified: shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/AuthenticationServletFilter.java
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/AuthenticationServletFilter.java?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/AuthenticationServletFilter.java (original)
+++ shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/AuthenticationServletFilter.java Wed Jun 23 06:23:54 2010
@@ -58,7 +58,7 @@ public class AuthenticationServletFilter
private List<AuthenticationHandler> handlers;
- private static final Logger logger = Logger.getLogger(
+ private static final Logger LOG = Logger.getLogger(
AuthenticationServletFilter.class.getName());
@Inject
@@ -97,7 +97,7 @@ public class AuthenticationServletFilter
callChain(chain, req, resp);
} catch (AuthenticationHandler.InvalidAuthenticationException iae) {
Throwable cause = iae.getCause();
- logger.log(Level.INFO, iae.getMessage(), cause);
+ LOG.log(Level.INFO, iae.getMessage(), cause);
if (iae.getAdditionalHeaders() != null) {
for (Map.Entry<String,String> entry : iae.getAdditionalHeaders().entrySet()) {
Modified: shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/UrlParameterAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/UrlParameterAuthenticationHandler.java?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/UrlParameterAuthenticationHandler.java (original)
+++ shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/auth/UrlParameterAuthenticationHandler.java Wed Jun 23 06:23:54 2010
@@ -33,7 +33,7 @@ import javax.servlet.http.HttpServletReq
*/
public class UrlParameterAuthenticationHandler implements AuthenticationHandler {
private static final String SECURITY_TOKEN_PARAM = "st";
- private static final String OAUTH2_TOKEN_PARAM = "oauth_token";
+
private final SecurityTokenDecoder securityTokenDecoder;
private static final Pattern COMMAWHITESPACE = Pattern.compile("\\s*,\\s*");
@@ -81,9 +81,10 @@ public class UrlParameterAuthenticationH
token = request.getParameter(SECURITY_TOKEN_PARAM);
}
- // OAuth token as a param
- if (token == null && request.isSecure()) {
- token = request.getParameter(OAUTH2_TOKEN_PARAM);
+ // OAuth2 token as a param
+ // NOTE: if oauth_signature_method is present then we have a OAuth 1.0 request
+ if (token == null && request.isSecure() && request.getParameter(OAuth.OAUTH_SIGNATURE_METHOD) == null) {
+ token = request.getParameter(OAuth.OAUTH_TOKEN);
}
// token in authorization header
Modified: shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/cache/ehcache/EhCacheCacheProvider.java
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/cache/ehcache/EhCacheCacheProvider.java?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/cache/ehcache/EhCacheCacheProvider.java (original)
+++ shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/cache/ehcache/EhCacheCacheProvider.java Wed Jun 23 06:23:54 2010
@@ -53,7 +53,7 @@ public class EhCacheCacheProvider implem
}
/**
- * Read the cache conifuration from the specified resource.
+ * Read the cache configuration from the specified resource.
* This function is intended to be overrideable to allow for programmatic
* cache configuration.
* @param configPath
Modified: shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/crypto/Crypto.java
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/crypto/Crypto.java?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/crypto/Crypto.java (original)
+++ shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/crypto/Crypto.java Wed Jun 23 06:23:54 2010
@@ -38,7 +38,7 @@ public final class Crypto {
* Use this random number generator instead of creating your own. This is
* thread-safe.
*/
- public static final SecureRandom rand = new SecureRandom();
+ public static final SecureRandom RAND = new SecureRandom();
/**
* HMAC algorithm to use
@@ -104,7 +104,7 @@ public final class Crypto {
*/
public static byte[] getRandomBytes(int numBytes) {
byte[] out = new byte[numBytes];
- rand.nextBytes(out);
+ RAND.nextBytes(out);
return out;
}
Modified: shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/util/HashUtil.java
URL: http://svn.apache.org/viewvc/shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/util/HashUtil.java?rev=957119&r1=957118&r2=957119&view=diff
==============================================================================
--- shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/util/HashUtil.java (original)
+++ shindig/branches/2.0.x/java/common/src/main/java/org/apache/shindig/common/util/HashUtil.java Wed Jun 23 06:23:54 2010
@@ -19,6 +19,8 @@
package org.apache.shindig.common.util;
+import com.google.common.base.Preconditions;
+
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -26,41 +28,42 @@ import java.security.NoSuchAlgorithmExce
* Routines for producing hashes.
*/
public final class HashUtil {
+ private static final char[] HEX_CHARS = "0123456789abcdef".toCharArray();
+
private HashUtil() {}
/**
- * Produces a checksum for the given input data.
+ * Produces a checksum for the given input data. Currently uses a hexified
+ * message digest.
*
* @param data
* @return The checksum.
*/
public static String checksum(byte[] data) {
- MessageDigest md;
- try {
- md = MessageDigest.getInstance("MD5");
- } catch (NoSuchAlgorithmException noMD5) {
- try {
- md = MessageDigest.getInstance("SHA");
- } catch (NoSuchAlgorithmException noSha) {
- throw new RuntimeException("No suitable MessageDigest found!");
- }
- }
- byte[] hash = md.digest(data);
+ byte[] hashBytes = getMessageDigest().digest(Preconditions.checkNotNull(data));
+ char[] hex = new char[2 * hashBytes.length];
+
// Convert to hex. possibly change to base64 in the future for smaller
// signatures.
- StringBuilder hexString = new StringBuilder(hash.length * 2 + 2);
- for (byte b : hash) {
- hexString.append(Integer.toHexString(0xFF & b));
+
+ int offset = 0;
+ for (byte b : hashBytes) {
+ hex[offset++] = HEX_CHARS[(b & 0xF0) >>> 4]; // upper 4 bits
+ hex[offset++] = HEX_CHARS[(b & 0x0F)]; // lower 4 bits
}
- return hexString.toString();
+ return new String(hex);
}
/**
- * Produces a raw checksum for the given input data.
+ * Produces a raw checksum for the given input data. Currently uses a message digest
*
* @param data
* @return The checksum.
*/
public static String rawChecksum(byte[] data) {
+ return new String(getMessageDigest().digest(Preconditions.checkNotNull(data)));
+ }
+
+ private static MessageDigest getMessageDigest() {
MessageDigest md;
try {
md = MessageDigest.getInstance("MD5");
@@ -68,9 +71,9 @@ public final class HashUtil {
try {
md = MessageDigest.getInstance("SHA");
} catch (NoSuchAlgorithmException noSha) {
- throw new RuntimeException("No suitable MessageDigest found!");
+ throw new RuntimeException("No suitable MessageDigest found!", noSha);
}
}
- return new String(md.digest(data));
+ return md;
}
}