// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PrefCheckBoxTag.java

package com.ptc.windchill.enterprise.doc.tags;

import com.ptc.core.components.tags.components.CheckBoxTag;
import org.apache.log4j.Logger;
import wt.inf.container.WTContainerHelper;
import wt.inf.container.WTContainerRef;
import wt.log4j.LogR;
import wt.preference.PreferenceHelper;
import wt.preference.PreferenceService2;
import wt.util.WTException;

public class PrefCheckBoxTag extends CheckBoxTag
{

    public PrefCheckBoxTag()
    {
    }

    public void setCheckBoxPref(String s)
    {
        checkBoxPref = s;
    }

    public String getCheckBoxPref()
    {
        return checkBoxPref;
    }

    public boolean isChecked()
    {
        Boolean boolean1 = null;
        try
        {
            boolean1 = (Boolean)PreferenceHelper.service.getValue(checkBoxPref, "WINDCHILL", WTContainerHelper.getExchangeRef().getReferencedContainer(), null);
            LOGGER.debug((new StringBuilder()).append("PrefCheckBoxTag: defaultCheckout preference value - ").append(boolean1).toString());
        }
        catch(WTException wtexception)
        {
            wtexception.printStackTrace();
        }
        return boolean1.booleanValue();
    }

    private static final Logger LOGGER;
    private String checkBoxPref;

    static 
    {
        try
        {
            LOGGER = LogR.getLogger(com/ptc/windchill/enterprise/doc/tags/PrefCheckBoxTag.getName());
        }
        catch(Exception exception)
        {
            throw new ExceptionInInitializerError(exception);
        }
    }
}
