/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.model.api;

import org.eclipse.birt.report.model.api.activity.SemanticException;
import org.eclipse.birt.report.model.api.elements.structures.AggregationArgument;

/**
 * AggregationArgumentHandle.
 */
public class AggregationArgumentHandle extends StructureHandle
{

	/**
	 * Constructs the handle of aggregation argument.
	 * 
	 * @param valueHandle
	 *            the value handle for aggregation argument list of one property
	 * @param index
	 *            the position of this aggregation argument in the list
	 */

	public AggregationArgumentHandle( SimpleValueHandle valueHandle, int index )
	{
		super( valueHandle, index );
	}

	/**
	 * Returns the argument name.
	 * 
	 * @return the argument name.
	 */

	public String getName( )
	{
		return getStringProperty( AggregationArgument.NAME_MEMBER );
	}

	/**
	 * Sets the argument name.
	 * 
	 * @param argumentName
	 *            the argument name to set
	 * @throws SemanticException
	 */

	public void setName( String argumentName ) throws SemanticException
	{
		setProperty( AggregationArgument.NAME_MEMBER, argumentName );
	}

	/**
	 * Returns the argument value.
	 * 
	 * @return the argument value.
	 */

	public String getValue( )
	{
		return getStringProperty( AggregationArgument.VALUE_MEMBER );
	}

	/**
	 * Sets the argument value.
	 * 
	 * @param argumentValue
	 *            the argument value to set
	 * @throws SemanticException
	 */

	public void setValue( String argumentValue ) throws SemanticException
	{
		setProperty( AggregationArgument.VALUE_MEMBER, argumentValue );
	}
}

@@ -2107,11 +2107,244 @@
 ue );%0A%09%7D
+%0A%0A%09/**%0A%09 * Returns the argument expression.%0A%09 * %0A%09 * @return the argument expression.%0A%09 */%0A%09public Expression getExpression( )%0A%09%7B%0A%09%09return (Expression) ( getExpressionProperty(%0A%09%09%09%09AggregationArgument.VALUE_MEMBER ).getValue( ) );%0A%09%7D
 %0A%7D%0A

add a utility method to get expression from chart argument