org.apache.jetspeed.security.spi.impl
Class SecurityAccessImpl

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
          extended by org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
              extended by org.apache.jetspeed.security.spi.impl.SecurityAccessImpl
All Implemented Interfaces:
org.apache.jetspeed.security.spi.SecurityAccess, org.springframework.beans.factory.InitializingBean

public class SecurityAccessImpl
extends org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
implements org.apache.jetspeed.security.spi.SecurityAccess

Provides a utility class for common SPI queries.

Author:
David Le Strat , David Sean Taylor

Field Summary
 
Fields inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
repositoryPath
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
SecurityAccessImpl(String repositoryPath)
           
 
Method Summary
 org.apache.jetspeed.security.om.InternalGroupPrincipal getInternalGroupPrincipal(String groupFullPathName)
           Returns the InternalGroupPrincipalfrom the group full path name.
 Iterator getInternalGroupPrincipals(String filter)
           
 org.apache.jetspeed.security.om.InternalRolePrincipal getInternalRolePrincipal(String roleFullPathName)
           Returns the InternalRolePrincipalfrom the role full path name.
 Iterator getInternalRolePrincipals(String filter)
           
 org.apache.jetspeed.security.om.InternalUserPrincipal getInternalUserPrincipal(String username)
           Returns the InternalUserPrincipal from the user name.
 org.apache.jetspeed.security.om.InternalUserPrincipal getInternalUserPrincipal(String username, boolean isMappingOnly)
           Returns the InternalUserPrincipal from the user name.
 Iterator getInternalUserPrincipals(String filter)
           Returns a collection of Principalgiven the filter.
 boolean isKnownUser(String username)
           Returns if a Internal UserPrincipal is defined for the user name.
 void removeInternalGroupPrincipal(org.apache.jetspeed.security.om.InternalGroupPrincipal internalGroup)
           Remove the given InternalGroupPrincipal.
 void removeInternalRolePrincipal(org.apache.jetspeed.security.om.InternalRolePrincipal internalRole)
           Remove the given InternalRolePrincipal.
 void removeInternalUserPrincipal(org.apache.jetspeed.security.om.InternalUserPrincipal internalUser)
           Remove the given InternalUserPrincipal.
 void setInternalGroupPrincipal(org.apache.jetspeed.security.om.InternalGroupPrincipal internalGroup, boolean isMappingOnly)
           Sets the given InternalGroupPrincipal.
 void setInternalRolePrincipal(org.apache.jetspeed.security.om.InternalRolePrincipal internalRole, boolean isMappingOnly)
           Sets the given InternalRolePrincipal.
 void setInternalUserPrincipal(org.apache.jetspeed.security.om.InternalUserPrincipal internalUser, boolean isMappingOnly)
           Sets the given InternalUserPrincipal.
 
Methods inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
init
 
Methods inherited from class org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
checkDaoConfig, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityAccessImpl

public SecurityAccessImpl(String repositoryPath)
Parameters:
repositoryPath -
Method Detail

isKnownUser

public boolean isKnownUser(String username)

Returns if a Internal UserPrincipal is defined for the user name.

Specified by:
isKnownUser in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
username - The user name.
Returns:
true if the user is known

getInternalUserPrincipal

public org.apache.jetspeed.security.om.InternalUserPrincipal getInternalUserPrincipal(String username)

Returns the InternalUserPrincipal from the user name.

Specified by:
getInternalUserPrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
username - The user name.
Returns:
The InternalUserPrincipal.

getInternalUserPrincipal

public org.apache.jetspeed.security.om.InternalUserPrincipal getInternalUserPrincipal(String username,
                                                                                      boolean isMappingOnly)

Returns the InternalUserPrincipal from the user name.

Specified by:
getInternalUserPrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
username - The user name.
isMappingOnly - Whether a principal's purpose is for security mappping only.
Returns:
The InternalUserPrincipal.

getInternalUserPrincipals

