@Override protected Object initAndInject(String className, List<? extends ConfigProperty> configs, ClassLoader cl) throws DeployException { try { Class clz = Class.forName(className, true, cl); Object o = clz.newInstance(); if (configs != null) { Injection injector = new Injection(); for (ConfigProperty cpmd : configs) { if (cpmd.isValueSet()) { if (XsdString.isNull(cpmd.getConfigPropertyType())) { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue()); } else { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue(), cpmd.getConfigPropertyType().getValue()); } } } } return o; } catch (Throwable t) { throw ConnectorLogger.ROOT_LOGGER.deploymentFailed(t, className); } }
if (cdMetas.size() > 0) { for (org.jboss.jca.common.api.metadata.spec.ConnectionDefinition cdMeta : cdMetas) { raMcfClasses.add(cdMeta.getManagedConnectionFactoryClass().getValue()); if (aoMetas.size() > 0) { for (org.jboss.jca.common.api.metadata.spec.AdminObject aoMeta : aoMetas) { raAoClasses.add(aoMeta.getAdminobjectClass().getValue());
/** * Constructor * @param messagelistenerType full qualified name of the java type * @param activationspec The activationspecType specifies an activation * specification. The information includes fully qualified * Java class name of an activation specification and a set of * required configuration property names. * @param id XML ID */ public MessageListenerImpl(XsdString messagelistenerType, Activationspec activationspec, String id) { this.messagelistenerType = messagelistenerType; if (!XsdString.isNull(this.messagelistenerType)) this.messagelistenerType.setTag(XML.MessageListenerTag.MESSAGELISTENER_TYPE.toString()); this.activationspec = activationspec; this.id = id; }
for (ConfigProperty c : original) if (ijProperties != null && ijProperties.containsKey(c.getConfigPropertyName().getValue())) XsdString newValue = new XsdString(ijProperties.get(c.getConfigPropertyName().getValue()), c .getConfigPropertyValue().getId(), c.getConfigPropertyValue().getTag()); ConfigProperty newProp = new ConfigPropertyImpl(c.getDescriptions(), c.getConfigPropertyName(), c.getConfigPropertyType(), newValue,
private static XsdString str(String str) { return new XsdString(str, null); }
/** * Convenient method to test if an {@link XsdString} is null NULLXsdString instance * @param xsdString the xsdString to test * @return ture if passes xsdString is null or equals to NULLXsdString instance */ public static boolean isNull(XsdString xsdString) { return (xsdString == null || xsdString.equals(NULL_XSDSTRING)); } }
/** * {@inheritDoc} */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("<required-config-property"); if (id != null) sb.append(" id=\"").append(id).append("\""); sb.append(">"); for (LocalizedXsdString d: description) sb.append(d); if (!XsdString.isNull(configPropertyName)) sb.append(configPropertyName); sb.append("</required-config-property>"); return sb.toString(); } }
/** * {@inheritDoc} */ public CopyableMetaData copy() { XsdString newResourceadapterVersion = CopyUtil.clone(this.resourceadapterVersion); XsdString newEisType = XsdString.isNull(this.eisType) ? null : (XsdString) this.eisType.copy(); List<XsdString> newRequiredWorkContexts = CopyUtil.cloneList(this.requiredWorkContexts); XsdString newModuleName = CopyUtil.clone(this.moduleName); List<Icon> newIcons = CopyUtil.cloneList(this.icon); boolean newMetadataComplete = this.metadataComplete; LicenseType newLicense = CopyUtil.clone(this.license); List<LocalizedXsdString> newDescriptions = CopyUtil.cloneList(this.description); List<LocalizedXsdString> newDisplayNames = CopyUtil.cloneList(this.displayName); XsdString newVendorName = CopyUtil.clone(this.vendorName); ResourceAdapter newResourceadapter = CopyUtil.clone((ResourceAdapter) this.resourceadapter); return new ConnectorImpl(version, newModuleName, newVendorName, newEisType, newResourceadapterVersion, newLicense, newResourceadapter, newRequiredWorkContexts, newMetadataComplete, newDescriptions, newDisplayNames, newIcons, CopyUtil.cloneString(id)); }
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((lang == null) ? 0 : lang.hashCode()); return result; }
/** * Constructor * @param smallIcon . * @param largeIcon . * @param lang . * @param id . */ public IconImpl(XsdString smallIcon, XsdString largeIcon, String lang, String id) { this.smallIcon = smallIcon; if (!XsdString.isNull(this.smallIcon)) this.smallIcon.setTag(XML.IconTag.SMALL_ICON.toString()); this.largeIcon = largeIcon; if (!XsdString.isNull(this.largeIcon)) this.largeIcon.setTag(XML.IconTag.LARGE_ICON.toString()); this.lang = lang; this.id = id; }
private static XsdString str(String str) { return new XsdString(str, null); }
if (!super.equals(obj))
if (!XsdString.isNull(configPropertyValue)) sb.append(configPropertyValue);
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((adminobjectClass == null) ? 0 : adminobjectClass.hashCode()); result = prime * result + ((adminobjectInterface == null) ? 0 : adminobjectInterface.hashCode()); result = prime * result + ((configProperties == null) ? 0 : configProperties.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; }
@Override public Object initAndInject(String className, List<? extends ConfigProperty> configs, ClassLoader cl) throws DeployException { try { Class clz = Class.forName(className, true, cl); Object o = clz.newInstance(); if (configs != null) { Injection injector = new Injection(); for (ConfigProperty cpmd : configs) { if (cpmd.isValueSet()) { if (XsdString.isNull(cpmd.getConfigPropertyType())) { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue()); } else { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue(), cpmd.getConfigPropertyType().getValue()); } } } } return o; } catch (Throwable t) { throw ConnectorLogger.ROOT_LOGGER.deploymentFailed(t, className); } }