All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.redline_rpm.ant.AbstractTrigger Maven / Gradle / Ivy

Go to download

Redline is a pure Java library for manipulating RPM Package Manager packages.

There is a newer version: 1.2.10
Show newest version
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();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy