/*-
 * Copyright (c) 2013-2014 Red Hat, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.fedoraproject.xmvn.deployer;

import org.fedoraproject.xmvn.artifact.Artifact;

/**
 * @author Mikolaj Izdebski
 */
public class DeploymentRequest
{
    private Artifact artifact;

    public Artifact getArtifact()
    {
        return artifact;
    }

    public void setArtifact( Artifact artifact )
    {
        this.artifact = artifact;
    }

    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + ( ( artifact == null ) ? 0 : artifact.hashCode() );
        return result;
    }

    @Override
    public boolean equals( Object obj )
    {
        if ( this == obj )
            return true;
        if ( obj == null )
            return false;
        if ( getClass() != obj.getClass() )
            return false;
        DeploymentRequest other = (DeploymentRequest) obj;
        if ( artifact == null )
        {
            if ( other.artifact != null )
                return false;
        }
        else if ( !artifact.equals( other.artifact ) )
            return false;
        return true;
    }
}

@@ -642,16 +642,149 @@
 loyer;%0A%0A
+import java.util.Arrays;%0Aimport java.util.Collections;%0Aimport java.util.LinkedHashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A
 import o
@@ -935,162 +935,1361 @@
    p
-ublic Artifact getArtifact()%0A    %7B%0A        return artifact;%0A    %7D%0A%0A    public void setArtifact( Artifact artifact )%0A    %7B%0A        this.artifact = artifact
+rivate final Map%3CArtifact, List%3CArtifact%3E%3E dependencies = new LinkedHashMap%3C%3E();%0A%0A    private final Map%3CString, String%3E properties = new LinkedHashMap%3C%3E();%0A%0A    public Artifact getArtifact()%0A    %7B%0A        return artifact;%0A    %7D%0A%0A    public void setArtifact( Artifact artifact )%0A    %7B%0A        this.artifact = artifact;%0A    %7D%0A%0A    public Map%3CArtifact, List%3CArtifact%3E%3E getDependencies()%0A    %7B%0A        return Collections.unmodifiableMap( dependencies );%0A    %7D%0A%0A    public void addDependency( Artifact dependencyArtifact, Artifact... exclusions )%0A    %7B%0A        addDependency( dependencyArtifact, Arrays.asList( exclusions ) );%0A    %7D%0A%0A    public void addDependency( Artifact dependencyArtifact, List%3CArtifact%3E exclusions )%0A    %7B%0A        dependencies.put( dependencyArtifact, Collections.unmodifiableList( exclusions ) );%0A    %7D%0A%0A    public void removeDependency( Artifact dependencyArtifact )%0A    %7B%0A        dependencies.remove( dependencyArtifact );%0A    %7D%0A%0A    public Map%3CString, String%3E getProperties()%0A    %7B%0A        return Collections.unmodifiableMap( properties );%0A    %7D%0A%0A    public String getProperty( String key )%0A    %7B%0A        return properties.get( key );%0A    %7D%0A%0A    public void addProperty( String key, String value )%0A    %7B%0A        properties.put( key, value );%0A    %7D%0A%0A    public void removeProperty( String key )%0A    %7B%0A        properties.remove( key )
 ;%0A  

Allow artifact metadata to deployment request