/** * Returns an enumeration containing the zero or more attributes in the * collection. The behavior of the enumeration is not specified if the * attribute collection is changed. * * @return an enumeration of all contained attributes */ @Override public Iterator<Attribute> iterator() { return entry.iterator(); }
/** * Returns an enumeration containing the zero or more attributes in the * collection. The behavior of the enumeration is not specified if the * attribute collection is changed. * * @return an enumeration of all contained attributes */ @Override public Iterator<Attribute> iterator() { return entry.iterator(); }
/** * Returns an enumeration containing the zero or more attributes in the * collection. The behavior of the enumeration is not specified if the * attribute collection is changed. * * @return an enumeration of all contained attributes */ @Override public Iterator<Attribute> iterator() { return entry.iterator(); }
/** * Returns an enumeration containing the zero or more attributes in the * collection. The behavior of the enumeration is not specified if the * attribute collection is changed. * * @return an enumeration of all contained attributes */ @Override public Iterator<Attribute> iterator() { return entry.iterator(); }
/** * Returns an enumeration containing the zero or more attributes in the * collection. The behavior of the enumeration is not specified if the * attribute collection is changed. * * @return an enumeration of all contained attributes */ @Override public Iterator<Attribute> iterator() { return entry.iterator(); }
/** * Returns an enumeration containing the zero or more attributes in the * collection. The behavior of the enumeration is not specified if the * attribute collection is changed. * * @return an enumeration of all contained attributes */ @Override public Iterator<Attribute> iterator() { return entry.iterator(); }
public Iterator<Attribute> iterator() { return clonedEntry.iterator(); }
public Object[] getElements( Object inputElement ) { List<AttributeValueObject> elements = new ArrayList<AttributeValueObject>(); Entry entry = ( Entry ) inputElement; Iterator<Attribute> attributes = entry.iterator(); while ( attributes.hasNext() ) { Attribute attribute = attributes.next(); Iterator<Value<?>> values = attribute.iterator(); while ( values.hasNext() ) { Value<?> value = values.next(); elements.add( new AttributeValueObject( attribute.getId(), value.getString() ) ); } } return elements.toArray(); }
public Object[] getElements( Object inputElement ) { List<AttributeValueObject> elements = new ArrayList<AttributeValueObject>(); Entry entry = ( Entry ) inputElement; Iterator<Attribute> attributes = entry.iterator(); while ( attributes.hasNext() ) { Attribute attribute = attributes.next(); Iterator<Value<?>> values = attribute.iterator(); while ( values.hasNext() ) { Value<?> value = values.next(); elements.add( new AttributeValueObject( attribute.getId(), value.getString() ) ); } } return elements.toArray(); }
public Object[] getElements( Object inputElement ) { List<AttributeValueObject> elements = new ArrayList<AttributeValueObject>(); Entry entry = ( Entry ) inputElement; Iterator<Attribute> attributes = entry.iterator(); while ( attributes.hasNext() ) { Attribute attribute = attributes.next(); Iterator<Value<?>> values = attribute.iterator(); while ( values.hasNext() ) { Value<?> value = values.next(); elements.add( new AttributeValueObject( attribute.getId(), value.getString() ) ); } } return elements.toArray(); }
public Object[] getElements( Object inputElement ) { List<AttributeValueObject> elements = new ArrayList<AttributeValueObject>(); Entry entry = ( Entry ) inputElement; Iterator<Attribute> attributes = entry.iterator(); while ( attributes.hasNext() ) { Attribute attribute = attributes.next(); Iterator<Value<?>> values = attribute.iterator(); while ( values.hasNext() ) { Value<?> value = values.next(); elements.add( new AttributeValueObject( attribute.getId(), value.getString() ) ); } } return elements.toArray(); }
/** * Converts an {@link Entry} to an {@link Attributes}. * * @param entry * the {@link Entry} to convert * @return * the equivalent {@link Attributes} */ public static Attributes toAttributes( Entry entry ) { if ( entry != null ) { Attributes attributes = new BasicAttributes( true ); // Looping on attributes for ( Iterator<Attribute> attributeIterator = entry.iterator(); attributeIterator.hasNext(); ) { Attribute entryAttribute = attributeIterator.next(); attributes.put( toJndiAttribute( entryAttribute ) ); } return attributes; } return null; }
/** * Converts an {@link Entry} to an {@link Attributes}. * * @param entry * the {@link Entry} to convert * @return * the equivalent {@link Attributes} */ public static Attributes toAttributes( Entry entry ) { if ( entry != null ) { Attributes attributes = new BasicAttributes( true ); // Looping on attributes for ( Iterator<Attribute> attributeIterator = entry.iterator(); attributeIterator.hasNext(); ) { Attribute entryAttribute = attributeIterator.next(); attributes.put( toJndiAttribute( entryAttribute ) ); } return attributes; } return null; }
/** * Converts an {@link Entry} to an {@link Attributes}. * * @param entry * the {@link Entry} to convert * @return * the equivalent {@link Attributes} */ public static Attributes toAttributes( Entry entry ) { if ( entry != null ) { Attributes attributes = new BasicAttributes( true ); // Looping on attributes for ( Iterator<Attribute> attributeIterator = entry.iterator(); attributeIterator.hasNext(); ) { Attribute entryAttribute = attributeIterator.next(); attributes.put( toJndiAttribute( entryAttribute ) ); } return attributes; } return null; }
/** * {@inheritDoc} */ @Override public void modify( Entry entry, ModificationOperation modOp ) throws LdapException { if ( entry == null ) { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04140_NULL_ENTRY_MODIFY ) ); } throw new IllegalArgumentException( I18n.err( I18n.ERR_04133_NULL_MODIFIED_ENTRY ) ); } ModifyRequest modReq = new ModifyRequestImpl(); modReq.setName( entry.getDn() ); Iterator<Attribute> itr = entry.iterator(); while ( itr.hasNext() ) { modReq.addModification( itr.next(), modOp ); } ModifyResponse modifyResponse = modify( modReq ); processResponse( modifyResponse ); }
/** * {@inheritDoc} */ @Override public void modify( Entry entry, ModificationOperation modOp ) throws LdapException { if ( entry == null ) { LOG.debug( "received a null entry for modification" ); throw new IllegalArgumentException( "Entry to be modified cannot be null" ); } int newId = messageId.incrementAndGet(); ModifyRequest modifyRequest = new ModifyRequestImpl(); modifyRequest.setMessageId( newId ); modifyRequest.setName( entry.getDn() ); Iterator<Attribute> itr = entry.iterator(); while ( itr.hasNext() ) { modifyRequest.addModification( new DefaultModification( modOp, itr.next() ) ); } ModifyResponse modifyResponse = modify( modifyRequest ); processResponse( modifyResponse ); }
/** * {@inheritDoc} */ @Override public void modify( Entry entry, ModificationOperation modOp ) throws LdapException { if ( entry == null ) { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04140_NULL_ENTRY_MODIFY ) ); } throw new IllegalArgumentException( I18n.err( I18n.ERR_04133_NULL_MODIFIED_ENTRY ) ); } ModifyRequest modReq = new ModifyRequestImpl(); modReq.setName( entry.getDn() ); Iterator<Attribute> itr = entry.iterator(); while ( itr.hasNext() ) { modReq.addModification( itr.next(), modOp ); } ModifyResponse modifyResponse = modify( modReq ); processResponse( modifyResponse ); }
/** * {@inheritDoc} */ @Override public void modify( Entry entry, ModificationOperation modOp ) throws LdapException { if ( entry == null ) { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04140_NULL_ENTRY_MODIFY ) ); } throw new IllegalArgumentException( I18n.err( I18n.ERR_04133_NULL_MODIFIED_ENTRY ) ); } ModifyRequest modReq = new ModifyRequestImpl(); modReq.setName( entry.getDn() ); Iterator<Attribute> itr = entry.iterator(); while ( itr.hasNext() ) { modReq.addModification( itr.next(), modOp ); } ModifyResponse modifyResponse = modify( modReq ); processResponse( modifyResponse ); }
private LscDatasets convertEntry(Entry entry, boolean onlyFirstValue) { if(entry == null) return null; LscDatasets converted = new LscDatasets(); Iterator<Attribute> entryAttributes = entry.iterator(); while(entryAttributes.hasNext()) { Attribute attr = entryAttributes.next(); if(attr != null && attr.size() > 0) { Iterator<Value<?>> values = attr.iterator(); if(!onlyFirstValue) { Set<Object> datasetsValues = new HashSet<Object>(); while(values.hasNext()) { Value<?> value = values.next(); if (value.isHumanReadable()) { datasetsValues.add(value.getString()); } else { datasetsValues.add(value.getBytes()); } } converted.getDatasets().put(attr.getId(), datasetsValues); } else { Value<?> value = values.next(); converted.getDatasets().put(attr.getId(), value.isHumanReadable() ? value.getString() : value.getBytes()); } } } return converted; }
Iterator<Attribute> attributes = contextEntry.iterator(); while ( attributes.hasNext() )