net.sourceforge.pebble.security
Class PrivateBlogFilterInvocationDefinitionSource

java.lang.Object
  extended by net.sourceforge.pebble.security.PrivateBlogFilterInvocationDefinitionSource

public class PrivateBlogFilterInvocationDefinitionSource
extends java.lang.Object

Bespoke FilterInvocationDefinitionSource that holds a mapping between blog IDs and the roles that can access them. This is used when blog owners mark their blog as "private", which forces authentication before the content can be accessed. This implementation allows mappings to be removed and added at runtime, making it possible to make blogs private without restarting the web/application server.

Author:
Simon Brown

Constructor Summary
PrivateBlogFilterInvocationDefinitionSource()
           
 
Method Summary
 ConfigAttributeDefinition getAttributes(java.lang.Object object)
          Accesses the ConfigAttributeDefinition that applies to a given secure object.
 java.util.Iterator getConfigAttributeDefinitions()
          If available, all of the ConfigAttributeDefinitions defined by the implementing class.
 boolean supports(java.lang.Class clazz)
          Indicates whether the ObjectDefinitionSource implementation is able to provide ConfigAttributeDefinitions for the indicated secure object type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivateBlogFilterInvocationDefinitionSource

public PrivateBlogFilterInvocationDefinitionSource()
Method Detail

getAttributes

public ConfigAttributeDefinition getAttributes(java.lang.Object object)
                                        throws java.lang.IllegalArgumentException
Accesses the ConfigAttributeDefinition that applies to a given secure object.

Returns null if no ConfigAttribiteDefinition applies.

Parameters:
object - the object being secured
Returns:
the ConfigAttributeDefinition that applies to the passed object
Throws:
java.lang.IllegalArgumentException - if the passed object is not of a type supported by the ObjectDefinitionSource implementation

getConfigAttributeDefinitions

public java.util.Iterator getConfigAttributeDefinitions()
If available, all of the ConfigAttributeDefinitions defined by the implementing class.

This is used by the org.acegisecurity.intercept.AbstractSecurityInterceptor to perform startup time validation of each ConfigAttribute configured against it.

Returns:
an iterator over all the ConfigAttributeDefinitions or null if unsupported

supports

public boolean supports(java.lang.Class clazz)
Indicates whether the ObjectDefinitionSource implementation is able to provide ConfigAttributeDefinitions for the indicated secure object type.

Parameters:
clazz - the class that is being queried
Returns:
true if the implementation can process the indicated class


Copyright © 2003-2006, Simon Brown. All Rights Reserved.