/************************************************
 * Copyright (c) Shen Li. All rights reserved.  *
 * http://joyaop.sourceforge.net                *
 * -------------------------------------------- *
 * Distributable under LGPL license.            *
 * See terms of license at gnu.org.             *
 ************************************************/
package net.sf.joyaop.demo.rbac;

import net.sf.joyaop.demo.rbac.model.Principle;

/**
 * @author Shen Li
 */
public class ContextImpl implements Context {
    private Principle currentPrinciple;

    public ContextImpl(EntityHome entityHome) {
        currentPrinciple = (Principle) entityHome.newEntity(Principle.class); // Principle becomes instantiatable
    }

    public Principle getCurrentPrinciple() {
        return currentPrinciple;
    }

    public void setCurrentPrinciple(Principle currentPrinciple) {
        this.currentPrinciple = currentPrinciple;
    }
}
