User: stark
Date: 01/03/05 02:11:05
Added: src/main/org/jboss/test/security/interfaces Entity.java
EntityHome.java IProjRepository.java
IProjRepositoryAdmin.java ProjRepository.java
ProjRepositoryAdmin.java
ProjRepositoryAdminHome.java
ProjRepositoryHome.java StatelessSession.java
StatelessSessionHome.java
Log:
Tests of the JBossSX security framework
Revision Changes Path
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/Entity.java
Index: Entity.java
===================================================================
package org.jboss.test.security.interfaces;
import javax.ejb.*;
import java.rmi.*;
/**
@author [EMAIL PROTECTED]
@version $Revision: 1.1 $
*/
public interface Entity extends EJBObject
{
/** A method used to test Principal propagation. It
returns the name of the value obtained from
getCallerPrincipal().
*/
public String echo(String arg) throws RemoteException;
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/EntityHome.java
Index: EntityHome.java
===================================================================
package org.jboss.test.security.interfaces;
import javax.ejb.*;
import java.rmi.*;
public interface EntityHome extends EJBHome
{
public Entity findByPrimaryKey(String key) throws RemoteException,
FinderException;
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/IProjRepository.java
Index: IProjRepository.java
===================================================================
/*
* JBoss, the OpenSource EJB server
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.test.security.interfaces;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import java.rmi.RemoteException;
/** The business interface for the ProjRepository bean.
@see ProjRepository
@author [EMAIL PROTECTED]
@version $Revision: 1.1 $
* @stereotype business-interface
*/
public interface IProjRepository
{
public void createFolder(Name folderPath) throws NamingException,
RemoteException;
public void deleteFolder(Name folderPath, boolean recursive) throws
NamingException, RemoteException;
public void createItem(Name itemPath, Attributes attributes) throws
NamingException, RemoteException;
public void updateItem(Name itemPath, Attributes attributes) throws
NamingException, RemoteException;
public void deleteItem(Name itemPath) throws NamingException, RemoteException;
public Attributes getItem(Name itemPath) throws NamingException, RemoteException;
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/IProjRepositoryAdmin.java
Index: IProjRepositoryAdmin.java
===================================================================
/*
* JBoss, the OpenSource EJB server
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.test.security.interfaces;
import java.rmi.RemoteException;
import java.security.Principal;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
/** The project admin interface.
@see ProjRepositoryAdmin
@author [EMAIL PROTECTED]
@version $Revision: 1.1 $
*/
public interface IProjRepositoryAdmin
{
public void createProject(Name projectName) throws NamingException,
RemoteException;
public void closeProject(Name projectName) throws NamingException,
RemoteException;
public Principal createUser(String userID) throws RemoteException;
public void createProjectUser(Name projectName, Principal userID) throws
RemoteException;
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/ProjRepository.java
Index: ProjRepository.java
===================================================================
/*
* JBoss, the OpenSource EJB server
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.test.security.interfaces;
import javax.ejb.EJBObject;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import java.rmi.RemoteException;
/** A stateful session bean for accessing a hypothetical project information
repository. The information repository is similary to a JNDI store in
that items are accessed via a Name and the information is represented as
Attributes.
It is used to test non-declarative security.
@see javax.naming.Name
@see javax.naming.directory.Attributes
@author [EMAIL PROTECTED]
@version $Revision: 1.1 $
*/
public interface ProjRepository extends EJBObject, IProjRepository
{
// All methods come from the IProjRepository interface
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/ProjRepositoryAdmin.java
Index: ProjRepositoryAdmin.java
===================================================================
/*
* JBoss, the OpenSource EJB server
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.test.security.interfaces;
import javax.ejb.EJBObject;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import java.rmi.RemoteException;
/** A stateless session bean for administiring projects.
It is used to test non-declarative security.
@see javax.naming.Name
@see javax.naming.directory.Attributes
@author [EMAIL PROTECTED]
@version $Revision: 1.1 $
*/
public interface ProjRepositoryAdmin extends EJBObject, IProjRepositoryAdmin
{
// All methods come from the IProjRepositoryAdmin interface
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/ProjRepositoryAdminHome.java
Index: ProjRepositoryAdminHome.java
===================================================================
/*
* JBoss, the OpenSource EJB server
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.test.security.interfaces;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
import javax.naming.Name;
import java.rmi.RemoteException;
/** The home interface for the ProjRepositoryAdmin stateless session bean.
@author [EMAIL PROTECTED]
@version $Revision: 1.1 $
*/
public interface ProjRepositoryAdminHome extends EJBHome
{
public void create() throws RemoteException, CreateException;
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/ProjRepositoryHome.java
Index: ProjRepositoryHome.java
===================================================================
/*
* JBoss, the OpenSource EJB server
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.test.security.interfaces;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
import javax.naming.Name;
import java.rmi.RemoteException;
/** A stateful session bean for accessing a hypothetical project information
repository. The information repository is similary to a JNDI store in
that items are accessed via a Name and the information is represented as
Attributes.
It is used to test non-declarative security.
@see javax.naming.Name
@see javax.naming.directory.Attributes
@author [EMAIL PROTECTED]
@version $Revision: 1.1 $
*/
public interface ProjRepositoryHome extends EJBHome
{
public ProjRepository create(Name projectName) throws CreateException,
RemoteException;
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/StatelessSession.java
Index: StatelessSession.java
===================================================================
package org.jboss.test.security.interfaces;
import javax.ejb.*;
import java.rmi.*;
public interface StatelessSession extends EJBObject
{
/** A method that returns its arg */
public String echo(String arg) throws RemoteException;
/** A method that does nothing but is not assiged a
method-permission in the ejb-jar.xml descriptor
*/
public void noop() throws RemoteException;
/** A method that throws a NullPointerException */
public void npeError() throws RemoteException;
}
1.1
jbosstest/src/main/org/jboss/test/security/interfaces/StatelessSessionHome.java
Index: StatelessSessionHome.java
===================================================================
package org.jboss.test.security.interfaces;
import javax.ejb.*;
import java.rmi.*;
public interface StatelessSessionHome extends EJBHome
{
public StatelessSession create() throws RemoteException, CreateException;
}