1 17 package org.apache.servicemix.jbi.deployment; 18 19 22 public class Component { 23 private String type; 24 private String componentClassLoaderDelegation = "parent-first"; 25 private String bootstrapClassLoaderDelegation = "parent-first"; 26 private Identification identification; 27 private String componentClassName; 28 private String description; 29 private ClassPath componentClassPath; 30 private String bootstrapClassName; 31 private ClassPath bootstrapClassPath; 32 private SharedLibraryList[] sharedLibraries; 33 private InstallationDescriptorExtension descriptorExtension; 34 35 public boolean isServiceEngine() { 36 return type != null && type.equals("service-engine"); 37 } 38 39 public boolean isBindingComponent() { 40 return type != null && type.equals("binding-component"); 41 } 42 43 public boolean isComponentClassLoaderDelegationParentFirst() { 44 return isParentFirst(componentClassLoaderDelegation); 45 } 46 47 public boolean isComponentClassLoaderDelegationSelfFirst() { 48 return isSelfFirst(componentClassLoaderDelegation); 49 } 50 51 public boolean isBootstrapClassLoaderDelegationParentFirst() { 52 return isParentFirst(bootstrapClassLoaderDelegation); 53 } 54 55 public boolean isBootstrapClassLoaderDelegationSelfFirst() { 56 return isSelfFirst(bootstrapClassLoaderDelegation); 57 } 58 59 60 public String getType() { 63 return type; 64 } 65 66 public void setType(String type) { 67 this.type = type; 68 } 69 70 public String getComponentClassLoaderDelegation() { 71 return componentClassLoaderDelegation; 72 } 73 74 public void setComponentClassLoaderDelegation(String componentClassLoaderDelegation) { 75 this.componentClassLoaderDelegation = componentClassLoaderDelegation; 76 } 77 78 public String getBootstrapClassLoaderDelegation() { 79 return bootstrapClassLoaderDelegation; 80 } 81 82 public void setBootstrapClassLoaderDelegation(String bootstrapClassLoaderDelegation) { 83 this.bootstrapClassLoaderDelegation = bootstrapClassLoaderDelegation; 84 } 85 86 public Identification getIdentification() { 87 return identification; 88 } 89 90 public void setIdentification(Identification identification) { 91 this.identification = identification; 92 } 93 94 public String getComponentClassName() { 95 return componentClassName; 96 } 97 98 public void setComponentClassName(String componentClassName) { 99 this.componentClassName = componentClassName; 100 } 101 102 public String getDescription() { 103 return description; 104 } 105 106 public void setDescription(String description) { 107 this.description = description; 108 } 109 110 public ClassPath getComponentClassPath() { 111 return componentClassPath; 112 } 113 114 public void setComponentClassPath(ClassPath componentClassPath) { 115 this.componentClassPath = componentClassPath; 116 } 117 118 public String getBootstrapClassName() { 119 return bootstrapClassName; 120 } 121 122 public void setBootstrapClassName(String bootstrapClassName) { 123 this.bootstrapClassName = bootstrapClassName; 124 } 125 126 public ClassPath getBootstrapClassPath() { 127 return bootstrapClassPath; 128 } 129 130 public void setBootstrapClassPath(ClassPath bootstrapClassPath) { 131 this.bootstrapClassPath = bootstrapClassPath; 132 } 133 134 public SharedLibraryList[] getSharedLibraries() { 135 return sharedLibraries; 136 } 137 138 public void setSharedLibraries(SharedLibraryList[] sharedLibraries) { 139 this.sharedLibraries = sharedLibraries; 140 } 141 142 public InstallationDescriptorExtension getDescriptorExtension() { 143 return descriptorExtension; 144 } 145 146 public void setDescriptorExtension(InstallationDescriptorExtension descriptorExtension) { 147 this.descriptorExtension = descriptorExtension; 148 } 149 150 protected boolean isParentFirst(String text) { 153 return text != null && text.equalsIgnoreCase("parent-first"); 154 } 155 156 protected boolean isSelfFirst(String text) { 157 return text != null && text.equalsIgnoreCase("self-first"); 158 } 159 160 161 } 162 | Popular Tags |