Example usage for java.lang Boolean Boolean

List of usage examples for java.lang Boolean Boolean

Introduction

In this page you can find the example usage for java.lang Boolean Boolean.

Prototype

@Deprecated(since = "9")
public Boolean(String s) 

Source Link

Document

Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true" .

Usage

From source file:com.alkacon.opencms.excelimport.CmsResourceExcelImport.java

/**
 * Gets parameter value "publish" as boolean.<p>
 *     /*  w w  w. j a  va2 s  .  co m*/
 * @return parameter value "publish" as boolean
 */
public boolean getPublish() {

    boolean publish = false;
    if (getParamPublish() != null) {
        publish = new Boolean(getParamPublish()).booleanValue();
    }
    return publish;
}

From source file:com.aurel.track.vc.bl.VersionControlBL.java

public static VersionControlTO extractVersionControl(TProjectBean project) {
    VersionControlTO vc = new VersionControlTO();
    boolean usingvc = "true".equalsIgnoreCase(PropertiesHelper.getProperty(project.getMoreProperties(),
            TProjectBean.MOREPPROPS.USE_VERSION_CONTROL_PROPERTY));
    if (usingvc) {
        vc.setUseVersionControl(new Boolean(true));
        String vcType = PropertiesHelper.getProperty(project.getMoreProperties(),
                TProjectBean.MOREPPROPS.VERSION_CONTROL_TYPE_PROPERTY);
        vc.setVersionControlType(vcType);
        vc.setMissing(missingVCType(getVersionControlPlugins(), vcType));

        vc.setBrowsers(getBrowserList(vcType));
        String browserID = project.getVersionSystemField1();
        if (browserID == null || browserID.trim().equals("")) {
            browserID = "-1";
        }/*w w w .j a v  a2s  .  c o  m*/
        vc.setBrowserID(browserID);
        String baseURL = project.getVersionSystemField0();
        vc.setBaseURL(baseURL);
        BrowserDescriptor browser = VersionControlBL.findBrowser(vcType, browserID);
        String editChangesetLink = PropertiesHelper.getProperty(project.getMoreProperties(),
                TProjectBean.MOREPPROPS.VC_CHANGESET_LINK);
        String editAddedLink = PropertiesHelper.getProperty(project.getMoreProperties(),
                TProjectBean.MOREPPROPS.VC_ADDED_LINK);
        String editModifiedLink = PropertiesHelper.getProperty(project.getMoreProperties(),
                TProjectBean.MOREPPROPS.VC_MODIFIED_LINK);
        String editReplacedLink = PropertiesHelper.getProperty(project.getMoreProperties(),
                TProjectBean.MOREPPROPS.VC_REPLACED_LINK);
        String editDeletedLink = PropertiesHelper.getProperty(project.getMoreProperties(),
                TProjectBean.MOREPPROPS.VC_DELETED_LINK);
        if (browser != null) {
            if (editChangesetLink == null || editChangesetLink.trim().length() == 0) {
                editChangesetLink = baseURL + browser.getChangesetLink();
            }
            if (editAddedLink == null || editAddedLink.trim().length() == 0) {
                editAddedLink = baseURL + browser.getAddedLink();
            }
            if (editModifiedLink == null || editModifiedLink.trim().length() == 0) {
                editModifiedLink = baseURL + browser.getModifiedLink();
            }
            if (editReplacedLink == null || editReplacedLink.trim().length() == 0) {
                editReplacedLink = baseURL + browser.getReplacedLink();
            }
            if (editDeletedLink == null || editDeletedLink.trim().length() == 0) {
                editDeletedLink = baseURL + browser.getDeletedLink();
            }
        }
        vc.setChangesetLink(editChangesetLink);
        vc.setAddedLink(editAddedLink);
        vc.setModifiedLink(editModifiedLink);
        vc.setReplacedLink(editReplacedLink);
        vc.setDeletedLink(editDeletedLink);
    } else {
        vc.setUseVersionControl(new Boolean(false));
        vc.setVersionControlType(null);
        vc.setBrowsers(new ArrayList());
    }
    Map params = laodMapVerisonControl(project.getObjectID());
    vc.setParameters(params);
    return vc;
}

From source file:gov.nih.nci.ncicb.cadsr.bulkloader.util.BulkLoaderUnclassifier.java

