| java.lang.Object org.apache.cocoon.auth.ApplicationUtil
ApplicationUtil | public class ApplicationUtil implements Contextualizable(Code) | | Utility class that can be used from flow to access the different
application functions of Cocoon Authentication.
version: $Id: ApplicationUtil.java 433543 2006-08-22 06:22:54Z crossley $ |
Field Summary | |
protected Context | context The Avalon context. |
context | protected Context context(Code) | | The Avalon context.
|
contextualize | public void contextualize(Context aContext) throws ContextException(Code) | | See Also: org.apache.avalon.framework.context.Contextualizable.contextualize(org.apache.avalon.framework.context.Context) |
getApplication | public static Application getApplication(Map objectModel)(Code) | | Return the current application.
Parameters: objectModel - The object model of the current request. The current application or null. |
getApplication | public Application getApplication()(Code) | | Return the current application.
The current application or null. |
getData | public static Object getData(Map objectModel)(Code) | | Return the current user data.
Parameters: objectModel - The object model of the current request. The current user data or null. |
getData | public Object getData()(Code) | | Return the current user data.
The current user data or null. |
getUser | public static User getUser(Map objectModel)(Code) | | Return the current user.
Parameters: objectModel - The object model of the current request. The current user or null. |
getUser | public User getUser()(Code) | | Return the current user.
The current user or null. |
isUserInRole | public boolean isUserInRole(User user, String role, Map objectModel)(Code) | | Checks if the user has the given role.
First
User.isUserInRole(String) is invoked. If the result is false,
the
Request.isUserInRole(java.lang.String) is called.
Parameters: user - The user to test. Parameters: role - The role. Parameters: objectModel - The Cocoon object model. This returns true, if the user has the role; otherwise false is returned. |
|
|