/** * Gets the distinguished name of the entry object returned. * * @return the Dn of the entry returned. */ @Override public Dn getObjectName() { return entry == null ? null : entry.getDn(); }
/** * Gets the distinguished name of the entry to add. * * @return the Dn of the added entry. */ @Override public Dn getEntryDn() { return entry.getDn(); }
/** * {@inheritDoc} */ @NotNull @Override public Iterable<ExternalIdentityRef> getDeclaredGroups() throws ExternalIdentityException { if (groups == null) { groups = provider.getDeclaredGroupRefs(ref, entry.getDn().getName()); } return groups.values(); }
/** * {@inheritDoc} */ public Attribute put( AttributeType attributeType, byte[]... values ) throws LdapException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13237_ENTRY_IMMUTABLE_CANT_PUT_VALUE, entry.getDn() ) ); }
/** * {@inheritDoc} */ @Override public Attribute put( String upId, AttributeType attributeType, Value... values ) throws LdapException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13237_ENTRY_IMMUTABLE_CANT_PUT_VALUE, entry.getDn() ) ); }
/** * {@inheritDoc} */ @Override public boolean remove( AttributeType attributeType, Value... values ) throws LdapException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13238_ENTRY_IMMUTABLE_CANT_REMOVE_VALUE, entry.getDn() ) ); }
@NotNull @Override public Iterable<ExternalIdentityRef> getDeclaredMembers() throws ExternalIdentityException { if (members == null) { members = provider.getDeclaredMemberRefs(ref, entry.getDn().getName()); } return members.values(); } }
/** * {@inheritDoc} */ @Override public Entry add( AttributeType attributeType, Value... values ) throws LdapException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13236_ENTRY_IMMUTABLE_CANT_ADD_ATTRIBUTE, entry.getDn() ) ); }
/** * {@inheritDoc} */ public Entry add( String upId, AttributeType attributeType, byte[]... values ) throws LdapException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13236_ENTRY_IMMUTABLE_CANT_ADD_ATTRIBUTE, entry.getDn() ) ); }
/** * {@inheritDoc} */ @Override public Entry add( String upId, AttributeType attributeType, String... values ) throws LdapException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13236_ENTRY_IMMUTABLE_CANT_ADD_ATTRIBUTE, entry.getDn() ) ); }
/** * {@inheritDoc} */ @Override public Entry add( String upId, String... values ) throws LdapException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13236_ENTRY_IMMUTABLE_CANT_ADD_ATTRIBUTE, entry.getDn() ) ); }
/** * {@inheritDoc} */ @Override public Attribute put( String upId, String... values ) { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13237_ENTRY_IMMUTABLE_CANT_PUT_VALUE, entry.getDn() ) ); }
/** * {@inheritDoc} */ @Override public void setDn( Dn dn ) { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13239_ENTRY_IMMUTABLE_CANT_RENAME_ENTRY, entry.getDn() ) ); }
/** * Deserialize an entry. * * @param in The buffer containing the serialized serverEntry * @throws IOException if there was a problem when deserializing * @throws ClassNotFoundException if we can't deserialize an expected object */ public void deserialize( ObjectInput in ) throws IOException, ClassNotFoundException { new Exception().printStackTrace(); throw new NotImplementedException( I18n.err( I18n.ERR_13243_ENTRY_IMMUTABLE_CANT_DESERIALIZE, entry.getDn() ) ); }
void findEntry(LdapConnection connection, Entry entry, StringBuilder sb) throws LdapException, CursorException { sb.append(LdifUtils.convertToLdif(entry)); sb.append("\n"); EntryCursor cursor = connection.search(entry.getDn(), "(ObjectClass=*)", SearchScope.ONELEVEL, "*", "+"); while (cursor.next()) { findEntry(connection, cursor.get(), sb); } }
/** * Send the result to the consumer. If the consumer has disconnected, we fail back to the queue. */ private void sendResult( SearchResultEntry searchResultEntry, Entry entry, EventType eventType, SyncStateValue syncStateValue ) { searchResultEntry.addControl( syncStateValue ); LOG.debug( "sending event {} of entry {}", eventType, entry.getDn() ); WriteFuture future = session.getIoSession().write( searchResultEntry ); // Now, send the entry to the consumer handleWriteFuture( future, entry, eventType ); }
public Entry toClientEntry() throws LdapException { // Copy the Dn Entry clientEntry = new DefaultEntry( clonedEntry.getDn() ); // Convert each attribute for ( Attribute clonedEntry : this ) { Attribute clientAttribute = clonedEntry.clone(); clientEntry.add( clientAttribute ); } return clientEntry; }
@Test public void testGetUserByUserId() throws Exception { ExternalUser user = idp.getUser(TEST_USER1_UID); assertNotNull("User 1 must exist", user); assertEquals("User Ref", TEST_USER1_DN, ((LdapUser)user).getEntry().getDn().getName()); }
@Test public void testGetGroupByName() throws Exception { ExternalGroup group = idp.getGroup(TEST_GROUP1_NAME); assertNotNull("Group 1 must exist", group); assertEquals("Group Ref", TEST_GROUP1_DN, ((LdapIdentity)group).getEntry().getDn().getName()); }