本文整理汇总了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;未经允许,请勿转载。 |
请发表评论