org.ow2.easybeans.examples.security
Class StatelessBean

java.lang.Object
  extended by org.ow2.easybeans.examples.security.StatelessBean
All Implemented Interfaces:
StatelessRemote

@DeclareRoles(value={"user","admin"})
public class StatelessBean
extends java.lang.Object
implements StatelessRemote

Stateless Bean with secured methods. Two roles are declared : user and admin.

Author:
Florent Benoit

Constructor Summary
StatelessBean()
           
 
Method Summary
 void allRolesAllowed()
          Method can be called by all security roles.
 void callRunAsBean()
          Make a call on a run-as bean which call our bean after that..
 void deniedForAll()
          No role can invoke this method.
 void onlyAdminAllowed()
          Only "admin" role can invoke this method.
 void printCurrentCaller()
          Prints the current caller.
 void someRolesAllowed()
          Method can be called by some roles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatelessBean

public StatelessBean()
Method Detail

someRolesAllowed

@RolesAllowed(value={"user","admin"})
public void someRolesAllowed()
Method can be called by some roles.

Specified by:
someRolesAllowed in interface StatelessRemote

allRolesAllowed

@PermitAll
public void allRolesAllowed()
Method can be called by all security roles.

Specified by:
allRolesAllowed in interface StatelessRemote

onlyAdminAllowed

@RolesAllowed(value="admin")
public void onlyAdminAllowed()
Only "admin" role can invoke this method.

Specified by:
onlyAdminAllowed in interface StatelessRemote

deniedForAll

@DenyAll
public void deniedForAll()
No role can invoke this method.

Specified by:
deniedForAll in interface StatelessRemote

printCurrentCaller

public void printCurrentCaller()
Prints the current caller.

Specified by:
printCurrentCaller in interface StatelessRemote

callRunAsBean

public void callRunAsBean()
Make a call on a run-as bean which call our bean after that..

Specified by:
callRunAsBean in interface StatelessRemote


Copyright © 2006-2009 OW2 Consortium. All Rights Reserved.