Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for 
change notification.

The following page has been changed by SidFerreira:
http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess

The comment on the change is:
Fixing constructor

------------------------------------------------------------------------------
  === Page rights as an annotation ===
  Our first task is to create a @Private annotation that we will put on pages 
where the authentication of the user is required. Our annotation will be 
associated to pages and will have no parameters. So, its implementation will be 
as simple as :
  {{{
- @Target(TYPE)
- @Retention(RUNTIME)
+ @Target(ElementType.TYPE)
+ @Retention(RetentionPolicy.RUNTIME)
  @Documented
  public @interface Private
  {
@@ -38, +38 @@

    private final static String LOGIN_PAGE = "/login";
  
    private ApplicationStateManager asm;
-   private UserSessionImpl newUserSession;
+   private UserSession newUserSession;
    private final ComponentClassResolver resolver;
    private final ComponentSource componentSource;
  
@@ -46, +46 @@

     * Receive all the services needed as constructor arguments. When we bind 
this
     * service, T5 IoC will provide all the services !
     */
-   public AccessController(ApplicationStateManager asm, ComponentClassResolver 
resolver, ComponentSource componentSource, UserSessionImpl newUserSession)
+   public AccessController(ApplicationStateManager asm, ComponentClassResolver 
resolver, ComponentSource componentSource, UserSession newUserSession)
    {
      this.asm = asm;
      this.newUserSession = newUserSession;

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to