|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.security.support.DefaultSecurityControllerManager
public class DefaultSecurityControllerManager
Default implementation of the SecurityControllerManager. The controller map can be set during bean initialization. Also, if the map is not set, or does not contain an entry for a requested security controller Id, then an attempt to retrieve a bean instance with the given id will be made. Thus, no map entries are required for security controllers that are referenced by their application context bean id.
This implementation also provides for a fallback security controller. The
fallback controller is registered with the
setFallbackSecurityController(SecurityController)
method. Once registered, any
call to getSecurityController(String)
that would have normally resulted in not
finding a controller will instead return the fallback controller.
Here's an example configuration:
<bean id="securityControllerManager" class="org.springframework.richclient.security.support.DefaultSecurityControllerManager"> <property name="fallbackSecurityController" ref="writeController" /> <property name="securityControllerMap"> <map> <entry key="contact.newContactCommand" value-ref="adminController"/> <entry key="contact.deleteContactCommand" value-ref="adminController"/> </map> </property> </bean>
Constructor Summary | |
---|---|
DefaultSecurityControllerManager()
|
Method Summary | |
---|---|
SecurityController |
getFallbackSecurityController()
Get the fallback security controller, if any. |
SecurityController |
getSecurityController(String id)
Get the security controller for the given id. |
void |
registerSecurityControllerAlias(String aliasId,
SecurityController securityController)
Register an alias for a SecurityController. |
void |
setFallbackSecurityController(SecurityController fallbackController)
Set the fallback security controller. |
void |
setSecurityControllerMap(Map map)
Set the map of controller Ids to controller instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultSecurityControllerManager()
Method Detail |
---|
public void setSecurityControllerMap(Map map)
SecurityControllerManager
setSecurityControllerMap
in interface SecurityControllerManager
map
- keyed by controller Id, value is SecurityController
instancepublic SecurityController getSecurityController(String id)
getSecurityController
in interface SecurityControllerManager
id
- of controller to retrieve
public void registerSecurityControllerAlias(String aliasId, SecurityController securityController)
registerSecurityControllerAlias
in interface SecurityControllerManager
aliasId
- to registersecurityController
- to register under given alias Idpublic void setFallbackSecurityController(SecurityController fallbackController)
fallbackController
- public SecurityController getFallbackSecurityController()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |