org.jboss.jca.common.api.metadata.spec.XsdString.isNull()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(13.3k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中org.jboss.jca.common.api.metadata.spec.XsdString.isNull()方法的一些代码示例,展示了XsdString.isNull()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XsdString.isNull()方法的具体详情如下:
包路径:org.jboss.jca.common.api.metadata.spec.XsdString
类名称:XsdString
方法名:isNull

XsdString.isNull介绍

[英]Convenient method to test if an XsdString is null NULLXsdString instance
[中]测试XsdString是否为null NULLXsdString实例的便捷方法

代码示例

代码示例来源:origin: wildfly/wildfly

@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);
  }
}

代码示例来源:origin: wildfly/wildfly

@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);
  }
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* {@inheritDoc}
*/
public String getResourceadapterClass()
{
 if (XsdString.isNull(resourceadapterClass))
   return null;
 return resourceadapterClass.getValue();
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* {@inheritDoc}
*/
public String getModuleName()
{
 if (XsdString.isNull(moduleName))
   return null;
 return moduleName.getValue();
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
  * {@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();
  }
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

if (!XsdString.isNull(this.activationspecClass))
  this.activationspecClass.setTag(XML.ActivationSpecTag.ACTIVATIONSPEC_CLASS.toString());
if (requiredConfigProperty != null)

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* 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;
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* @param adminobjectInterface full qualified name of the interface
* @param adminobjectClass full qualified name of the implementation class
* @param configProperty List of config propeties
* @param id xmlid
*/
public AdminObjectImpl(XsdString adminobjectInterface, XsdString adminobjectClass,
           List<ConfigProperty> configProperty, String id)
{
 this.adminobjectInterface = adminobjectInterface;
 if (!XsdString.isNull(this.adminobjectInterface))
   this.adminobjectInterface.setTag(XML.AdminObjectTag.ADMINOBJECT_INTERFACE.toString());
 this.adminobjectClass = adminobjectClass;
 if (!XsdString.isNull(this.adminobjectClass))
   this.adminobjectClass.setTag(XML.AdminObjectTag.ADMINOBJECT_CLASS.toString());
 if (configProperty != null)
 {
   this.configProperties = new ArrayList<ConfigProperty>(configProperty);
 }
 else
 {
   this.configProperties = new ArrayList<ConfigProperty>(0);
 }
 this.id = id;
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* 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;
}

代码示例来源:origin: org.jboss.ironjacamar/ironjacamar-common-api

/**
*
* Clone an IDDecoratedMetadata taking care of null cheks
*
* @param <T> type extending {@link CopyableMetaData}
* @param input type extending IdDecoratedMetadata
* @return cloned input
*
*/
@SuppressWarnings("unchecked")
public static <T extends CopyableMetaData> T clone(T input)
{
 if (input instanceof XsdString)
 {
   return XsdString.isNull((XsdString) input) ? (T) XsdString.NULL_XSDSTRING : (T) input.copy();
 }
 else
 {
   return input == null ? null : (T) input.copy();
 }
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* Constructor
* @param description descriptions
* @param securityPermissionSpec the security permission spec as defined in the xml
* @param id XML ID
*/
public SecurityPermissionImpl(List<LocalizedXsdString> description, XsdString securityPermissionSpec, String id)
{
 if (description != null)
 {
   this.description = new ArrayList<LocalizedXsdString>(description);
   for (LocalizedXsdString d: this.description)
    d.setTag(XML.SecurityPermissionTag.DESCRIPTION.toString());
 }
 else
 {
   this.description = new ArrayList<LocalizedXsdString>(0);
 }
 this.securityPermissionSpec = securityPermissionSpec;
 if (!XsdString.isNull(this.securityPermissionSpec))
   this.securityPermissionSpec.setTag(XML.SecurityPermissionTag.SECURITY_PERMISSION_SPEC.toString());
 this.id = id;
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* Constructor
* @param description descriptions of this property
* @param configPropertyName name of the property
* @param id XML ID
*/
public RequiredConfigPropertyImpl(List<LocalizedXsdString> description, XsdString configPropertyName, String id)
{
 if (description != null)
 {
   this.description = new ArrayList<LocalizedXsdString>(description);
   for (LocalizedXsdString d: this.description)
    d.setTag(XML.RequiredConfigPropertyTag.DESCRIPTION.toString());
 }
 else
 {
   this.description = new ArrayList<LocalizedXsdString>(0);
 }
 this.configPropertyName = configPropertyName;
 if (!XsdString.isNull(this.configPropertyName))
   this.configPropertyName.setTag(XML.RequiredConfigPropertyTag.CONFIG_PROPERTY_NAME.toString());
 this.id = id;
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* {@inheritDoc}
*/
public Connector merge(MergeableMetadata<?> inputMd) throws Exception
{
 if (inputMd instanceof ConnectorImpl)
 {
   ConnectorImpl input = (ConnectorImpl) inputMd;
   XsdString newResourceadapterVersion = XsdString.isNull(this.resourceadapterVersion)
      ? input.resourceadapterVersion
      : this.resourceadapterVersion;
   XsdString newEisType = XsdString.isNull(this.eisType) ? input.eisType : this.eisType;
   List<XsdString> newRequiredWorkContexts = MergeUtil.mergeList(this.requiredWorkContexts,
      input.requiredWorkContexts);
   XsdString newModuleName = this.moduleName == null ? input.moduleName : this.moduleName;
   List<Icon> newIcons = MergeUtil.mergeList(this.icon, input.icon);
   boolean newMetadataComplete = this.metadataComplete || input.metadataComplete;
   LicenseType newLicense = this.license == null ? input.license : this.license.merge(input.license);
   List<LocalizedXsdString> newDescriptions = MergeUtil.mergeList(this.description, input.description);
   List<LocalizedXsdString> newDisplayNames = MergeUtil.mergeList(this.displayName, input.displayName);
   XsdString newVendorName = XsdString.isNull(this.vendorName) ? input.vendorName : this.vendorName;;
   ResourceAdapter newResourceadapter = this.resourceadapter == null
      ? (ResourceAdapter) input.resourceadapter
      : ((ResourceAdapter) this.resourceadapter).merge((ResourceAdapter) input.resourceadapter);
   return new ConnectorImpl(version, newModuleName, newVendorName, newEisType, newResourceadapterVersion,
               newLicense, newResourceadapter, newRequiredWorkContexts, newMetadataComplete,
               newDescriptions, newDisplayNames, newIcons, null);
 }
 return this;
}

代码示例来源:origin: org.jboss.ironjacamar/ironjacamar-core-impl

/**
* Get the product name for the resource adapter
* @param id The MDR identifier
* @return The value
*/
private String getProductName(String id)
{
 if (id == null || id.equals(""))
   return "";
 try
 {
   Connector raXml = mdr.getResourceAdapter(id);
   if (raXml != null && !XsdString.isNull(raXml.getEisType()))
   {
    return raXml.getEisType().getValue();
   }
 }
 catch (Throwable t)
 {
   log.debugf(t, "Exception while loading ra.xml: %s", id);
 }
 return "";
}

代码示例来源:origin: org.jboss.ironjacamar/ironjacamar-core-impl

/**
* Get the product version for the resource adapter
* @param id The MDR identifier
* @return The value
*/
private String getProductVersion(String id)
{
 if (id == null || id.equals(""))
   return "";
 try
 {
   Connector raXml = mdr.getResourceAdapter(id);
   if (raXml != null)
   {
    if (!XsdString.isNull(raXml.getResourceadapterVersion()))
      return raXml.getResourceadapterVersion().getValue();
   }
 }
 catch (Throwable t)
 {
   log.debugf(t, "Exception while loading ra.xml: %s", id);
 }
 return "";
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* {@inheritDoc}
*/
public void validate() throws ValidateException
{
 boolean inboundOrOutbound = false;
 if (this.getOutboundResourceadapter() != null && this.getOutboundResourceadapter().validationAsBoolean())
   inboundOrOutbound = true;
 if (this.getInboundResourceadapter() != null && this.getInboundResourceadapter().validationAsBoolean()
    && this.getResourceadapterClass() != null)
   inboundOrOutbound = true;
 if (!inboundOrOutbound
    && (XsdString.isNull(this.resourceadapterClass) || this.resourceadapterClass.getValue().trim().equals("")))
   throw new ValidateException(bundle.invalidMetadataForResourceAdapter());
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

List<AdminObject> newAdminobjects = MergeUtil.mergeList(this.adminobjects, inputRA.adminobjects);
String newId = this.id == null ? inputRA.id : this.id;
XsdString newResourceadapterClass = XsdString.isNull(this.resourceadapterClass)
   ? inputRA.resourceadapterClass
   : this.resourceadapterClass;

代码示例来源:origin: org.jboss.eap/wildfly-connector

@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);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-connector

@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);
  }
}

代码示例来源:origin: org.jboss.ironjacamar.jdk8/ironjacamar-common-impl

/**
* {@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));
}

相关文章

微信公众号

最新文章

更多