当前位置: 首页>>代码示例>>Java>>正文


Java ValueEnforcer.notNull方法代码示例

本文整理汇总了Java中com.helger.commons.ValueEnforcer.notNull方法的典型用法代码示例。如果您正苦于以下问题:Java ValueEnforcer.notNull方法的具体用法?Java ValueEnforcer.notNull怎么用?Java ValueEnforcer.notNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.helger.commons.ValueEnforcer的用法示例。


在下文中一共展示了ValueEnforcer.notNull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addToMimeMultipart

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public void addToMimeMultipart (@Nonnull final MimeMultipart aMimeMultipart) throws MessagingException
{
  ValueEnforcer.notNull (aMimeMultipart, "MimeMultipart");

  final MimeBodyPart aMimeBodyPart = new MimeBodyPart ();

  aMimeBodyPart.setHeader (CHttpHeader.CONTENT_ID, getId ());
  // !IMPORTANT! DO NOT CHANGE the order of the adding a DH and then the last
  // headers
  // On some tests the datahandler did reset content-type and transfer
  // encoding, so this is now the correct order
  aMimeBodyPart.setDataHandler (new DataHandler (_getAsDataSource ()));

  // After DataHandler!!
  aMimeBodyPart.setHeader (CHttpHeader.CONTENT_TYPE, getMimeType ());
  aMimeBodyPart.setHeader (CHttpHeader.CONTENT_TRANSFER_ENCODING, getContentTransferEncoding ().getID ());

  aMimeMultipart.addBodyPart (aMimeBodyPart);
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:20,代码来源:WSS4JAttachment.java

示例2: CryptoProperties

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public CryptoProperties (@Nonnull final IReadableResource aRes)
{
  ValueEnforcer.notNull (aRes, "Resource");
  if (aRes.exists ())
    try
    {
      m_aProps = new NonBlockingProperties ();
      try (final InputStream aIS = aRes.getInputStream ())
      {
        m_aProps.load (aIS);
      }
    }
    catch (final Throwable t)
    {
      throw new InitializationException ("Failed to init CryptoProperties from resource " + aRes + "!", t);
    }
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:18,代码来源:CryptoProperties.java

示例3: PModeLegErrorHandling

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public PModeLegErrorHandling (@Nullable final PModeAddressList aReportSenderErrorsTo,
                              @Nullable final PModeAddressList aReportReceiverErrorsTo,
                              @Nonnull final ETriState eReportAsResponse,
                              @Nonnull final ETriState eReportProcessErrorNotifyConsumer,
                              @Nonnull final ETriState eReportProcessErrorNotifyProducer,
                              @Nonnull final ETriState eReportDeliveryFailuresNotifyProducer)
{
  m_aReportSenderErrorsTo = aReportSenderErrorsTo;
  m_aReportReceiverErrorsTo = aReportReceiverErrorsTo;
  m_eReportAsResponse = ValueEnforcer.notNull (eReportAsResponse, "ReportAsResponse");
  m_eReportProcessErrorNotifyConsumer = ValueEnforcer.notNull (eReportProcessErrorNotifyConsumer,
                                                               "ReportProcessErrorNotifyConsumer");
  m_eReportProcessErrorNotifyProducer = ValueEnforcer.notNull (eReportProcessErrorNotifyProducer,
                                                               "ReportProcessErrorNotifyProducer");
  m_eReportDeliveryFailuresNotifyProducer = ValueEnforcer.notNull (eReportDeliveryFailuresNotifyProducer,
                                                                   "ReportDeliveryFailuresNotifyProducer");
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:18,代码来源:PModeLegErrorHandling.java

示例4: validateUserMessage

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public void validateUserMessage (@Nonnull final Ebms3UserMessage aUserMsg, @Nonnull final ErrorList aErrorList)
{
  ValueEnforcer.notNull (aUserMsg, "UserMsg");

  if (aUserMsg.getMessageInfo () != null)
  {

    if (StringHelper.hasNoText (aUserMsg.getMessageInfo ().getMessageId ()))
    {
      aErrorList.add (_createError ("MessageID is missing but is mandatory!"));
    }
  }
  else
  {
    aErrorList.add (_createError ("MessageInfo is missing but is mandatory!"));
  }

  if (aUserMsg.getPartyInfo () != null)
  {
    if (aUserMsg.getPartyInfo ().getTo () != null)
    {
      if (aUserMsg.getPartyInfo ().getTo ().getPartyIdCount () > 1)
      {
        aErrorList.add (_createError ("Only 1 PartyID is allowed in PartyTo - part"));
      }
    }
    if (aUserMsg.getPartyInfo ().getFrom () != null)
    {
      if (aUserMsg.getPartyInfo ().getFrom ().getPartyIdCount () > 1)
      {
        aErrorList.add (_createError ("Only 1 PartyID is allowed in PartyFrom - part"));
      }
    }
  }
  else
  {
    aErrorList.add (_createError ("At least one PartyInfo element has to be present"));
  }
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:40,代码来源:ESENSCompatibilityValidator.java

示例5: addPayloadProfile

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public final void addPayloadProfile (@Nonnull final PModePayloadProfile aPayloadProfile)
{
  ValueEnforcer.notNull (aPayloadProfile, "PayloadProfile");
  final String sKey = aPayloadProfile.getName ();
  if (m_aPayloadProfiles.containsKey (sKey))
    throw new IllegalArgumentException ("A payload profile with the name '" + sKey + "' is already registered!");
  m_aPayloadProfiles.put (sKey, aPayloadProfile);
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:9,代码来源:PModeLegBusinessInformation.java

示例6: WSS4JAttachmentCallbackHandler

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public WSS4JAttachmentCallbackHandler (@Nullable final Iterable <WSS4JAttachment> aAttachments,
                                       @Nonnull final AS4ResourceManager aResMgr)
{
  if (aAttachments != null)
    for (final WSS4JAttachment aAttachment : aAttachments)
      m_aAttachmentMap.put (aAttachment.getId (), aAttachment);
  m_aResMgr = ValueEnforcer.notNull (aResMgr, "ResMgr");
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:9,代码来源:WSS4JAttachmentCallbackHandler.java

示例7: AS4Profile

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public AS4Profile (@Nonnull @Nonempty final String sID,
                   @Nonnull @Nonempty final String sDisplayName,
                   @Nonnull final ISupplier <? extends IAS4ProfileValidator> aProfileValidatorProvider,
                   @Nonnull final ISupplier <? extends PMode> aDefaultPModeProvider,
                   @Nonnull final IPModeIDProvider aPModeIDProvider)
{
  m_sID = ValueEnforcer.notEmpty (sID, "ID");
  m_sDisplayName = ValueEnforcer.notEmpty (sDisplayName, "DisplayName");
  m_aProfileValidatorProvider = ValueEnforcer.notNull (aProfileValidatorProvider, "ProfileValidatorProvider");
  m_aDefaultPModeProvider = ValueEnforcer.notNull (aDefaultPModeProvider, "aDefaultPModeProvider");
  m_aPModeIDProvider = ValueEnforcer.notNull (aPModeIDProvider, "PModeIDProvider");
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:13,代码来源:AS4Profile.java

示例8: setLocale

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
@Nonnull
public AS4Handler setLocale (@Nonnull final Locale aLocale)
{
  ValueEnforcer.notNull (aLocale, "Locale");
  m_aLocale = aLocale;
  return this;
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:8,代码来源:AS4Handler.java

示例9: PModeProperty

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public PModeProperty (@Nonnull @Nonempty final String sName,
                      @Nullable final String sDescription,
                      @Nonnull @Nonempty final String sDataType,
                      @Nonnull final EMandatory eMandatory)
{
  m_sName = ValueEnforcer.notEmpty (sName, "Name");
  m_sDescription = sDescription;
  m_sDataType = ValueEnforcer.notEmpty (sDataType, "DataType");
  m_eMandatory = ValueEnforcer.notNull (eMandatory, "Mandatory");
  _checkDataType (sDataType);
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:12,代码来源:PModeProperty.java

示例10: STXQNameTest

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public STXQNameTest (@Nonnull final ParserQName aQName)
{
  m_aQName = ValueEnforcer.notNull (aQName, "QName");
}
 
开发者ID:phax,项目名称:ph-stx,代码行数:5,代码来源:STXQNameTest.java

示例11: STXPathExpression

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public STXPathExpression (@Nonnull final ESTXPathOperator eOperator, @Nullable final ISTXExpression aExpr)
{
  m_eOperator = ValueEnforcer.notNull (eOperator, "Operator");
  m_aExpression = aExpr;
}
 
开发者ID:phax,项目名称:ph-stx,代码行数:6,代码来源:STXPathExpression.java

示例12: setMEP

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public final void setMEP (@Nonnull final EMEP eMEP)
{
  ValueEnforcer.notNull (eMEP, "MEP");
  m_eMEP = eMEP;
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:6,代码来源:PMode.java

示例13: AS4ReceiptMessage

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public AS4ReceiptMessage (@Nonnull final ESOAPVersion eSOAPVersion, @Nonnull final Ebms3SignalMessage aSignalMessage)
{
  super (eSOAPVersion, EAS4MessageType.RECEIPT);
  ValueEnforcer.notNull (aSignalMessage, "SignalMessage");
  m_aMessaging.addSignalMessage (aSignalMessage);
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:7,代码来源:AS4ReceiptMessage.java

示例14: BuiltMessage

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public BuiltMessage (@Nonnull @Nonempty final String sMessageID, @Nonnull final HttpEntity aHttpEntity)
{
  m_sMessageID = ValueEnforcer.notEmpty (sMessageID, "MessageID");
  m_aHttpEntity = ValueEnforcer.notNull (aHttpEntity, "HttpEntity");
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:6,代码来源:AbstractAS4Client.java

示例15: HttpMimeMessageEntity

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public HttpMimeMessageEntity (@Nonnull final MimeMessage aMsg)
{
  m_aMsg = ValueEnforcer.notNull (aMsg, "Msg");
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:5,代码来源:HttpMimeMessageEntity.java


注:本文中的com.helger.commons.ValueEnforcer.notNull方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。