package lc.obscura;

import lc.esp.eo.EOClient;
import lc.esp.eo.EOTransaction;

/**
 * The central class which implements an Obscura deployment. There is a 1:1 relationship between an Obscura
 * deployment and a LPAR.
 *
 * @author Alex Leigh
 * @since 1.0
 */
public class Obscura {
    private final EOClient eoClient = new EOClient();
    private final String lparName;

    public Obscura(String lparName) {
        this.lparName = lparName;
    }

    /**
     * Return a new {@link EOTransaction} against the configured backend partition for this Obscura instance.
     *
     * @return
     */
    protected EOTransaction getTransaction() {
        return eoClient.getTransaction(lparName);
    }

    public String getLparName() {
        return lparName;
    }
}
