当前位置: 首页>>代码示例>>Java>>正文


Java LDAPException类代码示例

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


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

示例1: rename

import com.novell.ldap.LDAPException; //导入依赖的package包/类
@Override
public void rename(RenameInterceptorChain chain, DistinguishedName dn,
		DistinguishedName newRdn, DistinguishedName newParentDN,
		Bool deleteOldRdn, LDAPConstraints constraints)
		throws LDAPException {
	
	try {
		Thread.sleep(5000);
	} catch (InterruptedException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	chain.nextRename(dn, newRdn, newParentDN, deleteOldRdn, constraints);
	
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:17,代码来源:WaitInsert.java

示例2: search

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void search(SearchInterceptorChain chain, DistinguishedName base,
		Int scope, Filter filter, ArrayList<Attribute> attributes,
		Bool typesOnly, Results results, LDAPSearchConstraints constraints)
		throws LDAPException {
	
	StringBuffer buf = new StringBuffer();
	Iterator<Attribute> it = attributes.iterator();
	while (it.hasNext()) {
		buf.append(it.next().getAttribute().getName()).append(' ');
	}
	
	log("Begin Seach - Filter=" + filter.getValue() + ";Base=" + base.toString() + ";Scope=" + scope.getValue() + ";Attributes=" + buf.toString());
	
	try {
		chain.nextSearch(base,scope,filter,attributes,typesOnly,results,constraints);
	} catch (Throwable t) {
		log("Error Running Search",t);
		if (t instanceof LDAPException) {
			throw ((LDAPException) t);
		} else {
			throw new RuntimeException(t);
		}
	} finally {
		log("Seach submitted");
	}
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:27,代码来源:DumpTransaction.java

示例3: postSearchComplete

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void postSearchComplete(PostSearchCompleteInterceptorChain chain,
		DistinguishedName base, Int scope, Filter filter,
		ArrayList<Attribute> attributes, Bool typesOnly,
		LDAPSearchConstraints constraints) throws LDAPException {
	
	log("Begin Post Search Complete - Filter=" + filter.getValue() + ";Base=" + base.toString() + ";Scope=" + scope.getValue() + ";Attributes=" + attributes);
	
	try {
	chain.nextPostSearchComplete(base,scope,filter,attributes,typesOnly,constraints);
	} catch (Throwable t) {
		log("Post Search Complete Error",t);
		if (t instanceof LDAPException) {
			throw ((LDAPException) t);
		} else {
			throw new RuntimeException(t);
		}
	} finally {
		log("Post Search Complete Complete");
	}

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:22,代码来源:DumpTransaction.java

示例4: modify

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void modify(ModifyInterceptorChain chain, DistinguishedName dn,
		ArrayList<LDAPModification> mods, LDAPConstraints constraints)
		throws LDAPException {
	Connection con = null;
	
	try {
		con = this.getCon();
		this.loadRequest(chain, con);
		chain.nextModify(dn, mods, constraints);
	} catch (Throwable t) {
		if (t instanceof LDAPException) {
			throw (LDAPException) t;
		} else {
			throw new LDAPException("Error",LDAPException.OPERATIONS_ERROR,"Error",t);
		}
		
	} finally {
		unloadRequest(chain, con);
	}

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:22,代码来源:JdbcInsert.java

示例5: add

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void add(AddInterceptorChain chain, Entry entry,
		LDAPConstraints constraints) throws LDAPException {
	Connection con = null;
	
	try {
		con = this.getCon();
		loadRequest(chain, con);
		chain.nextAdd(entry, constraints);
	} catch (Throwable t) {
		if (t instanceof LDAPException) {
			throw (LDAPException) t;
		} else {
			throw new LDAPException("Error",LDAPException.OPERATIONS_ERROR,"Error",t);
		}
		
	} finally {
		unloadRequest(chain, con);
		returnCon(con);
	}
	

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:23,代码来源:JdbcInsert.java

示例6: delete

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void delete(DeleteInterceptorChain chain, DistinguishedName dn,
		LDAPConstraints constraints) throws LDAPException {
	DistinguishedName bindDN = (DistinguishedName) chain.getSession().get("MYVD_BINDDN");
	boolean didMap = false;
	if (bindDN != null) {
		String newDN = mapInboundDN(bindDN.getDN().toString());
		if (newDN != null) {
			DistinguishedName ndn = new DistinguishedName(newDN);
			chain.setBindDN(ndn);
			chain.getSession().put("MYVD_BINDDN",ndn );
			didMap = true;
		}
	}
	
	chain.nextDelete(dn, constraints);
	
	if (didMap) {
		chain.getSession().put("MYVD_BINDDN", bindDN);
		chain.setBindDN(bindDN);
	}

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:23,代码来源:StaticDNMap.java

示例7: configure

import com.novell.ldap.LDAPException; //导入依赖的package包/类
@Override
public void configure(String name, Properties props, NameSpace nameSpace) throws LDAPException {
	this.name = name;
	this.nameSpace = nameSpace;
	this.oldFilterName = "myvd.vmemberof.orig.filter." + name;
	this.skipPostSearchName = "myvd.vmemberof.skip." + name;
	this.searchBase = props.getProperty("searchBase");
	this.applyToObjectClass = props.getProperty("applyToObjectClass");
	this.attributeName = props.getProperty("attributeName");
	this.searchObjectClass = props.getProperty("searchObjectClass");
	this.searchAttribute = props.getProperty("searchAttribute");
	
	this.replace = props.getProperty("replace","false").equalsIgnoreCase("true");
	
	LDAPAttribute oc = new LDAPAttribute("objectClass");
	oc.addValue("top");
	oc.addValue(this.applyToObjectClass);


}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:21,代码来源:VirtualMemberOf.java

示例8: rename

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void rename(RenameInterceptorChain chain, DistinguishedName dn,
		DistinguishedName newRdn, DistinguishedName newParentDN,
		Bool deleteOldRdn, LDAPConstraints constraints)
		throws LDAPException {
	DistinguishedName bindDN = (DistinguishedName) chain.getSession().get("MYVD_BINDDN");
	boolean didMap = false;
	if (bindDN != null) {
		String newDN = mapInboundDN(bindDN.getDN().toString());
		if (newDN != null) {
			DistinguishedName ndn = new DistinguishedName(newDN);
			chain.setBindDN(ndn);
			chain.getSession().put("MYVD_BINDDN",ndn );
			didMap = true;
		}
	}
	
	chain.nextRename(dn, newRdn, newParentDN, deleteOldRdn, constraints);

	if (didMap) {
		chain.getSession().put("MYVD_BINDDN", bindDN);
		chain.setBindDN(bindDN);
	}
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:24,代码来源:StaticDNMap.java

示例9: testValidateNonPrived

import com.novell.ldap.LDAPException; //导入依赖的package包/类
@Test
public void testValidateNonPrived() throws Exception {
	//this should fail
	
	LDAPConnection con = new LDAPConnection();
	con.connect("localhost", 50983);
	
	try {
		con.delete("uid=tuser1,ou=people,dc=domain,dc=com");
		fail("Should not be able to delete");
	} catch (LDAPException e) {
		//worked
	} finally {
		con.disconnect();
	}
	
	
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:19,代码来源:TestStaticDNMap.java

示例10: extendedOperation

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void extendedOperation(ExetendedOperationInterceptorChain chain,
		ExtendedOperation op, LDAPConstraints constraints)
		throws LDAPException {
	try {
		chain.nextExtendedOperations(op,constraints); 
	} catch (LDAPReferralException r) {
		String ns = this.getNS(r);
		if (ns == null) {
			throw r;
		} else {
			chain.getRequest().put(RequestVariables.ROUTE_NAMESPACE,ns);
			chain.nextExtendedOperations(op,constraints);
		}
		
	}

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:18,代码来源:ReferallInterceptor.java

示例11: postSearchComplete

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void postSearchComplete(PostSearchCompleteInterceptorChain chain,
		DistinguishedName base, Int scope, Filter filter,
		ArrayList<Attribute> attributes, Bool typesOnly,
		LDAPSearchConstraints constraints) throws LDAPException {
	chain.nextPostSearchComplete(base,scope,filter,attributes,typesOnly,constraints);

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:8,代码来源:FlattenNamespace.java

示例12: postSearchEntry

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void postSearchEntry(PostSearchEntryInterceptorChain chain,
		Entry entry, DistinguishedName base, Int scope, Filter filter,
		ArrayList<Attribute> attributes, Bool typesOnly,
		LDAPSearchConstraints constraints) throws LDAPException {
	// TODO Auto-generated method stub

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:8,代码来源:RootDSE.java

示例13: extendedOperation

import com.novell.ldap.LDAPException; //导入依赖的package包/类
@Override
public void extendedOperation(ExetendedOperationInterceptorChain chain,
		ExtendedOperation op, LDAPConstraints constraints)
		throws LDAPException {
	throw new LDAPException("Schema is search only",LDAPException.LDAP_NOT_SUPPORTED,"");

}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:8,代码来源:SchemaInsert.java

示例14: delete

import com.novell.ldap.LDAPException; //导入依赖的package包/类
public void delete(DistinguishedName dn,LDAPConstraints constraints) throws LDAPException {
	this.initRequest();
	this.request = new HashMap<Object,Object>();
	
	DeleteInterceptorChain deleteChain;
	
	if (this.ns.isGlobal()) {
		deleteChain = new DeleteInterceptorChain(this.bindDN,this.pass,this.pos,this.ns.getChain(),this.session,this.request,this.ns.getRouter());
	} else {
		deleteChain = new DeleteInterceptorChain(this.bindDN,this.pass,this.pos,this.ns.getChain(),this.session,this.request);
	}
	
	deleteChain.nextDelete(dn, constraints);
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:15,代码来源:ConnectionUtil.java

示例15: getLocalBackendsWrite

import com.novell.ldap.LDAPException; //导入依赖的package包/类
private NameSpace getLocalBackendsWrite(InterceptorChain chain, String dn, boolean isRename) throws LDAPException {
	NameSpace curr;
	String key = null;
	
	if (isRename) {
		key = RequestVariables.ROUTE_NAMESPACE_RENAME;
	} else {
		key = RequestVariables.ROUTE_NAMESPACE;
	}
	
	if (! chain.getRequest().containsKey(key)) {
		
   		
		//logger.info("DN : " + dn);
		Level level = this.getLevel(new DN(dn));
       	
       	if (level == null) {
       		throw new LDAPException(LDAPException.resultCodeToString(LDAPException.NO_SUCH_OBJECT),LDAPException.NO_SUCH_OBJECT,"");
       	}
       	
       	Iterator<NameSpace> it = level.backends.iterator();
       	
   		curr = it.next();
   	} else {
   		curr = this.backends.get(chain.getRequest().get(key));
   	}
	return curr;
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:29,代码来源:Router.java


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