本文整理汇总了Java中com.jacob.com.Dispatch.call方法的典型用法代码示例。如果您正苦于以下问题:Java Dispatch.call方法的具体用法?Java Dispatch.call怎么用?Java Dispatch.call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jacob.com.Dispatch
的用法示例。
在下文中一共展示了Dispatch.call方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFieldValueAsVariant
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
private Variant getFieldValueAsVariant(String field) {
Variant res = Dispatch.call(this, "FieldValue", field);
if (res.getvt() == Variant.VariantEmpty) {
return null;
} else if (res.getvt() == Variant.VariantError) {
return null;
}
return res;
}
示例2: initConnectionEx
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public boolean initConnectionEx(String url)
throws ALMServiceException
{
try
{
Dispatch.call(getAlmObject(), "InitConnectionEx", new Object[] { url });
return true;
} catch (ComFailException e) {
throw new ALMServiceException("Unable to Establish connection for the Given URL: " + url);
}
}
示例3: login
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public boolean login(String username, String password)
throws ALMServiceException
{
try
{
Dispatch.call(getAlmObject(), "login", new Object[] { username, password });
return true;
} catch (ComFailException e) {
throw new ALMServiceException("Invalid Username or Password");
}
}
示例4: connect
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public boolean connect(String domain, String project)
throws ALMServiceException
{
try
{
Dispatch.call(getAlmObject(), "connect", new Object[] { domain, project });
return true;
} catch (ComFailException e) {
throw new ALMServiceException("Invalid Project or Domain");
}
}
示例5: getFieldAsDate
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public Date getFieldAsDate(String field) {
Variant res = Dispatch.call(this, "Field", field);
double ddate = 0.0;
if (res.isNull()) {
return null;
} else {
ddate = res.getDate();
}
Date d = DateUtilities.convertWindowsTimeToDate(ddate);
return d;
}
示例6: lockObject
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public void lockObject() throws DefectAlreadyLockedException {
if (isLocked()) {
throw new DefectAlreadyLockedException("Bug locked by another user");
} else {
Dispatch.call(this, "LockObject");
return;
}
}
示例7: getFieldAsInt
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public Integer getFieldAsInt(String field) {
Variant res = Dispatch.call(this, "Field", field);
if (res.isNull() || res.getvt() == Variant.VariantDispatch) {
return null;
} else {
return res.getInt();
}
}
示例8: addItem
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public IAttachment addItem() {
Variant var = new Variant();
var.putNull();
Variant res = Dispatch.call(this, "AddItem", var);
return new Attachment(res.getDispatch());
}
示例9: getFieldAsDate
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public Date getFieldAsDate(String field) {
Variant res = Dispatch.call(this, "Field", field);
double ddate = 0.0;
if (res.isNull()) {
return null;
} else if (res.getvt() == Variant.VariantString) {
logger.warn("Field " + field
+ " should have contained a date but contained a string: "
+ res.getString());
} else {
ddate = res.getDate();
}
Date d = DateUtilities.convertWindowsTimeToDate(ddate);
return d;
}
示例10: ppt2PDF
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
private void ppt2PDF(String inputFile, String pdfFile) {
ActiveXComponent app = new ActiveXComponent("PowerPoint.Application");
// app.setProperty("Visible", msofalse);
Dispatch ppts = app.getProperty("Presentations").toDispatch();
Dispatch ppt = Dispatch.call(ppts, "Open", inputFile, true, // ReadOnly
true, // Untitled指定文件是否有标题
false// WithWindow指定文件是否可见
).toDispatch();
Dispatch.call(ppt, "SaveAs", pdfFile, PPT_VALUE);
Dispatch.call(ppt, "Close");
app.invoke("Quit");
}
示例11: lockObject
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public void lockObject() throws DefectAlreadyLockedException {
if (isLocked()) {
throw new DefectAlreadyLockedException(
"Requirement locked by another user");
} else {
Dispatch.call(this, "LockObject");
return;
}
}
示例12: clientPath
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public void clientPath(String directoryPath) {
Dispatch.call(this.attachmentStorage, "ClientPath");
}
示例13: save
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public void save(String fileName) {
Dispatch.call(this.attachmentStorage, "Save", new Object[] { fileName, Boolean.valueOf(true) });
}
示例14: save
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public void save() {
Dispatch.call(this.bug, "Post");
}
示例15: post
import com.jacob.com.Dispatch; //导入方法依赖的package包/类
public void post()
{
Dispatch.call(this.step, "Post");
}