ome.security.basic
Class BasicMethodSecurity

java.lang.Object
  extended by ome.security.basic.BasicMethodSecurity
All Implemented Interfaces:
MethodSecurity

public class BasicMethodSecurity
extends Object
implements MethodSecurity

Implementation of MethodSecurity which checks method security based on the RolesAllowed annotations of our implementation methods. To do this, it is necessary to "unwrap" proxies via the Advised interface.

Since:
3.0-Beta2
Author:
Josh Moore, josh at glencoesoftware.com
See Also:
SecuritySystem

Constructor Summary
BasicMethodSecurity()
           
BasicMethodSecurity(boolean active)
           
 
Method Summary
 void checkMethod(Object o, Method m, Principal p, boolean hasPassword)
          See MethodSecurity#checkMethod(Object, Method, Principal)
 boolean isActive()
          See MethodSecurity.isActive()
 void setSessionManager(SessionManager sessionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicMethodSecurity

public BasicMethodSecurity()

BasicMethodSecurity

public BasicMethodSecurity(boolean active)
Method Detail

setSessionManager

public void setSessionManager(SessionManager sessionManager)

isActive

public boolean isActive()
See MethodSecurity.isActive()

Specified by:
isActive in interface MethodSecurity
Returns:
true if the other methods of this interface can and should be called.

checkMethod

public void checkMethod(Object o,
                        Method m,
                        Principal p,
                        boolean hasPassword)
See MethodSecurity#checkMethod(Object, Method, Principal)

Specified by:
checkMethod in interface MethodSecurity
Parameters:
o - Object on which this method will be called.
m - Method to be called.
p - Principal for which permissions will be checked.
hasPassword - flag if the user's session has been authenticated directly and not via a one-time session id or similar.


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.