public Iterator getInternalUserPrincipals(String filter)

Returns a collection of Principalgiven the filter.

Specified by:
getInternalUserPrincipals in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
filter - The filter.
Returns:
Collection of InternalUserPrincipal.

setInternalUserPrincipal

public void setInternalUserPrincipal(org.apache.jetspeed.security.om.InternalUserPrincipal internalUser,
                                     boolean isMappingOnly)
                              throws org.apache.jetspeed.security.SecurityException

Sets the given InternalUserPrincipal.

Specified by:
setInternalUserPrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
internalUser - The InternalUserPrincipal.
isMappingOnly - Whether a principal's purpose is for security mappping only.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.

removeInternalUserPrincipal

public void removeInternalUserPrincipal(org.apache.jetspeed.security.om.InternalUserPrincipal internalUser)
                                 throws org.apache.jetspeed.security.SecurityException

Remove the given InternalUserPrincipal.

Specified by:
removeInternalUserPrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
internalUser - The InternalUserPrincipal.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.

getInternalRolePrincipal

public org.apache.jetspeed.security.om.InternalRolePrincipal getInternalRolePrincipal(String roleFullPathName)

Returns the InternalRolePrincipalfrom the role full path name.

Specified by:
getInternalRolePrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
roleFullPathName - The role full path name.
Returns:
The InternalRolePrincipal.

setInternalRolePrincipal

public void setInternalRolePrincipal(org.apache.jetspeed.security.om.InternalRolePrincipal internalRole,
                                     boolean isMappingOnly)
                              throws org.apache.jetspeed.security.SecurityException

Sets the given InternalRolePrincipal.

Specified by:
setInternalRolePrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
internalRole - The InternalRolePrincipal.
isMappingOnly - Whether a principal's purpose is for security mappping only.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.

removeInternalRolePrincipal

public void removeInternalRolePrincipal(org.apache.jetspeed.security.om.InternalRolePrincipal internalRole)
                                 throws org.apache.jetspeed.security.SecurityException

Remove the given InternalRolePrincipal.

Specified by:
removeInternalRolePrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
internalRole - The InternalRolePrincipal.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.

getInternalGroupPrincipal

public org.apache.jetspeed.security.om.InternalGroupPrincipal getInternalGroupPrincipal(String groupFullPathName)

Returns the InternalGroupPrincipalfrom the group full path name.

Specified by:
getInternalGroupPrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
groupFullPathName - The group full path name.
Returns:
The InternalGroupPrincipal.

setInternalGroupPrincipal

public void setInternalGroupPrincipal(org.apache.jetspeed.security.om.InternalGroupPrincipal internalGroup,
                                      boolean isMappingOnly)
                               throws org.apache.jetspeed.security.SecurityException

Sets the given InternalGroupPrincipal.

Specified by:
setInternalGroupPrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
internalGroup - The InternalGroupPrincipal.
isMappingOnly - Whether a principal's purpose is for security mappping only.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.

removeInternalGroupPrincipal

public void removeInternalGroupPrincipal(org.apache.jetspeed.security.om.InternalGroupPrincipal internalGroup)
                                  throws org.apache.jetspeed.security.SecurityException

Remove the given InternalGroupPrincipal.

Specified by:
removeInternalGroupPrincipal in interface org.apache.jetspeed.security.spi.SecurityAccess
Parameters:
internalGroup - The InternalGroupPrincipal.
Throws:
org.apache.jetspeed.security.SecurityException - Throws a SecurityException.

getInternalRolePrincipals

public Iterator getInternalRolePrincipals(String filter)
Specified by:
getInternalRolePrincipals in interface org.apache.jetspeed.security.spi.SecurityAccess

getInternalGroupPrincipals

public Iterator getInternalGroupPrincipals(String filter)
Specified by:
getInternalGroupPrincipals in interface org.apache.jetspeed.security.spi.SecurityAccess


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.