private boolean checkCSCSI() {

    JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);

    Boolean checkCsCsi = (Boolean) jdbcTemplate.query(checkCsCsiQry,
            new Object[] { csName, csVersion, csiName, csiVersion }, new ResultSetExtractor() {

                @Override// w w w.  j a v  a 2s  . co  m
                public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
                    if (rs.next()) {
                        return new Boolean(true);
                    }
                    return new Boolean(false);
                }
            });
    return checkCsCsi;
}

From source file:ExpenseReport.java

public ExpenseData(Date date, double amount, int category, boolean approved, String description) {
    m_date = date;/* www.  jav a2 s.  c om*/
    m_amount = new Double(amount);
    m_category = new Integer(category);
    m_approved = new Boolean(approved);
    m_description = description;
}

From source file:com.sun.faces.taglib.html_basic.SelectBooleanCheckboxTag.java

protected void setProperties(UIComponent component) {
    super.setProperties(component);
    UISelectBoolean selectboolean = null;
    try {/*from  w  ww  . ja  v a 2s.  c o m*/
        selectboolean = (UISelectBoolean) component;
    } catch (ClassCastException cce) {
        throw new IllegalStateException("Component " + component.toString()
                + " not expected type.  Expected: UISelectBoolean.  Perhaps you're missing a tag?");
    }

    if (immediate != null) {
        if (isValueReference(immediate)) {
            ValueBinding vb = Util.getValueBinding(immediate);
            selectboolean.setValueBinding("immediate", vb);
        } else {
            boolean _immediate = new Boolean(immediate).booleanValue();
            selectboolean.setImmediate(_immediate);
        }
    }
    if (required != null) {
        if (isValueReference(required)) {
            ValueBinding vb = Util.getValueBinding(required);
            selectboolean.setValueBinding("required", vb);
        } else {
            boolean _required = new Boolean(required).booleanValue();
            selectboolean.setRequired(_required);
        }
    }
    if (validator != null) {
        if (isValueReference(validator)) {
            Class args[] = { FacesContext.class, UIComponent.class, Object.class };
            MethodBinding vb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(validator,
                    args);
            selectboolean.setValidator(vb);
        } else {
            Object params[] = { validator };
            throw new javax.faces.FacesException(
                    Util.getExceptionMessageString(Util.INVALID_EXPRESSION_ID, params));
        }
    }
    if (value != null) {
        if (isValueReference(value)) {
            ValueBinding vb = Util.getValueBinding(value);
            selectboolean.setValueBinding("value", vb);
        } else {
            selectboolean.setValue(value);
        }
    }
    if (valueChangeListener != null) {
        if (isValueReference(valueChangeListener)) {
            Class args[] = { ValueChangeEvent.class };
            MethodBinding vb = FacesContext.getCurrentInstance().getApplication()
                    .createMethodBinding(valueChangeListener, args);
            selectboolean.setValueChangeListener(vb);
        } else {
            Object params[] = { valueChangeListener };
            throw new javax.faces.FacesException(
                    Util.getExceptionMessageString(Util.INVALID_EXPRESSION_ID, params));
        }
    }
    if (accesskey != null) {
        if (isValueReference(accesskey)) {
            ValueBinding vb = Util.getValueBinding(accesskey);
            selectboolean.setValueBinding("accesskey", vb);
        } else {
            selectboolean.getAttributes().put("accesskey", accesskey);
        }
    }
    if (dir != null) {
        if (isValueReference(dir)) {
            ValueBinding vb = Util.getValueBinding(dir);
            selectboolean.setValueBinding("dir", vb);
        } else {
            selectboolean.getAttributes().put("dir", dir);
        }
    }
    if (disabled != null) {
        if (isValueReference(disabled)) {
            ValueBinding vb = Util.getValueBinding(disabled);
            selectboolean.setValueBinding("disabled", vb);
        } else {
            boolean _disabled = new Boolean(disabled).booleanValue();
            selectboolean.getAttributes().put("disabled", _disabled ? Boolean.TRUE : Boolean.FALSE);
        }
    }
    if (lang != null) {
        if (isValueReference(lang)) {
            ValueBinding vb = Util.getValueBinding(lang);
            selectboolean.setValueBinding("lang", vb);
        } else {
            selectboolean.getAttributes().put("lang", lang);
        }
    }
    if (onblur != null) {
        if (isValueReference(onblur)) {
            ValueBinding vb = Util.getValueBinding(onblur);
            selectboolean.setValueBinding("onblur", vb);
        } else {
            selectboolean.getAttributes().put("onblur", onblur);
        }
    }
    if (onchange != null) {
        if (isValueReference(onchange)) {
            ValueBinding vb = Util.getValueBinding(onchange);
            selectboolean.setValueBinding("onchange", vb);
        } else {
            selectboolean.getAttributes().put("onchange", onchange);
        }
    }
    if (onclick != null) {
        if (isValueReference(onclick)) {
            ValueBinding vb = Util.getValueBinding(onclick);
            selectboolean.setValueBinding("onclick", vb);
        } else {
            selectboolean.getAttributes().put("onclick", onclick);
        }
    }
    if (ondblclick != null) {
        if (isValueReference(ondblclick)) {
            ValueBinding vb = Util.getValueBinding(ondblclick);
            selectboolean.setValueBinding("ondblclick", vb);
        } else {
            selectboolean.getAttributes().put("ondblclick", ondblclick);
        }
    }
    if (onfocus != null) {
        if (isValueReference(onfocus)) {
            ValueBinding vb = Util.getValueBinding(onfocus);
            selectboolean.setValueBinding("onfocus", vb);
        } else {
            selectboolean.getAttributes().put("onfocus", onfocus);
        }
    }
    if (onkeydown != null) {
        if (isValueReference(onkeydown)) {
            ValueBinding vb = Util.getValueBinding(onkeydown);
            selectboolean.setValueBinding("onkeydown", vb);
        } else {
            selectboolean.getAttributes().put("onkeydown", onkeydown);
        }
    }
    if (onkeypress != null) {
        if (isValueReference(onkeypress)) {
            ValueBinding vb = Util.getValueBinding(onkeypress);
            selectboolean.setValueBinding("onkeypress", vb);
        } else {
            selectboolean.getAttributes().put("onkeypress", onkeypress);
        }
    }
    if (onkeyup != null) {
        if (isValueReference(onkeyup)) {
            ValueBinding vb = Util.getValueBinding(onkeyup);
            selectboolean.setValueBinding("onkeyup", vb);
        } else {
            selectboolean.getAttributes().put("onkeyup", onkeyup);
        }
    }
    if (onmousedown != null) {
        if (isValueReference(onmousedown)) {
            ValueBinding vb = Util.getValueBinding(onmousedown);
            selectboolean.setValueBinding("onmousedown", vb);
        } else {
            selectboolean.getAttributes().put("onmousedown", onmousedown);
        }
    }
    if (onmousemove != null) {
        if (isValueReference(onmousemove)) {
            ValueBinding vb = Util.getValueBinding(onmousemove);
            selectboolean.setValueBinding("onmousemove", vb);
        } else {
            selectboolean.getAttributes().put("onmousemove", onmousemove);
        }
    }
    if (onmouseout != null) {
        if (isValueReference(onmouseout)) {
            ValueBinding vb = Util.getValueBinding(onmouseout);
            selectboolean.setValueBinding("onmouseout", vb);
        } else {
            selectboolean.getAttributes().put("onmouseout", onmouseout);
        }
    }
    if (onmouseover != null) {
        if (isValueReference(onmouseover)) {
            ValueBinding vb = Util.getValueBinding(onmouseover);
            selectboolean.setValueBinding("onmouseover", vb);
        } else {
            selectboolean.getAttributes().put("onmouseover", onmouseover);
        }
    }
    if (onmouseup != null) {
        if (isValueReference(onmouseup)) {
            ValueBinding vb = Util.getValueBinding(onmouseup);
            selectboolean.setValueBinding("onmouseup", vb);
        } else {
            selectboolean.getAttributes().put("onmouseup", onmouseup);
        }
    }
    if (onselect != null) {
        if (isValueReference(onselect)) {
            ValueBinding vb = Util.getValueBinding(onselect);
            selectboolean.setValueBinding("onselect", vb);
        } else {
            selectboolean.getAttributes().put("onselect", onselect);
        }
    }
    if (readonly != null) {
        if (isValueReference(readonly)) {
            ValueBinding vb = Util.getValueBinding(readonly);
            selectboolean.setValueBinding("readonly", vb);
        } else {
            boolean _readonly = new Boolean(readonly).booleanValue();
            selectboolean.getAttributes().put("readonly", _readonly ? Boolean.TRUE : Boolean.FALSE);
        }
    }
    if (style != null) {
        if (isValueReference(style)) {
            ValueBinding vb = Util.getValueBinding(style);
            selectboolean.setValueBinding("style", vb);
        } else {
            selectboolean.getAttributes().put("style", style);
        }
    }
    if (styleClass != null) {
        if (isValueReference(styleClass)) {
            ValueBinding vb = Util.getValueBinding(styleClass);
            selectboolean.setValueBinding("styleClass", vb);
        } else {
            selectboolean.getAttributes().put("styleClass", styleClass);
        }
    }
    if (tabindex != null) {
        if (isValueReference(tabindex)) {
            ValueBinding vb = Util.getValueBinding(tabindex);
            selectboolean.setValueBinding("tabindex", vb);
        } else {
            selectboolean.getAttributes().put("tabindex", tabindex);
        }
    }
    if (title != null) {
        if (isValueReference(title)) {
            ValueBinding vb = Util.getValueBinding(title);
            selectboolean.setValueBinding("title", vb);
        } else {
            selectboolean.getAttributes().put("title", title);
        }
    }
}

