Skip to content
Snippets Groups Projects
Commit e930df01 authored by anttil's avatar anttil
Browse files

SSDM-4135: Fix dependency failure

SVN: 37109
parent af5de667
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.deletion.EntityHist
import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.search.HibernateSearchContext;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.util.UpdateUtils;
import ch.systemsx.cisd.openbis.generic.shared.Constants;
import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind;
/**
......@@ -76,8 +77,6 @@ public final class DAOFactory extends AuthorizationDAOFactory implements IDAOFac
{
private static Logger operationLog = LogFactory.getLogger(LogCategory.OPERATION, DAOFactory.class);
public static boolean projectSamplesEnabled = false;
static
{
SpringEoDSQLExceptionTranslator.activate();
......@@ -373,7 +372,7 @@ public final class DAOFactory extends AuthorizationDAOFactory implements IDAOFac
public void afterPropertiesSet() throws Exception
{
Properties serviceProperties = configurer.getResolvedProps();
projectSamplesEnabled = PropertyUtils.getBoolean(serviceProperties, Constants.PROJECT_SAMPLES_ENABLED_KEY, false);
SamplePE.projectSamplesEnabled = PropertyUtils.getBoolean(serviceProperties, Constants.PROJECT_SAMPLES_ENABLED_KEY, false);
Connection connection = null;
try
{
......@@ -384,7 +383,7 @@ public final class DAOFactory extends AuthorizationDAOFactory implements IDAOFac
ResultSet result = statement.executeQuery("SELECT tgname FROM pg_trigger WHERE tgname='disable_project_level_samples'");
boolean triggerExists = result.next();
if (projectSamplesEnabled)
if (SamplePE.projectSamplesEnabled)
{
if (triggerExists)
{
......@@ -404,7 +403,7 @@ public final class DAOFactory extends AuthorizationDAOFactory implements IDAOFac
{
operationLog.warn("It is not possible to disable project samples feature. The system still considers "
+ Constants.PROJECT_SAMPLES_ENABLED_KEY + "=true.");
projectSamplesEnabled = true;
SamplePE.projectSamplesEnabled = true;
}
}
statement.close();
......
......@@ -69,7 +69,6 @@ import org.hibernate.validator.constraints.Length;
import ch.systemsx.cisd.common.collection.UnmodifiableSetDecorator;
import ch.systemsx.cisd.common.reflection.ModifiedShortPrefixToStringStyle;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.DAOFactory;
import ch.systemsx.cisd.openbis.generic.shared.IServer;
import ch.systemsx.cisd.openbis.generic.shared.basic.BasicConstant;
import ch.systemsx.cisd.openbis.generic.shared.basic.IIdentityHolder;
......@@ -102,6 +101,8 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co
public static final List<SamplePE> EMPTY_LIST = Collections.emptyList();
public static boolean projectSamplesEnabled = false;
private Long id;
private String code;
......@@ -491,7 +492,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co
public void setProject(ProjectPE project)
{
if (DAOFactory.projectSamplesEnabled)
if (projectSamplesEnabled)
{
this.project = project;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment