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


Java ValueEnforcer.notEmpty方法代码示例

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


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

示例1: PModeParty

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public PModeParty (@Nullable final String sIDType,
                   @Nonnull @Nonempty final String sIDValue,
                   @Nonnull @Nonempty final String sRole,
                   @Nullable final String sUserName,
                   @Nullable final String sPassword)
{
  m_sIDType = sIDType;
  m_sIDValue = ValueEnforcer.notEmpty (sIDValue, "IDValue");
  m_sRole = ValueEnforcer.notEmpty (sRole, "Role");
  m_sUserName = sUserName;
  m_sPassword = sPassword;
  m_sID = m_sIDValue;
  if (!StringHelper.getNotNull (m_sIDType).equals (""))
  {
    m_sID = m_sIDType + ":" + m_sIDValue;
  }

}
 
开发者ID:phax,项目名称:ph-as4,代码行数:19,代码来源:PModeParty.java

示例2: createEbms3MessageInfo

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
/**
 * Create a new message info.
 *
 * @param sMessageID
 *        The message ID. May neither be <code>null</code> nor empty.
 * @param sRefToMessageID
 *        to set the reference to the previous message needed for two way
 *        exchanges
 * @return Never <code>null</code>.
 */
@Nonnull
public static Ebms3MessageInfo createEbms3MessageInfo (@Nonnull @Nonempty final String sMessageID,
                                                       @Nullable final String sRefToMessageID)
{
  ValueEnforcer.notEmpty (sMessageID, "MessageID");

  final Ebms3MessageInfo aMessageInfo = new Ebms3MessageInfo ();

  aMessageInfo.setMessageId (sMessageID);
  if (StringHelper.hasText (sRefToMessageID))
    aMessageInfo.setRefToMessageId (sRefToMessageID);

  aMessageInfo.setTimestamp (PDTXMLConverter.getXMLCalendarNowUTC ());
  return aMessageInfo;
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:26,代码来源:MessageHelperMethods.java

示例3: AS4DuplicateItem

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
AS4DuplicateItem (@Nonnull final LocalDateTime aDT,
                  @Nonnull @Nonempty final String sMessageID,
                  @Nullable final String sProfileID,
                  @Nullable final String sPModeID)
{
  m_aDT = ValueEnforcer.notNull (aDT, "DT");
  m_sMessageID = ValueEnforcer.notEmpty (sMessageID, "MessageID");
  m_sProfileID = sProfileID;
  m_sPModeID = sPModeID;
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:11,代码来源:AS4DuplicateItem.java

示例4: 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

示例5: 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

示例6: PModePayloadProfile

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public PModePayloadProfile (@Nonnull @Nonempty final String sName,
                            @Nonnull final IMimeType aMimeType,
                            @Nullable final String sXSDFilename,
                            @Nullable final Integer aMaxSizeKB,
                            @Nonnull final EMandatory eMandatory)
{
  m_sName = ValueEnforcer.notEmpty (sName, "Name");
  m_aMimeType = ValueEnforcer.notNull (aMimeType, "MimeType");
  m_sXSDFilename = sXSDFilename;
  m_aMaxSizeKB = aMaxSizeKB;
  m_eMandatory = ValueEnforcer.notNull (eMandatory, "Mandatory");
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:13,代码来源:PModePayloadProfile.java

示例7: sendGenericMessage

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
@Nullable
public <T> T sendGenericMessage (@Nonnull final String sURL,
                                 @Nonnull final HttpEntity aHttpEntity,
                                 @Nonnull final ResponseHandler <? extends T> aResponseHandler) throws Exception
{
  ValueEnforcer.notEmpty (sURL, "URL");
  ValueEnforcer.notNull (aHttpEntity, "HttpEntity");

  try (final HttpClientManager aClient = new HttpClientManager (m_aHTTPClientProvider))
  {
    final HttpPost aPost = new HttpPost (sURL);
    if (aHttpEntity instanceof HttpMimeMessageEntity)
    {
      MessageHelperMethods.moveMIMEHeadersToHTTPHeader (((HttpMimeMessageEntity) aHttpEntity).getMimeMessage (),
                                                        aPost);
    }
    aPost.setEntity (aHttpEntity);

    // Overridable method
    customizeHttpPost (aPost);

    AS4HttpDebug.debug ( () -> {
      final StringBuilder ret = new StringBuilder ("SEND-START to ").append (sURL);
      try
      {
        ret.append ("\n");
        for (final Header h : aPost.getAllHeaders ())
          ret.append (h.getName ()).append ('=').append (h.getValue ()).append (CHttp.EOL);
        ret.append (CHttp.EOL);
        ret.append (EntityUtils.toString (aHttpEntity));
      }
      catch (final IOException ex)
      { /* ignore */ }
      return ret.toString ();
    });

    return aClient.execute (aPost, aResponseHandler);
  }
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:40,代码来源:BasicAS4Sender.java

示例8: addAddress

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public final void addAddress (@Nonnull @Nonempty final String sAddress)
{
  ValueEnforcer.notEmpty (sAddress, "Address");
  m_aAddresses.add (sAddress);
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:6,代码来源:PModeAddressList.java

示例9: 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

示例10: SentMessage

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

示例11: setDefaultResponderID

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public static void setDefaultResponderID (@Nonnull @Nonempty final String sResponderID)
{
  ValueEnforcer.notEmpty (sResponderID, "ResponderID");
  s_sResponderID = sResponderID;
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:6,代码来源:AS4ServerSettings.java

示例12: ParserQName

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public ParserQName (@Nullable final String sPrefix, @Nonnull @Nonempty final String sLocalName)
{
  ValueEnforcer.notEmpty (sLocalName, "sLocalName");
  m_sPrefix = sPrefix;
  m_sLocalName = sLocalName;
}
 
开发者ID:phax,项目名称:ph-stx,代码行数:7,代码来源:ParserQName.java

示例13: STXLocalNameIsWildcardTest

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public STXLocalNameIsWildcardTest (@Nonnull @Nonempty final String sNamespaceURL)
{
  m_sNamespaceURL = ValueEnforcer.notEmpty (sNamespaceURL, "NamespaceURL");
}
 
开发者ID:phax,项目名称:ph-stx,代码行数:5,代码来源:STXLocalNameIsWildcardTest.java

示例14: STXNamespaceIsWildcardTest

import com.helger.commons.ValueEnforcer; //导入方法依赖的package包/类
public STXNamespaceIsWildcardTest (@Nonnull @Nonempty final String sLocalName)
{
  m_sLocalName = ValueEnforcer.notEmpty (sLocalName, "LocalName");
}
 
开发者ID:phax,项目名称:ph-stx,代码行数:5,代码来源:STXNamespaceIsWildcardTest.java


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