From source file:edu.jhu.cvrg.services.nodeDataService.DataStaging.java

/** Service to make final destination directories and transfer the file into it, via routeToFolder().<BR/>
 *  Assumes that the file was already transfered to the ftp area.
 * //  w  w w .  j  a  va 2s. c om
 * @param param0 OMElement containing the parameters:<BR/>
 *  userId, subjectId, fileName, ftpHost, ftpUser, ftpPassword, bExposure
 * @return ??? always returns SUCCESS ???
 */
public org.apache.axiom.om.OMElement stageTransferredData(org.apache.axiom.om.OMElement param0)
        throws Exception {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace omNs = fac.createOMNamespace("http://www.cvrgrid.org/nodeDataService/", "nodeDataService");
    OMElement stageTransferredDataStatus = fac.createOMElement("stageTransferredData", omNs);
    Iterator iterator = param0.getChildren();
    String userId = ((OMElement) iterator.next()).getText();
    String subjectId = ((OMElement) iterator.next()).getText();
    String fileName = ((OMElement) iterator.next()).getText();
    String ftpHost = ((OMElement) iterator.next()).getText();
    String ftpUser = ((OMElement) iterator.next()).getText();
    String ftpPassword = ((OMElement) iterator.next()).getText();
    String sExposure = ((OMElement) iterator.next()).getText();

    boolean bExposure = new Boolean(sExposure).booleanValue();

    try {
        File xferFile = new File(localFtpRoot + sep + fileName);
        if (debugMode)
            System.out.println(">>>>>>>>>>>>>   staging " + xferFile);

        if (xferFile.exists()) {
            if (fileName.substring(fileName.lastIndexOf(".") + 1).equalsIgnoreCase("zip")) {

                int zipAttempt = 0;
                System.out.println("zip attempt: " + zipAttempt);
                boolean extractIndicator = extractZipFile(localFtpRoot, userId, fileName, ftpHost, ftpUser,
                        ftpPassword, bExposure);
            } else {
                // Strip path from filename.
                String originalFileName = "", ftpSubdir = "";
                System.out.print("Getting position of '" + sep + "' in " + fileName + " length is :"
                        + fileName.length());
                int pos = fileName.lastIndexOf(sep);
                System.out.println(" pos :" + pos);
                if (pos != -1) {
                    ftpSubdir = fileName.substring(0, pos + 1);
                    System.out.println(" ftpSubdir :" + ftpSubdir);

                    originalFileName = fileName.substring(pos + 1);
                    System.out.println(" originalFileName :" + originalFileName);
                }
                debugPrintln("localFtpRoot, fileName:" + localFtpRoot + ", " + fileName);
                debugPrintln("ftpSubdir, originalFileName:" + ftpSubdir + ", " + originalFileName);

                utils.routeToFolder(localFtpRoot, fileName, userId, subjectId, originalFileName, ftpHost,
                        ftpUser, ftpPassword, remoteFtpRoot, bExposure);
            }
        }
        stageTransferredDataStatus.addChild(fac.createOMText("" + "SUCCESS"));
    } catch (Exception e) {
        e.printStackTrace();
        stageTransferredDataStatus.addChild(fac.createOMText("Error: " + e.toString()));
        throw e;
    } finally {
        return stageTransferredDataStatus;
    }
}

