org.apache.tapestry5.internal.services
Class RequestSecurityManagerImpl

java.lang.Object
  extended by org.apache.tapestry5.internal.services.RequestSecurityManagerImpl
All Implemented Interfaces:
RequestSecurityManager

public class RequestSecurityManagerImpl
extends Object
implements RequestSecurityManager


Constructor Summary
RequestSecurityManagerImpl(Request request, Response response, LinkSource linkSource, MetaDataLocator locator, BaseURLSource baseURLSource, boolean securityEnabled)
           
 
Method Summary
 boolean checkForInsecureRequest(String pageName)
          Checks the page to see if it is secure; if so, and the request is not secure, then a redirect to the page is generated and sent.
 String getBaseURL(String pageName)
          Determines if the page security does not match the request's security.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestSecurityManagerImpl

public RequestSecurityManagerImpl(Request request,
                                  Response response,
                                  LinkSource linkSource,
                                  MetaDataLocator locator,
                                  BaseURLSource baseURLSource,
                                  @Symbol(value="tapestry.secure-enabled")
                                  boolean securityEnabled)
Method Detail

checkForInsecureRequest

public boolean checkForInsecureRequest(String pageName)
                                throws IOException
Description copied from interface: RequestSecurityManager
Checks the page to see if it is secure; if so, and the request is not secure, then a redirect to the page is generated and sent.

Specified by:
checkForInsecureRequest in interface RequestSecurityManager
Parameters:
pageName - page for the current request
Returns:
true if a redirect was sent, false if normal processing should continue
Throws:
IOException

getBaseURL

public String getBaseURL(String pageName)
Description copied from interface: RequestSecurityManager
Determines if the page security does not match the request's security. If so, returns a base URL (to which the context path and servlet path may be appended).

Specified by:
getBaseURL in interface RequestSecurityManager
Parameters:
pageName - for the security check
Returns:
a base URL when switching security levels, or null if the page's security matches the request security
See Also:
BaseURLSource.getBaseURL(boolean)


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.