/*******************************************************************************
 * Copyright (c) 2008 SAS Institute Inc.
 * 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:
 *     SAS Institute Inc. - initial API and implementation
 ******************************************************************************/

package org.eclipse.cosmos.me.provisional.deployment.sdd.tooling.btg.aggregator;

import org.eclipse.cosmos.me.provisional.deployment.sdd.common.spi.PackageDescriptor;

public class PackageDescriptorType {
	
	public static PackageDescriptor merge(PackageDescriptor packageDescriptor1, PackageDescriptor packageDescriptor2){
		
		//merge Contents
		packageDescriptor1.setPackageContents(ContentsType.merge(packageDescriptor1.getPackageContents(), packageDescriptor2.getPackageContents()));
		
		//merge PackageIdentities
		packageDescriptor1.setPackageIdentity(PackageIdentityType.merge(packageDescriptor1.getPackageIdentity(),packageDescriptor2.getPackageIdentity()));
		
		//merge Signatures  TODO: add Signature merge, unable to access signature from spi
		
		//merge DescriptorInfo  TODO: add Descriptor Info merge
		
		
		return packageDescriptor1;
	}
}