From source file:gov.nih.nci.ncicb.cadsr.common.persistence.dao.jdbc.JDBCDataElementDAO.java

public boolean isDEDerived(final String deIdSeq) {

    final String qry = "select * from complex_data_elements_view where p_de_idseq = ?";

    JdbcTemplate jdbcTemplate = new JdbcTemplate(getDataSource());
    Object result = jdbcTemplate.query(new PreparedStatementCreator() {
        public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
            PreparedStatement ps = con.prepareStatement(qry);
            ps.setString(1, deIdSeq);/* w  w  w  . j  av a2 s  .c  o  m*/
            return ps;
        }
    }, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
            if (rs.next()) {
                return new Boolean(true);
            } else {
                return new Boolean(false);
            }
        }
    });
    return (Boolean) result;
}

From source file:de.julielab.jcore.ae.lingpipegazetteer.chunking.ChunkerProviderImplAlt.java

public void load(DataResource resource) throws ResourceInitializationException {
    LOGGER.info("Loading configuration file from URI \"{}\" (URL: \"{}\").", resource.getUri(),
            resource.getUrl());//from  ww w .j a  va2  s .co m
    Properties properties = new Properties();
    try {
        InputStream is;
        try {
            is = resource.getInputStream();
        } catch (NullPointerException e) {
            LOGGER.info("Couldn't get InputStream from UIMA. Trying to load the resource by classpath lookup.");
            String cpAddress = resource.getUri().toString();
            is = getClass().getResourceAsStream(cpAddress.startsWith("/") ? cpAddress : "/" + cpAddress);
            if (null == is) {
                String err = "Couldn't find the resource at \"" + resource.getUri()
                        + "\" neither as an UIMA external resource file nor as a classpath resource.";
                LOGGER.error(err);
                throw new ResourceInitializationException(new IllegalArgumentException(err));
            }
        }
        properties.load(is);
    } catch (IOException e) {
        LOGGER.error("Error while loading properties file", e);
        throw new ResourceInitializationException(e);
    }

    LOGGER.info("Creating dictionary chunker with " + resource.getUrl() + " properties file.");

    dictionaryFilePath = properties.getProperty(PARAM_DICTIONARY_FILE);
    if (dictionaryFilePath == null)
        throw new ResourceInitializationException(ResourceInitializationException.CONFIG_SETTING_ABSENT,
                new Object[] { PARAM_DICTIONARY_FILE });

    stopwordFilePath = properties.getProperty(PARAM_STOPWORD_FILE);
    if (stopwordFilePath == null)
        throw new ResourceInitializationException(ResourceInitializationException.CONFIG_SETTING_ABSENT,
                new Object[] { PARAM_STOPWORD_FILE });

    String generateVariantsString = properties.getProperty(PARAM_MAKE_VARIANTS);
    generateVariants = true;
    if (generateVariantsString != null)
        generateVariants = new Boolean(generateVariantsString);
    LOGGER.info("Generate variants: {}", generateVariants);

    String normalizeString = properties.getProperty(PARAM_NORMALIZE_TEXT);
    normalize = false;
    if (normalizeString != null)
        normalize = new Boolean(normalizeString);
    LOGGER.info("Normalize dictionary entries (i.e. completely strip dashes, parenthesis etc): {}", normalize);

    String transliterateString = properties.getProperty(PARAM_TRANSLITERATE_TEXT);
    transliterate = false;
    if (transliterateString != null)
        transliterate = new Boolean(transliterateString);
    LOGGER.info("Transliterate dictionary entries (i.e. transform accented characters to their base forms): {}",
            transliterate);

    String caseSensitiveString = properties.getProperty(PARAM_CASE_SENSITIVE);
    caseSensitive = false;
    if (caseSensitiveString != null)
        caseSensitive = new Boolean(caseSensitiveString);
    LOGGER.info("Case sensitive: {}", caseSensitive);

    String useApproximateMatchingString = properties.getProperty(PARAM_USE_APPROXIMATE_MATCHING);
    useApproximateMatching = false;
    if (useApproximateMatchingString != null)
        useApproximateMatching = new Boolean(useApproximateMatchingString);
    LOGGER.info("Use approximate matching: {}", useApproximateMatching);

    if (normalize && generateVariants)
        throw new ResourceInitializationException(new IllegalStateException(
                "MakeVariants and NormalizeText are both activated which is invalid. The two options work towards the same goal in two different ways, i.e. to recognize dictionary entry variants not given explicitly. However, the approaches are not compatible and you have to choose a single one."));

    dictFile = readStreamFromFileSystemOrClassPath(dictionaryFilePath);
    stopFile = readStreamFromFileSystemOrClassPath(stopwordFilePath);

    try {
        initStopWords(stopFile);
        readDictionary(dictFile);

        LOGGER.info("Now creating chunker.");
        long time = System.currentTimeMillis();
        if (useApproximateMatching) {
            final Set<Character> charsToDelete = new HashSet<>();
            charsToDelete.add('-');
            // charsToDelete.add('+');
            // charsToDelete.add(',');
            // charsToDelete.add('.');
            // charsToDelete.add(':');
            // charsToDelete.add(';');
            // charsToDelete.add('?');
            // charsToDelete.add('!');
            // charsToDelete.add('*');
            // charsToDelete.add('');
            // charsToDelete.add('$');
            // charsToDelete.add('%');
            // charsToDelete.add('&');
            // charsToDelete.add('/');
            // charsToDelete.add('\\');
            // charsToDelete.add('(');
            // charsToDelete.add(')');
            // charsToDelete.add('<');
            // charsToDelete.add('>');
            // charsToDelete.add('[');
            // charsToDelete.add(']');
            // charsToDelete.add('=');
            // charsToDelete.add('\'');
            // charsToDelete.add('`');
            // charsToDelete.add('');
            // charsToDelete.add('"');
            // charsToDelete.add('#');

            WeightedEditDistance editDistance = ApproxDictionaryChunker.TT_DISTANCE;
            editDistance = new WeightedEditDistance() {

                @Override
                public double deleteWeight(char cDeleted) {
                    double ret;
                    if (cDeleted == '-')
                        ret = -5.0;
                    else if (cDeleted == ' ' || charsToDelete.contains(cDeleted))
                        ret = -10.0;
                    else
                        ret = -110.0;
                    return ret;
                }

                @Override
                public double insertWeight(char cInserted) {
                    return deleteWeight(cInserted);
                }

                @Override
                public double matchWeight(char cMatched) {
                    return 0.0;
                }

                @Override
                public double substituteWeight(char cDeleted, char cInserted) {
                    if (cDeleted == ' ' && cInserted == '-')
                        return -2.0;
                    if (cDeleted == '-' && cInserted == ' ')
                        return -2.0;
                    if (cDeleted == ' ' && charsToDelete.contains(cInserted))
                        return -10.0;
                    if (charsToDelete.contains(cDeleted) && cInserted == ' ')
                        return -10.0;
                    return -110.0;
                }

                @Override
                public double transposeWeight(char c1, char c2) {
                    return Double.NEGATIVE_INFINITY;
                }
            };

            dictChunker = new ApproxDictionaryChunker((TrieDictionary<String>) dict,
                    IndoEuropeanTokenizerFactory.INSTANCE, editDistance, APPROX_MATCH_THRESHOLD_SCORE);
        } else {
            dictChunker = new ExactDictionaryChunker(dict, IndoEuropeanTokenizerFactory.INSTANCE, false,
                    caseSensitive);
        }
        time = System.currentTimeMillis() - time;
        LOGGER.info("Building the actual chunker from the dictionary took {}ms ({}s).", time, time / 1000);

    } catch (Exception e) {
        LOGGER.error("Exception while creating chunker instance", e);
    }
}

