1 23 24 package com.sun.enterprise.deployment; 25 26 import java.util.logging.*; 27 import com.sun.logging.*; 28 29 import java.util.Map ; 30 import java.util.HashMap ; 31 import java.util.HashSet ; 32 import java.util.Set ; 33 import java.util.List ; 34 import java.util.LinkedList ; 35 36 import com.sun.enterprise.util.LocalStringManagerImpl; 37 import com.sun.enterprise.deployment.util.LogDomains; 38 39 40 43 public class InterceptorBindingDescriptor extends Descriptor 44 { 45 private static LocalStringManagerImpl localStrings = 46 new LocalStringManagerImpl(InterceptorBindingDescriptor.class); 47 48 static Logger _logger = LogDomains.getLogger(LogDomains.DPL_LOGGER); 49 50 public enum BindingType { 51 52 DEFAULT, 53 CLASS, 54 METHOD 55 56 } 57 58 private String ejbName; 60 61 private MethodDescriptor businessMethod; 63 64 private LinkedList <String > interceptors = new LinkedList <String >(); 66 67 private boolean isTotalOrdering; 69 70 private boolean excludeDefaultInterceptors; 72 73 private boolean excludeClassInterceptors; 75 76 private boolean needsOverloadResolution; 77 78 public InterceptorBindingDescriptor() { 79 } 80 81 public BindingType getBindingType() { 82 if( ejbName.equals("*") ) { 83 return BindingType.DEFAULT; 84 } else if( businessMethod == null ) { 85 return BindingType.CLASS; 86 } else { 87 return BindingType.METHOD; 88 } 89 } 90 91 public void setNeedsOverloadResolution(boolean flag) { 92 needsOverloadResolution = flag; 93 } 94 95 public boolean getNeedsOverloadResolution() { 96 return needsOverloadResolution; 97 } 98 99 public void setEjbName(String ejb) { 100 ejbName = ejb; 101 } 102 103 public String getEjbName() { 104 return ejbName; 105 } 106 107 public void setBusinessMethod(MethodDescriptor desc) { 108 businessMethod = desc; 109 } 110 111 public MethodDescriptor getBusinessMethod() { 112 return businessMethod; 113 } 114 115 public void appendInterceptorClass(String interceptor) { 116 interceptors.addLast(interceptor); 117 } 118 119 public List <String > getInterceptorClasses() { 120 return new LinkedList <String >(interceptors); 121 } 122 123 public void setIsTotalOrdering(boolean flag) { 124 isTotalOrdering = flag; 125 } 126 127 public boolean getIsTotalOrdering() { 128 return isTotalOrdering; 129 } 130 131 public void setExcludeDefaultInterceptors(boolean flag) { 132 excludeDefaultInterceptors = flag; 133 } 134 135 public boolean getExcludeDefaultInterceptors() { 136 return excludeDefaultInterceptors; 137 } 138 139 public void setExcludeClassInterceptors(boolean flag) { 140 excludeClassInterceptors = flag; 141 } 142 143 public boolean getExcludeClassInterceptors() { 144 return excludeClassInterceptors; 145 } 146 147 } 148 | Popular Tags |