* @param install the existing install
* @return new InstallMetaData instance
*/
protected InstallMetaData createInstallMetaData(ExternalInstall install)
{
AbstractInstallMetaData installMetaData = new AbstractInstallMetaData();
installMetaData.setBean(install.bean());
installMetaData.setMethodName(install.method());
if (isAttributePresent(install.dependantState()))
installMetaData.setDependentState(new ControllerState(install.dependantState()));
for (Value value : install.parameters())
{
List<ParameterMetaData> parameters = installMetaData.getParameters();
if (parameters == null)
{
parameters = new ArrayList<ParameterMetaData>();
installMetaData.setParameters(parameters);
}
AbstractParameterMetaData parameter = new AbstractParameterMetaData(ValueUtil.createValueMetaData(value));
if (isAttributePresent(value.type()))
parameter.setType(value.type());
parameters.add(parameter);