{
if ( element != null && element instanceof ISearchResult && property != null )
{
ISearchResult result = ( ISearchResult ) element;
AttributeHierarchy ah = result.getAttributeWithSubtypes( property );
// check DN
if ( BrowserUIConstants.DN.equals( property ) )
{
return false;
}
// attribute dummy
if ( ah == null )
{
ah = new AttributeHierarchy( result.getEntry(), property, new IAttribute[]
{ new Attribute( result.getEntry(), property ) } );
}
// check schema modifyable
boolean isOneModifyable = false;
for ( Iterator it = ah.iterator(); it.hasNext(); )
{
IAttribute attribute = ( IAttribute ) it.next();
if ( SchemaUtils.isModifyable( attribute.getAttributeTypeDescription() ) )
{
isOneModifyable = true;
break;
}
}
if ( !isOneModifyable )
{
return false;
}
// check if property is valid for the entry
boolean isOneValid = false;
for ( Iterator it = ah.iterator(); it.hasNext(); )
{
IAttribute attribute = ( IAttribute ) it.next();
if ( attribute.isObjectClassAttribute() || attribute.isMustAttribute() || attribute.isMayAttribute() )
{
isOneValid = true;