From source file:podd.search.web.SearchCriteriaWeb.java

public Boolean getScopePublicProjects() {
    Boolean scopePublicProjects = Boolean.FALSE;
    if (strScopePublicProjects != null) {
        scopePublicProjects = new Boolean(strScopePublicProjects);
    } else if (authenticatedUser == null) { // If there's no authenticated user, then we can only search on public projects
        scopePublicProjects = Boolean.TRUE;
    }// w ww  .j  a  v  a2  s  . c om
    return scopePublicProjects;
}

From source file:com.symbian.utils.config.ConfigUtils.java

/**
 * @param aKeyLiteral/*from www .jav  a2  s . c o  m*/
 * @param aDefault
 * @param aType
 */
private void saveLocalPreference(final String aKeyLiteral, final String aDefault, final Class aType) {
    if (String.class.equals(aType)) {
        iSavedConfig.put(aKeyLiteral, aDefault);
    } else if (Boolean.class.equals(aType)) {
        iSavedConfig.put(aKeyLiteral, new Boolean(aDefault));
    } else if (File.class.equals(aType)) {
        iSavedConfig.put(aKeyLiteral, new File(aDefault));
    } else if (Integer.class.equals(aType)) {
        iSavedConfig.put(aKeyLiteral, new Integer(aDefault));
    }
}