/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package beans.directory.lpu;
import framework.beans.directory.DirectoryBean;
import framework.generic.ClipsServerException;
import java.util.List;
import javax.ejb.Stateful;
import beans.UserRightsSet;
import beans.directory.lpu.entity.Lpu;
import beans.directory.lpu.entity.LpuDetails;
import framework.generic.ESecurity;
import framework.security.UserRight;
/**
* @security Ok.
* @author axe
*/
@Stateful(mappedName="clips-beans/DirectoryLpuBean")
public class DirectoryLpuBean extends DirectoryBean<Lpu, LpuDetails>
implements DirectoryLpuBeanRemote {
public DirectoryLpuBean() {
super(Lpu.class, "ЛПУ");
}
@Override
protected UserRight getRightForCreateDirectoryItem() {
return UserRightsSet.WRITE_DEVELOPER_DIRECTORY;
}
@Override
protected UserRight getRightForWriteToDirectory() {
return UserRightsSet.WRITE_DEVELOPER_DIRECTORY;
}
@Override
protected void set(Lpu entity, LpuDetails details) throws ClipsServerException {
throw new ESecurity("Справочник ЛПУ нельзя редактировать данным методом");
}
@Override
public List<LpuDetails> getDirectory() {
return super.getDirectory();
}
}