org.apache.portals.graffito.security.impl
Class AbstractSecurityTestcase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jetspeed.components.test.AbstractSpringTestCase
              extended by org.apache.portals.graffito.persistence.impl.DatasourceEnabledSpringTestCase
                  extended by org.apache.portals.graffito.persistence.impl.PersistenceSupportedTestCase
                      extended by org.apache.portals.graffito.security.impl.AbstractSecurityTestcase
All Implemented Interfaces:
junit.framework.Test

public class AbstractSecurityTestcase
extends PersistenceSupportedTestCase

Version:
$Id: AbstractSecurityTestcase.java,v 1.1 2004/12/22 20:37:03 christophe Exp $
Author:
Christophe Lombart

Field Summary
protected  org.apache.jetspeed.security.spi.CredentialHandler ch
          SPI Default Credential Handler.
protected  org.apache.portals.graffito.context.CmsRequestContextManager contextManager
           
protected  org.apache.jetspeed.security.GroupManager gms
          The group manager.
protected  org.apache.jetspeed.security.spi.GroupSecurityHandler gsh
          SPI Default Group Security Handler.
protected  javax.security.auth.login.LoginContext loginContext
           
protected  org.apache.portals.graffito.services.core.ContentPermissionService pms
          The permission manager.
protected  org.apache.jetspeed.security.RoleManager rms
          The role manager.
protected  org.apache.jetspeed.security.spi.RoleSecurityHandler rsh
          SPI Default Role Security Handler.
protected  org.apache.jetspeed.security.spi.SecurityAccess securityAccess
          SPI Common Queries.
protected  org.apache.jetspeed.security.SecurityProvider securityProvider
          The security provider.
protected  org.apache.jetspeed.security.spi.SecurityMappingHandler smh
          SPI Default Security Mapping Handler.
protected  org.apache.jetspeed.security.UserManager ums
          The user manager.
protected  org.apache.jetspeed.security.spi.UserSecurityHandler ush
          SPI Default User Security Handler.
 
Fields inherited from class org.apache.portals.graffito.persistence.impl.PersistenceSupportedTestCase
ojbFactory, persistenceService, persistenceStore
 
Fields inherited from class org.apache.portals.graffito.persistence.impl.DatasourceEnabledSpringTestCase
datasourceComponent, jndi
 
Fields inherited from class org.apache.jetspeed.components.test.AbstractSpringTestCase
ctx
 
Constructor Summary
AbstractSecurityTestcase()
           Default constructor.
 
Method Summary
protected  void destroyUser()
          Detroy the user test object
protected  java.lang.String[] getConfigurations()
           
protected  java.util.Collection getPrincipals(javax.security.auth.Subject subject, java.lang.Class claz)
          Returns subject's principals of type claz
protected  void initUser()
           Initialize user test object.
protected  void setUp()
           
 void tearDown()
           
 
Methods inherited from class org.apache.jetspeed.components.test.AbstractSpringTestCase
getBootConfigurations
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

securityAccess

protected org.apache.jetspeed.security.spi.SecurityAccess securityAccess
SPI Common Queries.


ch

protected org.apache.jetspeed.security.spi.CredentialHandler ch
SPI Default Credential Handler.


ush

protected org.apache.jetspeed.security.spi.UserSecurityHandler ush
SPI Default User Security Handler.


rsh

protected org.apache.jetspeed.security.spi.RoleSecurityHandler rsh
SPI Default Role Security Handler.


gsh

protected org.apache.jetspeed.security.spi.GroupSecurityHandler gsh
SPI Default Group Security Handler.


smh

protected org.apache.jetspeed.security.spi.SecurityMappingHandler smh
SPI Default Security Mapping Handler.


securityProvider

protected org.apache.jetspeed.security.SecurityProvider securityProvider
The security provider.


ums

protected org.apache.jetspeed.security.UserManager ums
The user manager.


gms

protected org.apache.jetspeed.security.GroupManager gms
The group manager.


rms

protected org.apache.jetspeed.security.RoleManager rms
The role manager.


pms

protected org.apache.portals.graffito.services.core.ContentPermissionService pms
The permission manager.


loginContext

protected javax.security.auth.login.LoginContext loginContext

contextManager

protected org.apache.portals.graffito.context.CmsRequestContextManager contextManager
Constructor Detail

AbstractSecurityTestcase

public AbstractSecurityTestcase()

Default constructor.

Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class PersistenceSupportedTestCase
Throws:
java.lang.Exception
See Also:
TestCase.setUp()

tearDown

public void tearDown()
              throws java.lang.Exception
Overrides:
tearDown in class DatasourceEnabledSpringTestCase
Throws:
java.lang.Exception
See Also:
TestCase.tearDown()

initUser

protected void initUser()

Initialize user test object.


destroyUser

protected void destroyUser()
                    throws java.lang.Exception
Detroy the user test object

Throws:
java.lang.Exception - when it is not possible to remove the user

getConfigurations

protected java.lang.String[] getConfigurations()
Overrides:
getConfigurations in class DatasourceEnabledSpringTestCase

getPrincipals

protected java.util.Collection getPrincipals(javax.security.auth.Subject subject,
                                             java.lang.Class claz)
Returns subject's principals of type claz

Parameters:
subject -
claz -
Returns:
Returns subject's principals of type claz


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.