for ( int i = 0; i < getSelectedAttributeHierarchies().length; i++ )
{
// check if a non-modifyable, must or objectClass attribute is
// selected
AttributeHierarchy ah = getSelectedAttributeHierarchies()[i];
for ( Iterator it = ah.iterator(); it.hasNext(); )
{
IAttribute attribute = ( IAttribute ) it.next();
if ( !SchemaUtils.isModifyable( attribute.getAttributeTypeDescription() )
|| attribute.isMustAttribute() || attribute.isObjectClassAttribute() )
{
throw new Exception();
}
}
}
List attributeList = new ArrayList();
// add selected attributes
for ( int i = 0; i < getSelectedAttributes().length; i++ )
{
IAttribute attribute = getSelectedAttributes()[i];
if ( attribute != null && attribute.getValueSize() > 0 )
{
attributeList.add( attribute );
}
}
// add selected hierarchies
for ( int i = 0; i < getSelectedAttributeHierarchies().length; i++ )
{
// check if a operational, must or objectClass attribute is
// selected
AttributeHierarchy ah = getSelectedAttributeHierarchies()[i];
for ( Iterator it = ah.iterator(); it.hasNext(); )
{
IAttribute attribute = ( IAttribute ) it.next();
if ( attribute != null && attribute.getValueSize() > 0 )
{
attributeList.add( attribute );