org.apache.activemq.security
Class DefaultAuthorizationMap

java.lang.Object
  extended by org.apache.activemq.filter.DestinationMap
      extended by org.apache.activemq.security.DefaultAuthorizationMap
All Implemented Interfaces:
AuthorizationMap
Direct Known Subclasses:
CachedLDAPAuthorizationMap

public class DefaultAuthorizationMap
extends DestinationMap
implements AuthorizationMap

Represents a destination based configuration of policies so that individual destinations or wildcard hierarchies of destinations can be configured using different policies. Each entry in the map represents the authorization ACLs for each operation.


Field Summary
 
Fields inherited from class org.apache.activemq.filter.DestinationMap
ANY_CHILD, ANY_DESCENDENT
 
Constructor Summary
DefaultAuthorizationMap()
           
DefaultAuthorizationMap(List<DestinationMapEntry> authorizationEntries)
           
 
Method Summary
 Set get(ActiveMQDestination key)
          Looks up the value(s) matching the given Destination key.
 Set<Object> getAdminACLs(ActiveMQDestination destination)
          Returns the set of all ACLs capable of administering the given destination
protected  Set<AuthorizationEntry> getAllEntries(ActiveMQDestination destination)
           
 AuthorizationEntry getDefaultEntry()
           
protected  Class<? extends DestinationMapEntry> getEntryClass()
          Returns the type of the allowed entries which can be set via the DestinationMap.setEntries(List) method.
 AuthorizationEntry getEntryFor(ActiveMQDestination destination)
           
 Set<Object> getReadACLs(ActiveMQDestination destination)
          Returns the set of all ACLs capable of reading (consuming from) the given destination
 Set<Object> getTempDestinationAdminACLs()
          Returns the set of all ACLs capable of administering temp destination
 TempDestinationAuthorizationEntry getTempDestinationAuthorizationEntry()
           
 Set<Object> getTempDestinationReadACLs()
          Returns the set of all ACLs capable of reading from temp destination
 Set<Object> getTempDestinationWriteACLs()
          Returns the set of all ACLs capable of writing to temp destination
 Set<Object> getWriteACLs(ActiveMQDestination destination)
          Returns the set of all ACLs capable of writing to the given destination
 void setAuthorizationEntries(List<DestinationMapEntry> entries)
          Sets the individual entries on the authorization map
 void setDefaultEntry(AuthorizationEntry defaultEntry)
           
 void setTempDestinationAuthorizationEntry(TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry)
           
 
Methods inherited from class org.apache.activemq.filter.DestinationMap
chooseValue, findWildcardMatches, getQueueRootChildCount, getQueueRootNode, getRootNode, getTempQueueRootNode, getTempTopicRootNode, getTopicRootChildCount, getTopicRootNode, put, remove, removeAll, reset, setEntries, union
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuthorizationMap

public DefaultAuthorizationMap()

DefaultAuthorizationMap

public DefaultAuthorizationMap(List<DestinationMapEntry> authorizationEntries)
Method Detail

setTempDestinationAuthorizationEntry

public void setTempDestinationAuthorizationEntry(TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry)

getTempDestinationAuthorizationEntry

public TempDestinationAuthorizationEntry getTempDestinationAuthorizationEntry()

getTempDestinationAdminACLs

public Set<Object> getTempDestinationAdminACLs()
Description copied from interface: AuthorizationMap
Returns the set of all ACLs capable of administering temp destination

Specified by:
getTempDestinationAdminACLs in interface AuthorizationMap

getTempDestinationReadACLs

public Set<Object> getTempDestinationReadACLs()
Description copied from interface: AuthorizationMap
Returns the set of all ACLs capable of reading from temp destination

Specified by:
getTempDestinationReadACLs in interface AuthorizationMap

getTempDestinationWriteACLs

public Set<Object> getTempDestinationWriteACLs()
Description copied from interface: AuthorizationMap
Returns the set of all ACLs capable of writing to temp destination

Specified by:
getTempDestinationWriteACLs in interface AuthorizationMap

getAdminACLs

public Set<Object> getAdminACLs(ActiveMQDestination destination)
Description copied from interface: AuthorizationMap
Returns the set of all ACLs capable of administering the given destination

Specified by:
getAdminACLs in interface AuthorizationMap

getReadACLs

public Set<Object> getReadACLs(ActiveMQDestination destination)
Description copied from interface: AuthorizationMap
Returns the set of all ACLs capable of reading (consuming from) the given destination

Specified by:
getReadACLs in interface AuthorizationMap

getWriteACLs

public Set<Object> getWriteACLs(ActiveMQDestination destination)
Description copied from interface: AuthorizationMap
Returns the set of all ACLs capable of writing to the given destination

Specified by:
getWriteACLs in interface AuthorizationMap

getEntryFor

public AuthorizationEntry getEntryFor(ActiveMQDestination destination)

get

public Set get(ActiveMQDestination key)
Looks up the value(s) matching the given Destination key. For simple destinations this is typically a List of one single value, for wildcards or composite destinations this will typically be a Union of matching values.

Overrides:
get in class DestinationMap
Parameters:
key - the destination to lookup
Returns:
a Union of matching values or an empty list if there are no matching values.

setAuthorizationEntries

public void setAuthorizationEntries(List<DestinationMapEntry> entries)
Sets the individual entries on the authorization map


getDefaultEntry

public AuthorizationEntry getDefaultEntry()

setDefaultEntry

public void setDefaultEntry(AuthorizationEntry defaultEntry)

getEntryClass

protected Class<? extends DestinationMapEntry> getEntryClass()
Description copied from class: DestinationMap
Returns the type of the allowed entries which can be set via the DestinationMap.setEntries(List) method. This allows derived classes to further restrict the type of allowed entries to make a type safe destination map for custom policies.

Overrides:
getEntryClass in class DestinationMap

getAllEntries

protected Set<AuthorizationEntry> getAllEntries(ActiveMQDestination destination)


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.