You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Henry Saputra (JIRA)" <ji...@apache.org> on 2011/08/29 20:50:37 UTC

[jira] [Created] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Inject Authority object instead of injecting the BasicAuthorityProvider itself
------------------------------------------------------------------------------

                 Key: SHINDIG-1604
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
             Project: Shindig
          Issue Type: Improvement
          Components: Java
            Reporter: Henry Saputra
            Priority: Minor


Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.

However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:

bind(Authority.class).toProvider(BasicAuthorityProvider.class);

we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.

Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093278#comment-13093278 ] 

Henry Saputra commented on SHINDIG-1604:
----------------------------------------

the binding still needed to Guice could get the right provider for injecting the right instance of Authority:

bind(Authority.class).toProvider(BasicAuthorityProvider.class);

This will allow Authority to be bind to BasicAuthorityProvider class (see http://code.google.com/p/google-guice/wiki/ProviderBindings).

> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Saputra updated SHINDIG-1604:
-----------------------------------

    Attachment: SHINDIG-1604-v3.patch

V3 of the patch addressing issue raised in the review.

> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604-v3.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093754#comment-13093754 ] 

jiraposter@reviews.apache.org commented on SHINDIG-1604:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1676/#review1689
-----------------------------------------------------------

Ship it!


LGTM. only one small nit. Thanks!


trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityTest.java
<https://reviews.apache.org/r/1676/#comment3847>

    Please replace "Provider" with "Authority". 


- li


On 2011-08-29 23:14:02, Henry Saputra wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1676/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-08-29 23:14:02)
bq.  
bq.  
bq.  Review request for shindig and li xu.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment. 
bq.  
bq.  However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule: 
bq.  
bq.  bind(Authority.class).toProvider(BasicAuthorityProvider.class); 
bq.  
bq.  we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection. 
bq.  
bq.  Implementation of Authority such as BasicAuthority has to be immutable and thread safe.
bq.  
bq.  
bq.  This addresses bug SHINDIG-1604.
bq.      https://issues.apache.org/jira/browse/SHINDIG-1604
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java 1162967 
bq.    trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthorityProvider.java 1162967 
bq.    trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityProviderTest.java 1162967 
bq.    trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityTest.java PRE-CREATION 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGuiceModule.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/BasicOAuthStore.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthModule.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultIframeUriManager.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java 1162967 
bq.    trunk/java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java 1162967 
bq.  
bq.  Diff: https://reviews.apache.org/r/1676/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Updated the JUnit test case to reflect the change
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Henry
bq.  
bq.



> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093101#comment-13093101 ] 

jiraposter@reviews.apache.org commented on SHINDIG-1604:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1676/
-----------------------------------------------------------

(Updated 2011-08-29 19:04:29.707828)


Review request for shindig and li xu.


Summary
-------

Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment. 

However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule: 

bind(Authority.class).toProvider(BasicAuthorityProvider.class); 

we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection. 

Implementation of Authority such as BasicAuthority has to be immutable and thread safe.


This addresses bug SHINDIG-1604.
    https://issues.apache.org/jira/browse/SHINDIG-1604


Diffs (updated)
-----

  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java 1162192 
  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthorityProvider.java 1162192 
  trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityProviderTest.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/BasicOAuthStore.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthModule.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultIframeUriManager.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java 1162192 
  trunk/java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java 1162192 

Diff: https://reviews.apache.org/r/1676/diff


Testing
-------

Updated the JUnit test case to reflect the change


Thanks,

Henry



> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093097#comment-13093097 ] 

Henry Saputra commented on SHINDIG-1604:
----------------------------------------

Code review at https://reviews.apache.org/r/1676/

> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "li xu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093260#comment-13093260 ] 

li xu commented on SHINDIG-1604:
--------------------------------


Regarding this comment:
Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.

However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule


Why it still bind to BasicAuthorityProvider?

thanks,
li



> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093755#comment-13093755 ] 

jiraposter@reviews.apache.org commented on SHINDIG-1604:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1676/#review1690
-----------------------------------------------------------

Ship it!


LGTM. only one small nit. Thanks!

- li


On 2011-08-29 23:14:02, Henry Saputra wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1676/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-08-29 23:14:02)
bq.  
bq.  
bq.  Review request for shindig and li xu.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment. 
bq.  
bq.  However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule: 
bq.  
bq.  bind(Authority.class).toProvider(BasicAuthorityProvider.class); 
bq.  
bq.  we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection. 
bq.  
bq.  Implementation of Authority such as BasicAuthority has to be immutable and thread safe.
bq.  
bq.  
bq.  This addresses bug SHINDIG-1604.
bq.      https://issues.apache.org/jira/browse/SHINDIG-1604
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java 1162967 
bq.    trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthorityProvider.java 1162967 
bq.    trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityProviderTest.java 1162967 
bq.    trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityTest.java PRE-CREATION 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGuiceModule.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/BasicOAuthStore.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthModule.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultIframeUriManager.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java 1162967 
bq.    trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java 1162967 
bq.    trunk/java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java 1162967 
bq.  
bq.  Diff: https://reviews.apache.org/r/1676/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Updated the JUnit test case to reflect the change
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Henry
bq.  
bq.



> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Saputra updated SHINDIG-1604:
-----------------------------------

    Attachment: SHINDIG-1604.patch

Proposed patch.

> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093096#comment-13093096 ] 

jiraposter@reviews.apache.org commented on SHINDIG-1604:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1676/
-----------------------------------------------------------

Review request for shindig and li xu.


Summary
-------

Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment. 

However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule: 

bind(Authority.class).toProvider(BasicAuthorityProvider.class); 

we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection. 

Implementation of Authority such as BasicAuthority has to be immutable and thread safe.


This addresses bug SHINDIG-1604.
    https://issues.apache.org/jira/browse/SHINDIG-1604


Diffs
-----

  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java 1162192 
  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthorityProvider.java 1162192 
  trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityProviderTest.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/BasicOAuthStore.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthModule.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultIframeUriManager.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java 1162192 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java 1162192 
  trunk/java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java 1162192 

Diff: https://reviews.apache.org/r/1676/diff


Testing
-------

Updated the JUnit test case to reflect the change


Thanks,

Henry



> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093296#comment-13093296 ] 

jiraposter@reviews.apache.org commented on SHINDIG-1604:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1676/
-----------------------------------------------------------

(Updated 2011-08-29 23:14:02.691139)


Review request for shindig and li xu.


Changes
-------

Remove BasicAuthorityProvider and bind Authority directly to BasicAuthority class. The BasicAuthority is not a big class and should not need separate provider for it.


Summary
-------

Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment. 

However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule: 

bind(Authority.class).toProvider(BasicAuthorityProvider.class); 

we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection. 

Implementation of Authority such as BasicAuthority has to be immutable and thread safe.


This addresses bug SHINDIG-1604.
    https://issues.apache.org/jira/browse/SHINDIG-1604


Diffs (updated)
-----

  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java 1162967 
  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthorityProvider.java 1162967 
  trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityProviderTest.java 1162967 
  trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityTest.java PRE-CREATION 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGuiceModule.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/BasicOAuthStore.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthModule.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultIframeUriManager.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java 1162967 
  trunk/java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java 1162967 

Diff: https://reviews.apache.org/r/1676/diff


Testing
-------

Updated the JUnit test case to reflect the change


Thanks,

Henry



> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "Paul Lindner (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Lindner closed SHINDIG-1604.
---------------------------------


part of 2.5.0-beta1 release.

                
> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>             Fix For: 2.5.0-beta1
>
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604-v3.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Saputra updated SHINDIG-1604:
-----------------------------------

    Attachment: SHINDIG-1604-v2.patch

Attach v2 of the patch to just bind Authority to BasicAuthority without having the provider. Patch also uploaded to review board.

> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "li xu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093756#comment-13093756 ] 

li xu commented on SHINDIG-1604:
--------------------------------

LGTM. thanks!

> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SHINDIG-1604) Inject Authority object instead of injecting the BasicAuthorityProvider itself

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093962#comment-13093962 ] 

jiraposter@reviews.apache.org commented on SHINDIG-1604:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1676/
-----------------------------------------------------------

(Updated 2011-08-30 18:11:25.582423)


Review request for shindig and li xu.


Changes
-------

Change test method from Provider to Authority.


Summary
-------

Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment. 

However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule: 

bind(Authority.class).toProvider(BasicAuthorityProvider.class); 

we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection. 

Implementation of Authority such as BasicAuthority has to be immutable and thread safe.


This addresses bug SHINDIG-1604.
    https://issues.apache.org/jira/browse/SHINDIG-1604


Diffs (updated)
-----

  trunk/content/samplecontainer/examples/commoncontainer/assembler.js 1162967 
  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java 1162967 
  trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthorityProvider.java 1162967 
  trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityProviderTest.java 1162967 
  trunk/java/common/src/test/java/org/apache/shindig/common/servlet/BasicAuthorityTest.java PRE-CREATION 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGuiceModule.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/BasicOAuthStore.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthModule.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultIframeUriManager.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java 1162967 
  trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java 1162967 
  trunk/java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java 1162967 

Diff: https://reviews.apache.org/r/1676/diff


Testing
-------

Updated the JUnit test case to reflect the change


Thanks,

Henry



> Inject Authority object instead of injecting the BasicAuthorityProvider itself
> ------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1604
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1604
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Henry Saputra
>            Assignee: Henry Saputra
>            Priority: Minor
>         Attachments: SHINDIG-1604-v2.patch, SHINDIG-1604-v3.patch, SHINDIG-1604.patch
>
>
> Currently the code inject BasicAuthorityProvider to allow Shindig Java to be deploy in non root environment.
> However this is not necessary since the BasicAuthority is bind to Authority in DefaultGuiceModule:
> bind(Authority.class).toProvider(BasicAuthorityProvider.class);
> we just need to inject Authority instance itself because we dont really need multiple instances of Authority which is the main purpose of the Provider injection.
> Implementation of Authority such as BasicAuthority has to be immutable and thread safe.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira