Package org.redline_rpm.ant

Source Code of org.redline_rpm.ant.AbstractTrigger

package org.redline_rpm.ant;

import org.redline_rpm.IntString;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* Object describing an RPM Trigger
*/
public abstract class AbstractTrigger {

    protected File script;
    protected List< Depends> depends = new ArrayList< Depends>();

    public void setScript( File script) {
        this.script = script;
    }

    public File getScript() {
        return script;
    }

    public void addDepends( Depends depends) {
        this.depends.add( depends);
    }

    public Map< String, IntString> getDepends() {
        Map< String, IntString> dependsMap = new HashMap< String, IntString>();
        for (Depends d : this.depends) {
            dependsMap.put(d.getName(), new IntString(d.getComparison(), d.getVersion()));
        }
        return dependsMap;
    }

    public abstract int getFlag();

}
TOP

Related Classes of org.redline_rpm.ant.AbstractTrigger

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.