maguro 2005/01/12 16:11:43
Added: modules/itests/src/java/org/openejb/test/security/sfsb
BasicStateful.java BasicStatefulBean.java
BasicStatefulHome.java LocalBasicStateful.java
LocalBasicStatefulHome.java
Log:
Updated slsb and added sfsb.
Revision Changes Path
1.1
openejb/modules/itests/src/java/org/openejb/test/security/sfsb/BasicStateful.java
Index: BasicStateful.java
===================================================================
/**
*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openejb.test.security.sfsb;
import java.rmi.RemoteException;
import javax.ejb.EJBObject;
/**
* @version $Revision: 1.1 $ $Date: 2005/01/12 21:11:43 $
*/
public interface BasicStateful extends EJBObject {
public String noAccessMethod(String argument1) throws RemoteException;
public String noAccessMethod(String argument1, String argument2) throws
RemoteException;
public String highSecurityMethod(String argument1) throws RemoteException;
public String highSecurityMethod(String argument1, String argument2)
throws RemoteException;
public String mediumSecurityMethod(String argument1) throws
RemoteException;
public String mediumSecurityMethod(String argument1, String argument2)
throws RemoteException;
public String lowSecurityMethod(String argument1) throws RemoteException;
public String lowSecurityMethod(String argument1, String argument2)
throws RemoteException;
public String allAccessMethod(String argument1) throws RemoteException;
public String allAccessMethod(String argument1, String argument2) throws
RemoteException;
public String unassignedMethod(String argument1) throws RemoteException;
public String unassignedMethod(String argument1, String argument2) throws
RemoteException;
public boolean isInRole(String roleName) throws RemoteException;
}
1.1
openejb/modules/itests/src/java/org/openejb/test/security/sfsb/BasicStatefulBean.java
Index: BasicStatefulBean.java
===================================================================
/**
*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openejb.test.security.sfsb;
import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
/**
* @version $Revision: 1.1 $ $Date: 2005/01/12 21:11:43 $
*/
public class BasicStatefulBean implements SessionBean {
private String name;
private SessionContext sessionContext;
public String noAccessMethod(String argument1) throws RemoteException {
return name + argument1;
}
public String noAccessMethod(String argument1, String argument2) throws
RemoteException {
return name + argument1 + argument2;
}
public String highSecurityMethod(String argument1) throws RemoteException
{
return name + argument1;
}
public String highSecurityMethod(String argument1, String argument2)
throws RemoteException {
return name + argument1 + argument2;
}
public String mediumSecurityMethod(String argument1) throws
RemoteException {
return name + argument1;
}
public String mediumSecurityMethod(String argument1, String argument2)
throws RemoteException {
return name + argument1 + argument2;
}
public String lowSecurityMethod(String argument1) throws RemoteException {
return name + argument1;
}
public String lowSecurityMethod(String argument1, String argument2)
throws RemoteException {
return name + argument1 + argument2;
}
public String allAccessMethod(String argument1) throws RemoteException {
return name + argument1;
}
public String allAccessMethod(String argument1, String argument2) throws
RemoteException {
return name + argument1 + argument2;
}
public String unassignedMethod(String argument1) throws RemoteException {
return name + argument1;
}
public String unassignedMethod(String argument1, String argument2) throws
RemoteException {
return name + argument1 + argument2;
}
public boolean isInRole(String roleName) throws RemoteException {
return sessionContext.isCallerInRole(roleName);
}
public void ejbCreate(String name) {
this.name = name;
}
public void ejbActivate() throws EJBException, RemoteException {
}
public void ejbPassivate() throws EJBException, RemoteException {
}
public void ejbRemove() throws EJBException, RemoteException {
}
public void setSessionContext(SessionContext sessionContext) throws
EJBException, RemoteException {
this.sessionContext = sessionContext;
}
}
1.1
openejb/modules/itests/src/java/org/openejb/test/security/sfsb/BasicStatefulHome.java
Index: BasicStatefulHome.java
===================================================================
/**
*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openejb.test.security.sfsb;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
/**
* @version $Revision: 1.1 $ $Date: 2005/01/12 21:11:43 $
*/
public interface BasicStatefulHome extends EJBHome {
BasicStateful create(String name) throws RemoteException, CreateException;
}
1.1
openejb/modules/itests/src/java/org/openejb/test/security/sfsb/LocalBasicStateful.java
Index: LocalBasicStateful.java
===================================================================
/**
*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openejb.test.security.sfsb;
import javax.ejb.EJBLocalObject;
/**
* @version $Revision: 1.1 $ $Date: 2005/01/12 21:11:43 $
*/
public interface LocalBasicStateful extends EJBLocalObject {
public String noAccessMethod(String argument1);
public String noAccessMethod(String argument1, String argument2);
public String highSecurityMethod(String argument1);
public String highSecurityMethod(String argument1, String argument2);
public String mediumSecurityMethod(String argument1);
public String mediumSecurityMethod(String argument1, String argument2);
public String lowSecurityMethod(String argument1);
public String lowSecurityMethod(String argument1, String argument2);
public String allAccessMethod(String argument1);
public String allAccessMethod(String argument1, String argument2);
public String unassignedMethod(String argument1);
public String unassignedMethod(String argument1, String argument2);
public boolean isInRole(String roleName);
}
1.1
openejb/modules/itests/src/java/org/openejb/test/security/sfsb/LocalBasicStatefulHome.java
Index: LocalBasicStatefulHome.java
===================================================================
/**
*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openejb.test.security.sfsb;
import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
/**
* @version $Revision: 1.1 $ $Date: 2005/01/12 21:11:43 $
*/
public interface LocalBasicStatefulHome extends EJBLocalHome {
LocalBasicStateful create() throws CreateException;
}