One of the things I'm considering with this is subclassing DirectService
and overriding it. Then overriding triggerComponent() and put my
authorization stuff in there. Does this sound like a good approach?
Also, I can't seem to get the system to actually use my service.

Java:
public class AuthDirectService extends DirectService {

        public AuthDirectService() {
                super();
        }

        @Override
        protected void triggerComponent(IRequestCycle cycle, IDirect direct,
Object[] parameters) {
                super.triggerComponent(cycle, direct, parameters);
        }

        @Override
        public String getName() {
                return "cms.authdirect";
        }

        
}

hivemodule:
  <service-point id="authdirect"
interface="org.apache.tapestry.engine.IEngineService">
        <invoke-factory service-id="hivemind.BuilderFactory" model="singleton"
>
                <construct class="aspect.AuthDirectService" >
                        <set-object property="responseRenderer"
value="infrastructure:responseRenderer" />
                        <set-object property="request" 
value="infrastructure:request" />
                        <set-object property="linkFactory"
value="infrastructure:linkFactory" />
                </construct>
        </invoke-factory>  
  </service-point>
  
  <contribution configuration-id="tapestry.services.FactoryServices">
    <service name="cms.authdirect" object="service:cms.authdirect"/>
  </contribution>

On Thu, 2005-10-20 at 17:30 -0400, Dan Adams wrote:
> Okay, I have something set up that works well where if you request a
> page and dont have access a PageCallback gets created and you get sent
> to the login page. After loging in the callback is used to return you to
> the desired page.
> 
> Now, I would like to do something similar with direct links so that if
> you request a direct link and don't have access a DirectCallback gets
> created, you log in, and then get sent back to the direct link. Any
> ideas on how to do this?
> 
-- 
Dan Adams
Software Engineer
Interactive Factory


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to