Author: dblevins
Date: Fri Jun 25 01:36:11 2010
New Revision: 957778

URL: http://svn.apache.org/viewvc?rev=957778&view=rev
Log:
Pruned unused code from CoreDeploymentInfo and DeploymentInfo

Modified:
    
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/DeploymentInfo.java
    
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java
    
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java
    
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreDeploymentInfo.java

Modified: 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/DeploymentInfo.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/DeploymentInfo.java?rev=957778&r1=957777&r2=957778&view=diff
==============================================================================
--- 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/DeploymentInfo.java
 (original)
+++ 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/DeploymentInfo.java
 Fri Jun 25 01:36:11 2010
@@ -47,10 +47,6 @@ public interface DeploymentInfo {
 
     public TransactionType getTransactionType(Method method);
 
-    public Collection<String> getAuthorizedRoles(Method method);
-
-    public String [] getAuthorizedRoles(String action);
-
     public Container getContainer();
 
     public Object getDeploymentID();
@@ -61,8 +57,6 @@ public interface DeploymentInfo {
 
     public String getRunAs();
 
-    public String getSecurityRole(String securityRoleReference);
-
     public boolean isBeanManagedTransaction();
 
     public Class getHomeInterface();
@@ -105,16 +99,6 @@ public interface DeploymentInfo {
 
     public ClassLoader getClassLoader();
 
-    public List<Method> getAroundInvoke();
-
-    public List<Method> getPostConstruct();
-
-    public List<Method> getPreDestroy();
-
-    public List<Method> getPostActivate();
-
-    public List<Method> getPrePassivate();
-
     public List<Method> getRemoveMethods();
 
     public List<Injection> getInjections();

Modified: 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java?rev=957778&r1=957777&r2=957778&view=diff
==============================================================================
--- 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java
 (original)
+++ 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java
 Fri Jun 25 01:36:11 2010
@@ -55,7 +55,6 @@ public class EjbJarBuilder {
 
                 interceptorBindingBuilder.build(deployment, ejbInfo);
 
-                deployment.setJarPath(ejbJar.jarPath);
                 deployments.put(ejbInfo.ejbDeploymentId, deployment);
 
                 // TODO: replace with get() on application context or parent

Modified: 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java?rev=957778&r1=957777&r2=957778&view=diff
==============================================================================
--- 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java
 (original)
+++ 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java
 Fri Jun 25 01:36:11 2010
@@ -143,20 +143,6 @@ class EnterpriseBeanBuilder {
 
         deployment.setRunAs(bean.runAs);
 
-        for (SecurityRoleReferenceInfo roleReferenceInfo : 
bean.securityRoleReferences) {
-            String alias = roleReferenceInfo.roleName;
-            String actualName = roleReferenceInfo.roleLink;
-
-            // EJB 3.0 - 17.2.5.3
-            // In the absence of this linking step, any security role name as 
used in the code will be assumed to
-            // correspond to a security role of the same name.
-            if (actualName == null){
-                actualName = alias;
-            }
-
-            deployment.addSecurityRoleReference(alias, actualName);
-        }
-
         deployment.getInjections().addAll(injections);
 
         // ejbTimeout
@@ -247,18 +233,6 @@ class EnterpriseBeanBuilder {
                 deployment.setAbstractSchemaName(entity.abstractSchemaName);
 
                 for (QueryInfo query : entity.queries) {
-                    List<Method> finderMethods = new ArrayList<Method>();
-
-                    if (home != null) {
-                        finderMethods.addAll(matchingMethods(query.method, 
home));
-                    }
-                    if (localhome != null) {
-                        finderMethods.addAll(matchingMethods(query.method, 
localhome));
-                    }
-
-                    for (Method method : finderMethods) {
-                        deployment.addQuery(method, query.queryStatement);
-                    }
 
                     if (query.remoteResultType) {
                         StringBuilder methodSignature = new StringBuilder();
@@ -277,7 +251,6 @@ class EnterpriseBeanBuilder {
                     }
 
                 }
-                deployment.setCmrFields(entity.cmpFieldNames.toArray(new 
String[]{}));
 
                 if (entity.primKeyField != null) {
                     deployment.setPrimaryKeyField(entity.primKeyField);

Modified: 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreDeploymentInfo.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreDeploymentInfo.java?rev=957778&r1=957777&r2=957778&view=diff
==============================================================================
--- 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreDeploymentInfo.java
 (original)
+++ 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreDeploymentInfo.java
 Fri Jun 25 01:36:11 2010
@@ -18,7 +18,6 @@ package org.apache.openejb.core;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -74,18 +73,6 @@ public class CoreDeploymentInfo implemen
     private Class mdbInterface;
     private Class serviceEndpointInterface;
 
-    private final List<Method> aroundInvoke = new ArrayList<Method>();
-
-    private final List<Method> postConstruct = new ArrayList<Method>();
-    private final List<Method> preDestroy = new ArrayList<Method>();
-
-    private final List<Method> postActivate = new ArrayList<Method>();
-    private final List<Method> prePassivate = new ArrayList<Method>();
-
-    private final List<Method> afterBegin = new ArrayList<Method>();
-    private final List<Method> beforeCompletion= new ArrayList<Method>();
-    private final List<Method> afterCompletion = new ArrayList<Method>();
-
     private final List<Method> removeMethods = new ArrayList<Method>();
 
     private final Set<String> dependsOn = new LinkedHashSet<String>();
@@ -101,8 +88,6 @@ public class CoreDeploymentInfo implemen
     private EJBLocalHome ejbLocalHomeRef;
     private String destinationId;
 
-    private String jarPath;
-    
     private String ejbName;
     private String runAs;
 
@@ -113,7 +98,6 @@ public class CoreDeploymentInfo implemen
     private final BeanType componentType;
 
     private final Map<Method, Method> postCreateMethodMap = new 
HashMap<Method, Method>();
-    private final Map<Method, Collection<String>> methodPermissions = new 
HashMap<Method, Collection<String>>();
     private final Map<Method, TransactionType> methodTransactionType = new 
HashMap<Method, TransactionType>();
     private final Map<Method, Method> methodMap = new HashMap<Method, 
Method>();
     private final Map<Method, MethodContext> methodContextMap = new 
HashMap<Method, MethodContext>();
@@ -126,7 +110,6 @@ public class CoreDeploymentInfo implemen
     private final List<InterceptorData> callbackInterceptors = new 
ArrayList<InterceptorData>();
     private final Set<InterceptorData> instanceScopedInterceptors = new 
HashSet<InterceptorData>();
     private final List<InterceptorInstance> systemInterceptors = new 
ArrayList<InterceptorInstance>();
-    private final Map<String, String> securityRoleReferenceMap = new 
HashMap<String, String>();
     private final Map<String, String> activationProperties = new 
HashMap<String, String>();
     private final List<Injection> injections = new ArrayList<Injection>();
     private final Map<Class, InterfaceType> interfaces = new HashMap<Class, 
InterfaceType>();
@@ -412,24 +395,6 @@ public class CoreDeploymentInfo implemen
         this.transactionPolicyFactory = transactionPolicyFactory;
     }
 
-    /**
-     * TODO: Remove unused
-     */
-    public Collection<String> getAuthorizedRoles(Method method) {
-        Collection<String> roleSet = methodPermissions.get(method);
-        if (roleSet == null) {
-            return Collections.emptySet();
-        }
-        return roleSet;
-    }
-
-    /**
-     * TODO: Remove unused
-     */
-    public String [] getAuthorizedRoles(String action) {
-        return null;
-    }
-
     public Container getContainer() {
         return container;
     }
@@ -494,11 +459,6 @@ public class CoreDeploymentInfo implemen
         return activationProperties;
     }
 
-    public void setActivationProperties(Map<String, String> 
activationProperties) {
-        this.activationProperties.clear();
-        this.activationProperties.putAll(activationProperties);
-    }
-
     public Class getPrimaryKeyClass() {
         return pkClass;
     }
@@ -607,31 +567,6 @@ public class CoreDeploymentInfo implemen
         return (method == null) ? interfaceMethod : method;
     }
 
-    /**
-     * TODO: Remove unused
-     */
-    public void appendMethodPermissions(Method m, List<String> roleNames) {
-        Collection<String> hs = methodPermissions.get(m);
-        if (hs == null) {
-            hs = new HashSet<String>();// FIXME: Set appropriate load and 
intial capacity
-            methodPermissions.put(m, hs);
-        }
-        for (String roleName : roleNames) {
-            hs.add(roleName);
-        }
-    }
-
-    /**
-     * TODO: Remove unused
-     */
-    public String getSecurityRole(String securityRoleReference) {
-        return securityRoleReferenceMap.get(securityRoleReference);
-    }
-
-    public void addSecurityRoleReference(String securityRoleReference, String 
linkedRoleName) {
-        securityRoleReferenceMap.put(securityRoleReference, linkedRoleName);
-    }
-
     public MethodContext getMethodContext(Method method) {
         MethodContext methodContext = methodContextMap.get(method);
         if (methodContext == null) {
@@ -692,67 +627,11 @@ public class CoreDeploymentInfo implemen
         methodTransactionType.put(method, transactionType);
     }
 
-    /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getAroundInvoke() {
-        return aroundInvoke;
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getPostConstruct() {
-        return postConstruct;
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getPreDestroy() {
-        return preDestroy;
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getPostActivate() {
-        return postActivate;
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getPrePassivate() {
-        return prePassivate;
-    }
-
     public List<Method> getRemoveMethods() {
         return removeMethods;
     }
 
     /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getAfterBegin() {
-        return afterBegin;
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getBeforeCompletion() {
-        return beforeCompletion;
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public List<Method> getAfterCompletion() {
-        return afterCompletion;
-    }
-
-    /**
      * TODO: Move to MethodContext
      */
     private final Map<Method, Boolean> removeExceptionPolicy = new 
HashMap<Method,Boolean>();
@@ -1020,16 +899,6 @@ public class CoreDeploymentInfo implemen
         }
     }
 
-    protected String extractHomeBeanMethodName(String methodName) {
-        if (methodName.equals("create")) {
-            return "ejbCreate";
-        } else if (methodName.startsWith("find")) {
-            return "ejbF" + methodName.substring(1);
-        } else {
-            return "ejbH" + methodName.substring(1);
-        }
-    }
-
     public Method getCreateMethod() {
         return createMethod;
     }
@@ -1045,11 +914,9 @@ public class CoreDeploymentInfo implemen
     private boolean cmp2;
     private KeyGenerator keyGenerator;
     private String primaryKeyField;
-    private String[] cmrFields;
     private Class cmpImplClass;
     private String abstractSchemaName;
 
-    private Map<Method, String> queryMethodMap = new HashMap<Method, String>();
     private Set<String> remoteQueryResults = new TreeSet<String>();
 
     public boolean isCmp2() {
@@ -1068,17 +935,6 @@ public class CoreDeploymentInfo implemen
         this.primaryKeyField = primaryKeyField;
     }
 
-    /**
-     * TODO: Remove, not used
-     */
-    public String [] getCmrFields() {
-        return cmrFields;
-    }
-
-    public void setCmrFields(String [] cmrFields) {
-        this.cmrFields = cmrFields;
-    }
-
     public KeyGenerator getKeyGenerator() {
         return keyGenerator;
     }
@@ -1087,17 +943,6 @@ public class CoreDeploymentInfo implemen
         this.keyGenerator = keyGenerator;
     }
 
-    public void addQuery(Method queryMethod, String queryString) {
-        queryMethodMap.put(queryMethod, queryString);
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public String getQuery(Method queryMethod) {
-        return queryMethodMap.get(queryMethod);
-    }
-
     public void setRemoteQueryResults(String methodSignature) {
         remoteQueryResults.add(methodSignature);
     }
@@ -1122,17 +967,6 @@ public class CoreDeploymentInfo implemen
         this.abstractSchemaName = abstractSchemaName;
     }
 
-    public void setJarPath(String jarPath) {
-        this.jarPath = jarPath;
-    }
-
-    /**
-     * TODO: Remove, not used
-     */
-    public String getJarPath() {
-        return jarPath;
-    }
-
     public Method getEjbTimeout() {
         return ejbTimeout;
     }
@@ -1173,11 +1007,6 @@ public class CoreDeploymentInfo implemen
         return "DeploymentInfo(id="+getDeploymentID()+")";
     }
 
-    public void setServiceEndpointInterface(Class serviceEndpointInterface) {
-        this.serviceEndpointInterface = serviceEndpointInterface;
-        mapObjectInterface(serviceEndpointInterface);
-    }
-
     public boolean isLoadOnStartup() {
         return loadOnStartup;
     }


Reply via email to