- 浏览: 88619 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
zq_zero:
很好,不过如果改为用字符串数组来存储迭代结果和判断是否重 ...
Oracle自定义聚合函数实现字符串拼接 -
sea0108:
good。。
Oracle自定义聚合函数实现字符串拼接
引用
/*********************************************************************
*
* TestACS - verifies ACS functionality
* Checks acs server map, dm_acs_config
* Then executes a real world test of the ACS server
*
* author: fabian.lee
*
*
*
* Example compilation in windows
* javac -classpath "c:\progra~1\documentum\shared\dfc.jar;c:\documentum\config;." TestACS.java
*
*
* Example of usage in windows
* java -classpath "c:\progra~1\documentum\shared\dfc.jar;c:\documentum\config;." TestACS mydocbase dmadmin dmpass "/Temp/fabtest.txt"
*
*
*********************************************************************/
import com.documentum.fc.client.*;
import com.documentum.fc.common.*;
import com.documentum.com.*;
import com.documentum.operations.*;
import com.documentum.fc.client.acs.*;
import java.net.*;
import java.io.*;
public class TestACS {
public static void main(String args[]) throws Exception {
TestACS test = new TestACS("aix17","fangh","fangh","/方慧_fangh/33");
}
public TestACS(String docbase,String user,String pass,String objectPath) throws Exception {
//**************************************************************
// Establish session
//**************************************************************
IDfClientX clientx = new DfClientX();
IDfClient client = clientx.getLocalClient();
// get session
IDfLoginInfo loginInfo = clientx.getLoginInfo();
loginInfo.setUser(user);
loginInfo.setPassword(pass);
IDfSessionManager sMgr = client.newSessionManager();
sMgr.setIdentity(docbase,loginInfo);
IDfSession session = sMgr.getSession(docbase);
//**************************************************************
// Pull info from acs server map, checks known status
//**************************************************************
IDfDocbrokerClient dbclient = clientx.getDocbrokerClient();
IDfTypedObject acsmap = dbclient.getAcsServerMap(session.getDocbaseName());
System.out.println("ACS server/status=" + acsmap.getValue("r_host_name") + "/" + acsmap.getValue("r_last_status"));
for (int i = 0; i < acsmap.getAttrCount(); i++) {
IDfAttr attr = acsmap.getAttr(i);
System.out.println("\t" + attr.getName() + "="
+ acsmap.getValueAt(i).toString());
}
//**************************************************************
// Pull base url from dm_acs_config, checks base url for validity
//**************************************************************
IDfCollection coll = null;
IDfQuery query = clientx.getQuery();
query.setDQL("select r_object_id,acs_base_url from dm_acs_config");
coll = query.execute(session,IDfQuery.DF_READ_QUERY);
while(coll.next()) {
String baseURL = coll.getString("acs_base_url");
System.out.println("acs_base_url=" + baseURL);
// now pull this URL and see if we get back a valid response
if(baseURL!=null && baseURL.length()>0) {
URL url = new URL(baseURL);
URLConnection conn = url.openConnection();
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line = null;
while ((line = rd.readLine()) != null) {
System.out.println("ACS returned: " + line);
if("ACS Server is running".equals(line)) {
System.out.println("SUCCESS connecting to acs server at " + baseURL);
}else {
System.out.println("ERROR with response coming from " + baseURL);
}
}
rd.close();
}else {
System.out.println("PROBLEM: there was a problem with the acs_base_url on " + coll.getString("r_object_id"));
}
}
//**************************************************************
// now get object we will test ACS with
//**************************************************************
IDfSysObject docObj = (IDfSysObject) session.getObjectByPath(objectPath);
if(docObj==null)
throw new DfException("could not find object by path: " + objectPath);
//**************************************************************
// Export using ACS URL
//**************************************************************
IDfAcsTransferPreferences atp = clientx.getAcsTransferPreferences();
atp.preferAcsTransfer(true);
IDfExportOperation exportOp = clientx.getExportOperation();
// setting ACS preferences to true in export operation
// means that it won't be exported to the local file system
// and intstead will return ACS URL for download
exportOp.setAcsTransferPreferences(atp);
IDfExportNode exportNode = (IDfExportNode) exportOp.add(docObj);
boolean result = exportOp.execute();
if (result) {
IDfList nodes = exportOp.getNodes();
for (int i = 0, size = nodes.getCount(); i < size; i++) {
IDfExportNode node = (IDfExportNode) nodes.get(i);
IDfEnumeration acsRequests = node.getAcsRequests();
//这里很奇怪,每次都是false
while (acsRequests.hasMoreElements()) {
IDfAcsRequest acsRequest = (IDfAcsRequest) acsRequests
.nextElement();
// get ACS URL
String docURL = acsRequest.makeURL();
System.out.println("docURL= " + docURL + "\r\n");
//**************************************************************
// Now try pulling real content from ACS server
//**************************************************************
URL url = new URL(docURL);
URLConnection conn = url.openConnection();
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line = null;
while ((line = rd.readLine()) != null) {
System.out.println(line);
}
rd.close();
} // each acs request
} // each node
} // successful execution
// release session
sMgr.release(session);
}
}
发表评论
-
调用DFS创建文档报 type dm_literal_expr failed
2012-03-18 16:06 1611调用DFS时报如下错误: [DM_SESSION_W_FET ... -
Assign multiple groups as performer of activity using code in workflow
2012-02-03 17:02 930I determine the groups dynamica ... -
content server
2012-02-02 15:23 702当使用的composer修改属性的相关约束条件,比如是否为空, ... -
dfc session Monitor
2012-01-31 10:53 987You can enable logging on the s ... -
DFC Session Management Srinivas Jakkula
2012-01-19 14:02 1661摘要:这个文档从application出发,介绍DFC Ses ... -
Documentum
2012-01-04 18:35 874查询所有需要在属性页要显示的属性 select r_o ... -
query attribute map dictionary
2011-12-28 13:15 774select map_display_string, map_ ... -
Invoking UCF in custom import component
2011-12-28 13:09 11591)I have made some changes in t ... -
When open tasklist form, it pops up exception casued by [DM_SESSION_E_SETUP_ROLE
2011-12-28 13:05 2355Symptoms An error has occurr ... -
dfc trace performance anaysis
2011-09-14 09:57 10741)设置dfc.properties enable dfc t ... -
Tuning the Performance of documentum UCF Content Transfer
2011-05-27 09:12 3128In Documentum applications, the ... -
Add or delete a custom attribute
2011-03-22 10:43 7291)alter type <custom_type&g ... -
Some basic guidelines for setting the J2EE Application Server JVM memory
2011-03-21 14:40 2351Please refer to WDK/Webtop depl ... -
type attribute label is not localized
2011-03-09 16:41 872you will have to clear cache an ... -
Tuning the Performance of UCF Content Transfer
2011-03-07 17:04 1297Tuning the Performance of UCF C ... -
无法保存preset
2010-11-15 16:56 859错误图见附件。 解决方法: 确认dm ... -
DUMP AND LOAD A DOCBASE
2010-11-05 09:50 1010http://www.bluefishgroup.com/li ... -
jobs Window Interval parameter
2010-10-29 10:05 1033"The Window Interval. When ... -
DFC own Administrator permission
2010-10-27 14:54 7321.add user to dm_superusers_dyn ... -
install webtop.dar error
2010-10-17 15:25 1034com.emc.ide.installer.InstallEx ...
相关推荐
SETUP_ERROR_OS_NOT_SUPPORTED 0x20000001 Operating system is not supported SETUP_ERROR_WINNT4_SP6_REQUIRED 0x20000002 Windows NT 4.0 Service Pack 6 is required SETUP_ERROR_UNEXPECTED 0x20000003 ...
ACS杂志的latex模板,ACS杂志官方上下载的模板一直报错,can not find ghsystem_english.def文件。
This is a program that mixed ACS
matlab编写的蚁群优化tsp程序,很不错,希望大家喜欢
This is manipulated code for ant colonies it can solve a kind of tsp
cisco ACS5.8配置手册,主要是关于ACS的一些常用功能,ACS打补丁,ACS HA,ACS与域联动,查看日志,ACS备份与还原
ACS880 基本控制程序固件手册,ACS880 用户手册
ACS详细配置手册,可以轻松配置ACS来搭建认证服务器
ATA8-ACS2协议,在ACS的基础上的补充,对做SATA SSD的有帮助
讲述ACS文献导入ENDNOTE方法讲述ACS文献导入ENDNOTE方法
Cisco Secure ACS 4.0,已安装测试, Windows server 2003 下可用
亲测有用高效 CiscoACS5.8配置手册.pdf
ACS5.0版本使用说明背景信息 您能使用可下载的IP ACL为了创建套您能适用于许多用户或用户组的ACL定义。这些 ACL 定义集称为 ACL 内容。 可下载 IP ACL 的运行方式如下: 当ACS准许对网络时的一次用户访问, ...
内含两个授权,一个是acs5.6_base,另一个是acs5.6_feature,亲测可用!
openacs 编译版,亲测好用,下载得到的Openacs-0.4-bin中包含了acs.ear,需要部署到JBOSS中才可以运行,首先将openacs解压到/opt中,将acs.ear拷贝到jboss/server/default/deploy/下面
ACS712中文资料,电流检测芯片,用于工程设计。
800变频器ACS800-04-210参数表(含参数)
ACS5.2 第二部分 安装ACS5.2.pptx
ACS控制器调试用户指南手册
关于ACS控制器的范例,可以做些参考关于ACS控制的。