static ExprNode getReferralFilter() { return new SimpleNode( OBJCLASS_ATTR, REFERRAL_OC, LeafNode.EQUALITY ); }
private void initialize() throws NamingException { // search all naming contexts for access control subentenries // generate ACITuple Arrays for each subentry // add that subentry to the hash Iterator suffixes = nexus.listSuffixes(); while ( suffixes.hasNext() ) { String suffix = ( String ) suffixes.next(); LdapDN baseDn = parseNormalized( suffix ); ExprNode filter = new SimpleNode( OC_ATTR, ACSUBENTRY_OC, SimpleNode.EQUALITY ); SearchControls ctls = new SearchControls(); ctls.setSearchScope( SearchControls.SUBTREE_SCOPE ); NamingEnumeration results = nexus.search( baseDn, env, filter, ctls ); while ( results.hasMore() ) { SearchResult result = ( SearchResult ) results.next(); String subentryDn = result.getName(); Attribute aci = result.getAttributes().get( ACI_ATTR ); if ( aci == null ) { log.warn( "Found accessControlSubentry '" + subentryDn + "' without any " + ACI_ATTR ); continue; } LdapDN normName = parseNormalized( subentryDn ); subentryAdded( subentryDn, normName, result.getAttributes() ); } results.close(); } }
filter.addNode( new SimpleNode( OC_ATTR, GROUPOFNAMES_OC, SimpleNode.EQUALITY ) ); filter.addNode( new SimpleNode( OC_ATTR, GROUPOFUNIQUENAMES_OC, SimpleNode.EQUALITY ) );
ExprNode filter = new SimpleNode( "objectclass", "subentry", LeafNode.EQUALITY ); SearchControls controls = new SearchControls(); controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
if ( simpleNode.getValue() instanceof String ) newLeaf = new SimpleNode( descendant.getOid(), ( String ) simpleNode.getValue(), simpleNode.getAssertionType() ); newLeaf = new SimpleNode( descendant.getOid(), ( byte[] ) simpleNode.getValue(), simpleNode.getAssertionType() ); newLeaf = new SimpleNode( descendant.getOid(), simpleNode.getValue().toString(), simpleNode.getAssertionType() );
node = new SimpleNode( attr.getID(), ( byte [] ) value, SimpleNode.EQUALITY ); node = new SimpleNode( attr.getID(), ( String ) value, SimpleNode.EQUALITY ); node = new SimpleNode( attr.getID(), ( String ) val, SimpleNode.EQUALITY ); filter.addNode( node );
if ( simpleNode.getValue() instanceof String ) newLeaf = new SimpleNode( descendant.getOid(), ( String ) simpleNode.getValue(), simpleNode.getAssertionType() ); newLeaf = new SimpleNode( descendant.getOid(), ( byte[] ) simpleNode.getValue(), simpleNode.getAssertionType() ); newLeaf = new SimpleNode( descendant.getOid(), simpleNode.getValue().toString(), simpleNode.getAssertionType() );