• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java StringUtils类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.axis.utils.StringUtils的典型用法代码示例。如果您正苦于以下问题:Java StringUtils类的具体用法?Java StringUtils怎么用?Java StringUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: getIssues

import org.apache.axis.utils.StringUtils; //导入依赖的package包/类
@Override
public Task[] getIssues(@Nullable final String query,
                        final int max,
                        final long since,
                        @NotNull final ProgressIndicator cancelled) throws Exception {
  MantisConnectPortType soap = createSoap();
  List<Task> tasks = new ArrayList<Task>(max);
  int page = 1;
  int issuesOnPage = StringUtils.isEmpty(query) ? max : max * query.length() * 5;
  while (true) {
    cancelled.checkCanceled();
    final List<Task> issuesFromPage = getIssues(page, issuesOnPage, soap);
    final List<Task> filteredTasks = TaskSearchSupport.filterTasks(query != null ? query : "", issuesFromPage);
    tasks.addAll(filteredTasks);
    if (issuesFromPage.size() < issuesOnPage || tasks.size() >= max) {
      break;
    }
    page++;
  }
  tasks = tasks.subList(0, Math.min(max, tasks.size()));
  return tasks.toArray(new Task[tasks.size()]);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:MantisRepository.java


示例2: validateNewFaultInput

import org.apache.axis.utils.StringUtils; //导入依赖的package包/类
private void validateNewFaultInput() {

        ValidationResult result = new ValidationResult();

        if (ValidationUtils.isNotBlank(this.getNewFaultNameTextField().getText())
            && !CommonTools.isValidClassName(this.getNewFaultNameTextField().getText())) {
            result.add(new SimpleValidationMessage("New fault must be a valid java class name format. ("
                + CommonTools.ALLOWED_JAVA_CLASS_REGEX + ")", Severity.ERROR, METHOD_FAULT));
        }
        
		if (!result.hasErrors() && !StringUtils.isEmpty(getNewFaultNameTextField().getText())) {
			QName exceptionQName = new QName(info.getService().getNamespace() + "/types", getNewFaultNameTextField().getText());
			ExceptionHolder holder = new ExceptionHolder(exceptionQName, false);
			for (int index = 0; index < getExceptionJComboBox().getItemCount(); index++) {
				ExceptionHolder currentHolder = (ExceptionHolder) getExceptionJComboBox().getItemAt(index);
				if (holder.compareTo(currentHolder) == 0) {
		            result.add(new SimpleValidationMessage("New fault already exists in the Used Faults drop-down.", Severity.ERROR, METHOD_FAULT));
				}
			}
		}

        this.methodFaultValidationModel.setResult(result);
        updateNewFaultComponentTreeSeverity();
        updateAddNewFaultButton();
        updateDoneButton();
    }
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:27,代码来源:MethodViewer.java


示例3: execute

import org.apache.axis.utils.StringUtils; //导入依赖的package包/类
public ModuleRevisionId[] execute(String organization, String name, String revision) {		
	IvySettings settings = ivy.getSettings();
	
       ModuleRevisionId[] mrids = ivy.listModules(ModuleRevisionId.newInstance(organization,
       		name, "*", revision), settings.getMatcher(PatternMatcher.REGEXP));

       List<ModuleRevisionId> mridsToReturn = new ArrayList<ModuleRevisionId>();
       for (ModuleRevisionId moduleRevisionId : mrids) {
           ResolvedModuleRevision resolvedModuleRevision = ivy.findModule(moduleRevisionId);
           
           Map extraInfo = resolvedModuleRevision.getDescriptor().getExtraInfo();
           String systemName = (String) extraInfo.get("grid:systemName");
           if (StringUtils.isEmpty(systemName)) {
           	systemName = moduleRevisionId.getRevision();
           }
           
           ModuleRevisionId mrid = new ModuleRevisionId(moduleRevisionId.getModuleId(), systemName);
           if (!mridsToReturn.contains(mrid)) {
           	mridsToReturn.add(mrid);
           }
		
	}
       return (ModuleRevisionId[]) mridsToReturn.toArray(new ModuleRevisionId[mridsToReturn.size()]);

}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:26,代码来源:Discover.java


示例4: getIssues

import org.apache.axis.utils.StringUtils; //导入依赖的package包/类
@Override
public Task[] getIssues(@Nullable final String query,
                        final int max,
                        final long since,
                        @NotNull final ProgressIndicator cancelled) throws Exception {
  MantisConnectPortType soap = createSoap();
  List<Task> tasks = new ArrayList<Task>(max);
  int page = 1;
  int issuesOnPage = StringUtils.isEmpty(query) ? max : max * query.length() * 5;
  while (true) {
    cancelled.checkCanceled();
    final List<Task> issuesFromPage = getIssues(page, issuesOnPage, soap);
    tasks.addAll(issuesFromPage);
    if (issuesFromPage.size() < issuesOnPage || tasks.size() >= max) {
      break;
    }
    page++;
  }
  tasks = tasks.subList(0, Math.min(max, tasks.size()));
  return tasks.toArray(new Task[tasks.size()]);
}
 
开发者ID:consulo,项目名称:consulo-tasks,代码行数:22,代码来源:MantisRepository.java


示例5: getDisplayName

import org.apache.axis.utils.StringUtils; //导入依赖的package包/类
public String getDisplayName(ModuleRevisionId moduleRevisionId) {		
       ResolvedModuleRevision resolvedModuleRevision = ivy.findModule(moduleRevisionId);
       Map extraInfo = resolvedModuleRevision.getDescriptor().getExtraInfo();
       String displayName = (String) extraInfo.get("grid:displayName");
       if (StringUtils.isEmpty(displayName)) {
       	displayName = moduleRevisionId.getRevision();
       }
       return displayName;

}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:11,代码来源:Discover.java


示例6: updateGridConfigurationFiles

import org.apache.axis.utils.StringUtils; //导入依赖的package包/类
public boolean updateGridConfigurationFiles(Grid[] grids) throws Exception {
	boolean updatedGridConfiguration = false;

	for (int counter = 0; counter < grids.length; counter++) {
		URL settingsURL = null;
		String repositoryName = "default";
		if ("local".equals(grids[counter].getIvySettings())) {
			// Grid added by interface
			// Nothing to retrieve
			continue;
		} else if (!StringUtils.isEmpty(grids[counter].getIvySettings())) {
			File settingsFile = new File(configurationDirectory, grids[counter].getIvySettings());
			if (settingsFile.exists()) {
				settingsURL = settingsFile.toURI().toURL();
				repositoryName = settingsFile.getName().substring(13, settingsFile.getName().length()-4);
			} else {
				settingsURL = ivySettingsURL;
			}
		}
		Retrieve gridRetriever = new Retrieve(settingsURL, configurationDirectory.getAbsolutePath() + File.separator + "cache");

		int retrieved = gridRetriever.execute(ivyURL, configurationDirectory.getAbsolutePath(), "caGrid", "target_grid", grids[counter]);
		if (retrieved > 0) {
			updatedGridConfiguration = true;
			Discover gridDiscover = new Discover(settingsURL, configurationDirectory.getAbsolutePath() + File.separator + "cache");
			String newDisplayName = gridDiscover.getDisplayName("caGrid", "target_grid", grids[counter].getVersion());
			grids[counter].setDisplayName(newDisplayName);
		}
		
		File gridConfigurationDir = new File(configurationDirectory, grids[counter].getSystemName());
		deleteDuplicateConfFiles(gridConfigurationDir);
		if (updatedGridConfiguration && conflictingConfs(gridConfigurationDir)) {
			YesNoDialog.showChoice("The updated configuration files for Grid: "+grids[counter].getSystemName()+", conflict with your locally modified versions.  Do you wish to keep your current version or delete it and use the updated version.", gridConfigurationDir.getAbsolutePath());
		}

		configurationManager.addConfiguration(loadConfiguration(), grids[counter]);
	}
	return updatedGridConfiguration;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:40,代码来源:TargetGridsManager.java


示例7: setCredentials

import org.apache.axis.utils.StringUtils; //导入依赖的package包/类
private void setCredentials(NetAppClient netAppClient, DefaultHttpClient httpclient, boolean useIngestPort) {
	if(!StringUtils.isEmpty(netAppClient.getUsername()) && !StringUtils.isEmpty(netAppClient.getPassword())){
		Credentials credentials = new UsernamePasswordCredentials(netAppClient.getUsername(), netAppClient.getPassword());
		httpclient.getCredentialsProvider().setCredentials(new AuthScope(netAppClient.getHost(), useIngestPort ? netAppClient.getIngestPort() : netAppClient.getPort()), credentials);
	}
}
 
开发者ID:ExLibrisGroup,项目名称:Rosetta.NetAppStoragePlugin,代码行数:7,代码来源:CDMIConnector.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TabSelectedHandler类代码示例发布时间:2022-05-22
下一篇:
Java DefaultPrettyPrinter类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap