- 博客(47)
- 收藏
- 关注
原创 查询某个状态的最新版本对象
public static Persistable getPersistable(String number,Class clazz, String stateStr) throws WTException {QueryResult result = null;try { QuerySpec queryspec = new QuerySpec(clazz); LifeCycleConfigS
2010-03-05 10:37:00
479
原创 判断Part是否存在某个分类属性
public static boolean hasIBAAttributeInClassificationNode(WTPart part ,String ibaName) throws WTException{boolean hasIBA = false ;IBAUtil ibaUtil = new IBAUtil(part);ClassificationNodeDefaultView view
2010-03-04 16:33:00
454
原创 判断指定对象的类型中是否具有指定的IBA属性
public static boolean hasIBAAttributeInObjType(Object obj, String ibaName){ boolean hasIBA = false ; try { TypeIdentifier typeIdentifier = TypedUtilityServiceHelper.service.getTypeIdentifier
2010-03-04 16:31:00
549
原创 删除最新版本数据
public static void delLatestObject(Versioned version) throws PersistenceException, WTException { if (version == null) return; QueryResult queryresult = VersionControlHelper.se
2010-03-04 14:16:00
334
原创 revise object
public static RevisionControlled upgradeObject (RevisionControlled object) { RevisionControlled reviseObject = null; String foldername = object.getLocation(); WTContainerRef cabref = null; if (obj
2010-03-04 14:12:00
298
原创 将升级目标对象更新到最新的版本2
else if (!VersionControlHelper.isLatestIteration((Iterated) promotable)) { promotable = (Promotable) VersionControlHelper .getLatestIteration((Iterated) promotable); if (promotable in
2010-03-04 14:06:00
531
原创 将升级目标对象更新到最新的版本1
public static void updateLastedPromotable(PromotionNotice promotionNotice) throws WTException { QueryResult qr = MaturityHelper.service.getPromotionTargets(promotionNotice, false); WTHashSet newHash
2010-03-04 14:01:00
510
原创 修改对象的版本
VersionIdentifier vc = VersionControlHelper .getVersionIdentifier((Versioned) part); MultilevelSeries mls = vc.getSeries(); mls.setValueWithoutValidating(version); VersionIdentifier newV
2010-02-08 12:46:00
348
原创 ajax3
String plselect = request.getParameter("plselect"); PBIResourceCategoryProcess process = new PBIResourceCategoryProcess(); QueryResult pmResult = null; if(plselect!=null&&!plselect.equals("")){ p
2009-11-18 17:57:00
288
原创 ajax2
function sendRequest(targetURL,param,callbackMethod) { if (receiveReq.readyState == 4 || receiveReq.readyState == 0) { receiveReq.open("POST", targetURL, true); receiveReq.onreadystatechange
2009-11-18 17:54:00
281
原创 ajax1
var receiveReq=createXMLHttpRequest(); function createXMLHttpRequest(){ var httprequest=false; if (window.XMLHttpRequest) { httprequest=new XMLHttpRequest(); if (httprequest.ov
2009-11-18 17:40:00
248
原创 Apache认证
允许设置的IP可访问WC/conf/extra/app-Windchill.conf如下:Options Indexes FollowSymLinksallow from 127.0.0.1allow from 10.73.134.116deny from all
2009-11-17 14:39:00
358
原创 解压文件2
if (parent != null && (!parent.exists())) { parent.mkdirs();}FileOutputStream fos = new FileOutputStream(file);BufferedOutputStream bos = new BufferedOutputStream(fos, BUFFER);int
2009-11-16 15:35:00
234
原创 解压文件1
//unZipFile("D:", new File("D://zipfilename.zip")); public static boolean unZipFile(String unZipPath, File zFile) { int BUFFER = 2048; try { ZipFile zipFile = new ZipFile(
2009-11-16 15:34:00
276
原创 压缩文件2
public static void zip(ZipOutputStream out, File f, String base, String zipname){ if (f.isDirectory()) { File[] fl = f.listFiles(); out.putNextEntry(ZipEntry(b
2009-11-16 15:20:00
301
原创 压缩文件1
/** * zip("D://zipfilename.zip", new File("D://项目文档//sql"), ""); */ public static void zip(String zipFileName, File inputFile, String zipname) throws Exception { ZipOutpu
2009-11-16 15:17:00
419
原创 子查询2
QuerySpec subselect = new QuerySpec(); int index_stringvalue = subselect.appendClassList(wt.iba.value.StringValue.class, false); ClassAttribute ida3a6 = new ClassAttribute(wt.iba
2009-11-16 12:09:00
475
原创 子查询1
//select name from Stringdefinition where ida2a2 in (select ida3a6 from stringvalue where ida3a4=500812) public static void searchIBAofDocument(String definition) throws Exception { QueryS
2009-11-16 12:08:00
361
原创 query3
//也可以用上面的方式进行关联 qs.appendJoin(resourceCateLinkIndex, ResourceCategoryLink.SUB_CATEGORY_ROLE, sub_resourceCateIndex); qs.appendJoin(resourceCateLinkIndex, ResourceCategoryLink.CA
2009-11-04 10:41:00
404
原创 query2
TableColumn categorytype= new TableColumn(aliases[1],"categorytype"); TableColumn categoryvalue= new TableColumn(aliases[1],"categoryvalue"); qs.appendSelect(categoryvalue, fals
2009-11-04 10:40:00
485
原创 query1
/** * SELECT A0.categoryvalue,A1.categoryvalue * FROM ResourceCategory A0,ResourceCategory A1, * ResourceCategoryLink A2 * WHERE (A1.categorytype = 1) AND (A0.categorytype =
2009-11-04 10:38:00
313
原创 创建域规则7
if (temp[2].equals("+")) { createAccessControlRule(domainRef, className, lifeCycleState, principalRef, vPermission, null); }
2009-11-03 11:06:00
226
原创 创建域规则8
private static void createAccessControlRule(AdminDomainRef ref, String className, String lifeCycleState, WTPrincipalReference principalRef, Vector permission, Vector decline) th
2009-11-03 11:06:00
255
原创 创建域规则6
else if (temp[3].equalsIgnoreCase("OWNER")) { principalRef = WTPrincipalReference .newWTPrincipalReference(WTPrincipalReference.OWNER); } e
2009-11-03 10:59:00
248
原创 创建域规则5
else if (accessPrmission.equalsIgnoreCase("REVISE")) { vPermission.add(AccessPermission.REVISE); } else if (accessPrmission.equalsIgnoreCase("NEW_VIEW
2009-11-03 10:58:00
208
原创 创建域规则4
else if (accessPrmission.equalsIgnoreCase("CREATE")) { vPermission.add(AccessPermission.CREATE); } else if (accessPrmission.equalsIgnoreCase("DELETE")
2009-11-03 10:56:00
246
原创 创建域规则3
for (int i = 0; i { String accessPrmission = arrayPermission[i]; if (accessPrmission.equalsIgnoreCase("ALL")) { vPermission.
2009-11-03 10:43:00
225
原创 创建域规则2
//创建一条域规则 public static void createRule(String line) throws WTException { try { String[] temp = line.split(","); AdminDomainRef domainRef = Administrativ
2009-11-03 10:26:00
265
原创 创建域规则1
CSV文件:,wt.folder.SubFolder,+,BOMMaintainer,modify/read,,ext.NEWECR,+,BusinessAdministrators,ALL,,ext.NEWECR,+,组,create,INWORK,ext.NewPart,-,PUBQUERY,ALL,ALL
2009-11-03 10:25:00
308
原创 任务中给出设置参与者链接
String img = ""; setSE = pcbWfUtil.buildSetPartner(wfprocess,"SE",img,"给SE指定用户"); public String buildSetPartner(WfProcess wfprocess, String roleKey, String img, String desc) th
2009-11-02 15:20:00
470
原创 用Sun OneLdap的API查询群组3
public int createGroup(String groupName, DirContext ctx) { // 查找该组是否已经存在 ArrayList vec = searchGroup(ctx, groupName); if (vec.size() > 0) { return 1; } try { Attributes attrs = new Basic
2009-10-31 18:03:00
301
原创 用Sun OneLdap的API查询群组2
DirContext dirContext = connectLDAPServer("", propertyTable); public ArrayList searchGroup(DirContext ctx, String groupName) { ArrayList returnvec = new ArrayList(); try { // 设置查找范围为所有子树
2009-10-31 17:59:00
282
原创 用Sun OneLdap的API查询群组1
LDAP_SERVER=ldap/://zkf16627.china.com/:4444/BASE_DN=o~pdm.comGROUP_DN=ou~pdm groupsGROUP_BASE_DN=ou~pdm groups,o~pdm.comUSER_BASE_DN=ou~People,o~pdm.comDEFAULT_PASSWORD=ldapmanagerSECURITY_AUTHENTIC
2009-10-31 17:55:00
479
原创 调用aix下的sh文件
public void process() { File wd = new File("/bin"); System.out.println(wd); String cmdPath = "cd /pdmdata2/cluster1/apps"; Process proc = null; try {
2009-10-28 18:00:00
1171
原创 调用aix下的sh文件
public void process() { File wd = new File("/bin"); System.out.println(wd); String cmdPath = "cd /pdmdata2/cluster1/apps"; Process proc = null; try { //确定
2009-10-28 17:00:00
1001
原创 调用bat
/** * 调用bat文件 */ public static void refreshBat() { //对于某些bat文件需要在固定目录下才能执行,就必须定义File对象 File wd = new File("C://ptc//Windchill_8.0//bin"); System.out.println(wd);
2009-10-28 16:56:00
322
原创 create queue
public static void createQueue() throws WTException{ ScheduleQueue category = (ScheduleQueue) QueueHelper.manager.getQueue( "New Queue for Test", wt.queue.ScheduleQueue.class); if (category ==
2009-10-19 20:23:00
639
原创 checkout obj
/** * 检出workable对象 * @param workable 实现workable接口的实例 * @throws WTException * @throws WTPropertyVetoException */ public static Workable checkoutObj(Workable workable) throws WT
2009-10-19 20:18:00
479
原创 wenjianjia
/** * 创建文件夹 * * @param folder 文件夹名称 * @return SubFolder 文件夹 * @throws WTException */ public static SubFolder createSubFolder(String folder) throws WTException {
2009-10-16 18:37:00
623
原创 cabinet
/** * 创建文件柜 * @param cabinetName 文件柜名称 * @param ref 域 * @return Cabinet 文件柜 */ public static Cabinet createCabinet(String cabinetName, AdminDomainRef ref) throw
2009-10-16 18:36:00
431
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人