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


Java StringUtils.isEmpty方法代码示例

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


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

示例1: validoiAlkuperainenLaakemaarays

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
/**
    * Validoi alkuperäisen LaakemaraysTOn
    *
    * @param laakemaarays LaakemaaraysTO joka validoidaan
    */
   public void validoiAlkuperainenLaakemaarays() {

if (null == getAlkuperainenLaakemaarays()) {
    throw new IllegalArgumentException("Alkuperäinen lääkemääräys ei saa olla null.");
}
if (null == getAlkuperainenLaakemaarays().getMaarayspaiva()) {
    throw new IllegalArgumentException("Alkuperäisen lääkemääräyksen 'määräyspäivä' ei saa olla null.");
}
if (StringUtils.isEmpty(getAlkuperainenLaakemaarays().getOid())) {
    throw new IllegalArgumentException("Alkuperäisen lääkemääräyksen 'oid' pitää löytyä.");
}
if (null == getAlkuperainenLaakemaarays().getMaarayspaiva()) {
    throw new IllegalArgumentException("Alkuperäisen lääkemääräyksen 'setid' pitää löytyä.");
}
   }
 
开发者ID:TheFinnishSocialInsuranceInstitution,项目名称:KantaCDA-API,代码行数:21,代码来源:ReseptinUusimisValidoija.java

示例2: addRelatedDocument

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
@Override
protected void addRelatedDocument(POCDMT000040ClinicalDocument clinicalDocument, String oid, String setid,
        String propertycode, XActRelationshipDocument relationType) {
    POCDMT000040RelatedDocument relatedDocument = of.createPOCDMT000040RelatedDocument();

    relatedDocument.setTypeCode(relationType);
    relatedDocument.setParentDocument(of.createPOCDMT000040ParentDocument());
    relatedDocument.getParentDocument().getIds().add(of.createII());
    relatedDocument.getParentDocument().getIds().get(0).setRoot(oid);
    relatedDocument.getParentDocument().setCode(of.createCE());
    fetchAttributes(propertycode, relatedDocument.getParentDocument().getCode());
    clinicalDocument.getRelatedDocuments().add(relatedDocument);

    if ( !StringUtils.isEmpty(setid) ) {
        relatedDocument.getParentDocument().setSetId(of.createII());
        relatedDocument.getParentDocument().getSetId().setRoot(setid);
    }
}
 
开发者ID:TheFinnishSocialInsuranceInstitution,项目名称:KantaCDA-API,代码行数:19,代码来源:UusimispyyntoKasaaja.java

