本文整理匯總了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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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) {
}
}
示例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 );
}
示例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();
}
示例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 );
}
}
示例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() );
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}