示例3: getProcessedArtifactItems

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
protected ArrayList getProcessedArtifactItems(boolean removeVersion)
	throws MojoExecutionException 
{
	ArrayList items = super.getProcessedArtifactItems( removeVersion );
	Iterator iter = items.iterator();
    while ( iter.hasNext() )
    {
        ArtifactItem artifactItem = (ArtifactItem) iter.next();
        if ( StringUtils.isEmpty(artifactItem.getIncludes()) )
        {
            artifactItem.setIncludes( getIncludes() );
        }
        if ( StringUtils.isEmpty(artifactItem.getExcludes()) )
        {
            artifactItem.setExcludes( getExcludes() );
        }
    }
	return items;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:20,代码来源:UnpackMojo.java

示例4: mergeProperties

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
protected Map<String, String> mergeProperties(Map<String, String> defaultProperties,
                                              Map<String, String> customProperties,
                                              boolean overrideDefaultProperties) {
    if (customProperties == null) {
        return defaultProperties;
    }

    final Map<String, String> merged = new HashMap<>();
    if (overrideDefaultProperties) {
        merged.putAll(defaultProperties);
        merged.putAll(customProperties);
    } else {
        merged.putAll(customProperties);
        merged.putAll(defaultProperties);
    }
    for (Map.Entry<String, String> entry : merged.entrySet()) {
        if (StringUtils.isEmpty(entry.getValue())) {
            merged.remove(entry.getKey());
        }
    }
    return merged;
}
 
开发者ID:Microsoft,项目名称:azure-maven-plugins,代码行数:23,代码来源:AppInsightsProxy.java

示例5: getAzureClient

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
public Azure getAzureClient() {
    final Authenticated auth = getAuthObj();
    if (auth == null) {
        return null;
    }

    try {
        final String subscriptionId = config.getSubscriptionId();
        return StringUtils.isEmpty(subscriptionId) ?
                auth.withDefaultSubscription() :
                auth.withSubscription(subscriptionId);
    } catch (Exception e) {
        getLog().debug(e);
    }
    return null;
}
 
开发者ID:Microsoft,项目名称:azure-maven-plugins,代码行数:17,代码来源:AzureAuthHelper.java

示例6: parseCleanFile

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
private void parseCleanFile() {
	File f = cleanFile();
	if (!f.exists()) {
		return;
	}
	try {
		try (BufferedReader in = new BufferedReader(new FileReader(f))) {
			String str;

			while ((str = in.readLine()) != null) {
				if (StringUtils.isEmpty(str) || str.startsWith("#")) {
					continue;
				}
				String[] tmp = str.split(",");
				if (tmp.length > 1) {
					add(new File(tmp[0]), tmp[1]);
				} else {
					add(new File(tmp[0]));
				}
			}
		}
	} catch (IOException e) {
	}
}
 
开发者ID:DigitalMediaServer,项目名称:DigitalMediaServer,代码行数:25,代码来源:TempFileMgr.java

示例7: visitBuildPlugin

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
@Override
public void visitBuildPlugin( Plugin plugin )
{
    if ( isExternal( plugin.getLocation( "" ) ) )
        return;

    String groupId = plugin.getGroupId();
    String artifactId = plugin.getArtifactId();
    String version = plugin.getVersion();
    if ( StringUtils.isEmpty( groupId ) )
        groupId = "org.apache.maven.plugins";
    if ( StringUtils.isEmpty( version ) )
        version = Artifact.DEFAULT_VERSION;

    Artifact pluginArtifact = new DefaultArtifact( groupId, artifactId, version );
    artifacts.add( pluginArtifact );
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:18,代码来源:BuildDependencyVisitor.java

示例8: isValid

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
public boolean isValid(Map paramaters) throws MojoExecutionException {
  List<Object> paramatersMissing = new ArrayList<>();
  for (Object paramater : paramaters.keySet()) {
    if (paramaters.get(paramater) == null
      || paramaters.get(paramater) instanceof String && StringUtils.isEmpty((String) paramaters.get(paramater))) {
      paramatersMissing.add(paramater);
    }
  }
  if (!paramatersMissing.isEmpty()) {
    throw new MojoExecutionException(
      "The required parameters " + paramatersMissing + " were missing from the POM as <properties><parcel.MISSING-PARAMATER> or "
        + "<execution><configuration><parcels><parcel><MISSING-PARAMATER> definitions");
  }
  return isValid();
}
 
开发者ID:ggear,项目名称:cloudera-parcel,代码行数:17,代码来源:Parcel.java

示例9: getRevision

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
public String getRevision()
    throws MojoExecutionException
{
    try
    {
        return this.getScmRevision();
    }
    catch ( ScmException e )
    {
        if ( !StringUtils.isEmpty( revisionOnScmFailure ) )
        {
            getLog().warn( "Cannot get the revision information from the scm repository, proceeding with "
                + "revision of " + revisionOnScmFailure + " : \n" + e.getLocalizedMessage() );

            return revisionOnScmFailure;
        }

        throw new MojoExecutionException( "Cannot get the revision information from the scm repository : \n"
            + e.getLocalizedMessage(), e );

    }
}
 
开发者ID:mojohaus,项目名称:buildnumber-maven-plugin,代码行数:23,代码来源:CreateMetadataMojo.java

示例10: copy

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
public static SVNCommitInfo copy( SVNClientManager clientManager, SVNURL srcURL, SVNURL dstURL, boolean isMove,
                                  String commitMessage, String revision )
    throws SVNException
{

    SVNRevision svnRevision = null;
    if ( StringUtils.isEmpty( revision ) )
    {
        svnRevision = SVNRevision.HEAD;
    }
    else
    {
        svnRevision = SVNRevision.create( Long.parseLong( revision ) );
    }
    /*
     * SVNRevision.HEAD means the latest revision.
     * Returns SVNCommitInfo containing information on the new revision committed
     * (revision number, etc.)
     */
    SVNCopySource[] svnCopySources = new SVNCopySource[1];
    svnCopySources[0] = new SVNCopySource( svnRevision, svnRevision, srcURL );

    return clientManager.getCopyClient().doCopy( svnCopySources, dstURL, false, true, true, commitMessage,
                                                 new SVNProperties() );
    //return clientManager.getCopyClient().doCopy( srcURL, svnRevision, dstURL, isMove, commitMessage, new SVNProperties() );
}
 
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:27,代码来源:SvnJavaUtil.java

示例11: getNewVersion

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
@Override
protected String getNewVersion() throws MojoExecutionException {
    if ( StringUtils.isEmpty( newVersion ) )
    {
        if ( settings.isInteractiveMode() )
        {
            try
            {
                newVersion =
                        prompter.prompt( "Enter the new version to set", getProject().getOriginalModel().getVersion() );
            }
            catch ( PrompterException e )
            {
                throw new MojoExecutionException( e.getMessage(), e );
            }
        }
        else
        {
            throw new MojoExecutionException( "You must specify the new version, either by using the newVersion "
                    + "property (that is -DnewVersion=... on the command line) or run in interactive mode" );
        }
    }

    return newVersion;
}
 
开发者ID:petr-ujezdsky,项目名称:versions-maven-plugin-svn-clone,代码行数:26,代码来源:SetMojo.java

示例12: validoiAlkuperainenLaakemaarays

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
/**
   * Validoi alkuperäisen LaakemaraysTOn
   *
   * @param laakemaarays LaakemaaraysTO joka validoidaan
   */
  public void validoiAlkuperainenLaakemaarays() {
  	if (null == getAlkuperainenLaakemaarays()) {
  		throw new IllegalArgumentException(VIRHE_ALKUPERAINEN_LAAKEMAARAYS_NULL);
  	}
if (null == getAlkuperainenLaakemaarays().getMaarayspaiva()) {
    throw new IllegalArgumentException(VIRHE_ALKUPERAISEN_LAAKEMAARAYKSEN_MAARAYSPAIVA_NULL);
}
if (StringUtils.isEmpty(getAlkuperainenLaakemaarays().getOid())) {
    throw new IllegalArgumentException(VIRHE_ALKUPERAISEN_LAAKEMAARAYKSEN_OID_NULL);
}
if (StringUtils.isEmpty(getAlkuperainenLaakemaarays().getSetId())) {
    throw new IllegalArgumentException(VIRHE_ALKUPERAISEN_LAAKEMAARAYKSEN_SETID_NULL);
}
  }
 
开发者ID:TheFinnishSocialInsuranceInstitution,项目名称:KantaCDA-API,代码行数:20,代码来源:ReseptinKorjausValidoija.java

示例13: getDocumentId

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
protected String getDocumentId(final LeimakentatTO<?> leimakentat) {

        if ( StringUtils.isEmpty(documentId) ) {
            documentId = generator.createNewDocumentOid(leimakentat.getCDAOidBase());
        }
        return documentId;
    }
 
开发者ID:TheFinnishSocialInsuranceInstitution,项目名称:KantaCDA-API,代码行数:8,代码来源:Kasaaja.java

示例14: addRelatedDocument

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
/**
 * Lisää clinicalDocumentiin relatedDocument rakenteen johon sijoitetaan annetut oid ja setId ja haetaan code
 * elemettiin arvot annetulla propertycodella <relatedDocument typeCode="RPLC/APND/..."> <parentDocument>
 * <id root="[oid]"/> <code code="{propertycode.code}" codeSystem="{propertycode.codeSystem}" codesystemName=
 * "{propertycode.codeSystemName}" displayName= "{propertycode.displayName}"/> <setId root="[setId]"/>
 * </parentDocument> </relatedDocument>
 *
 * @param clinicalDocument
 *            POCDMT00040ClinicalDocument johon relatedDocument elementti lisätään
 * @param oid
 *            String alkuperäisen dokumentin oid
 * @param setid
 *            String alkuperäisen dokumentin setId
 * @param propertycode
 *            String avain jolla code kenttä täytetään property tiedoista
 * @param relationType
 *            Relaation tyyppikoodi (RPLC korjaus, APND uusiminen)
 */
protected void addRelatedDocument(POCDMT000040ClinicalDocument clinicalDocument, String oid, String setid,
        String propertycode, XActRelationshipDocument relationType) {

    POCDMT000040RelatedDocument relatedDocument = of.createPOCDMT000040RelatedDocument();

    relatedDocument.setTypeCode(relationType);
    relatedDocument.setParentDocument(of.createPOCDMT000040ParentDocument());
    relatedDocument.getParentDocument().getIds().add(of.createII());
    relatedDocument.getParentDocument().getIds().get(0).setRoot(oid);
    relatedDocument.getParentDocument().setCode(of.createCE());
    fetchAttributes(propertycode, relatedDocument.getParentDocument().getCode());
    clinicalDocument.getRelatedDocuments().add(relatedDocument);

    if ( relationType == XActRelationshipDocument.APND ) {
        CD value = new CD();
        fetchAttributes(Kasaaja.LM_UUSIMISPYYNTO, value);
        relatedDocument.getParentDocument().setCode(value);
        if ( !StringUtils.isEmpty(setid) ) {
            relatedDocument.getParentDocument().setSetId(of.createII());
            relatedDocument.getParentDocument().getSetId().setRoot(setid);
        }
    }
    else {
        relatedDocument.getParentDocument().setSetId(of.createII());
        relatedDocument.getParentDocument().getSetId().setRoot(setid);
    }
}
 
开发者ID:TheFinnishSocialInsuranceInstitution,项目名称:KantaCDA-API,代码行数:46,代码来源:Kasaaja.java

示例15: getMarkerFile

import org.codehaus.plexus.util.StringUtils; //导入方法依赖的package包/类
protected File getMarkerFile()
  {
File markerFile = null;
if ( this.artifactItem == null 
	|| ( StringUtils.isEmpty( this.artifactItem.getIncludes() )
	&&	StringUtils.isEmpty( this.artifactItem.getExcludes() ) ) )
{
	markerFile = new StubMarkerFile( this.markerFilesDirectory, this.artifact.getId().replace( ':', '-' ) + ".marker" );
}
else
{
	int includeExcludeHash = 0;
	
	if ( StringUtils.isNotEmpty( this.artifactItem.getIncludes() ) )
	{
		includeExcludeHash += this.artifactItem.getIncludes().hashCode();
	}
	
	if ( StringUtils.isNotEmpty( this.artifactItem.getExcludes() ) )
	{
		includeExcludeHash += this.artifactItem.getExcludes().hashCode();
	}
	
	markerFile = new StubMarkerFile( this.markerFilesDirectory, this.artifact.getId().replace( ':', '-' ) + includeExcludeHash );
}

return markerFile;
  }
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:29,代码来源:StubUnpackFileMarkerHandler.java


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