Example usage for java.lang Boolean booleanValue

List of usage examples for java.lang Boolean booleanValue

Introduction

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

Prototype

@HotSpotIntrinsicCandidate
public boolean booleanValue() 

Source Link

Document

Returns the value of this Boolean object as a boolean primitive.

Usage

From source file:org.jasig.cas.event.advice.AuthenticationHandlerMethodInterceptor.java

public Object invoke(final MethodInvocation methodInvocation) throws Throwable {

    try {/*ww  w . j a va 2s  .c  om*/
        final Boolean returnValue = (Boolean) methodInvocation.proceed();
        this.applicationEventPublisher
                .publishEvent(new AuthenticationEvent((Credentials) methodInvocation.getArguments()[0],
                        returnValue.booleanValue(), methodInvocation.getMethod().getDeclaringClass()));
        return returnValue;
    } catch (AuthenticationException e) {
        this.applicationEventPublisher
                .publishEvent(new AuthenticationEvent((Credentials) methodInvocation.getArguments()[0], false,
                        methodInvocation.getMethod().getDeclaringClass()));
        throw e;
    }
}

From source file:com.liangc.hq.base.utils.BizappUtils.java

public static boolean isAutoApprovedServer(int sessionId, AppdefBoss appdefBoss, AIServerValue aiServer) {
    // Load the server type cache if it's not loaded already
    synchronized (serverTypeCache) {
        if (serverTypeCache.size() == 0) {
            loadServerTypeCache(sessionId, appdefBoss);
        }/*from w w  w.  j a v  a 2 s .c  o m*/
    }
    Boolean isAutoApproved = (Boolean) serverTypeCache.get(aiServer.getServerTypeName());
    if (isAutoApproved == null) {
        // Should never happen
        return false;
    }
    return isAutoApproved.booleanValue();
}

From source file:com.agiletec.plugins.jpldap.aps.system.services.user.LdapUserManager.java

private boolean isActive() {
    String activeString = this.getConfigManager().getParam(LdapSystemConstants.ACTIVE_PARAM_NAME);
    Boolean active = Boolean.parseBoolean(activeString);
    return active.booleanValue();
}

From source file:dk.dbc.opensearch.datadock.DatadockMainTest.java

@Test
public void testSetServerMode() throws Exception {
    setConfigExpectations();//from ww  w.ja  v a  2s.com

    DatadockMain datadock = new DatadockMain();
    Deencapsulation.invoke(datadock, "setServerMode");
    Boolean field = (Boolean) Deencapsulation.getField(datadock, "terminateOnZeroSubmitted");
    assertFalse(field.booleanValue());
}

From source file:com.duroty.controller.actions.ForgotPasswordAction.java

/**
 * DOCUMENT ME!//from  w  w w.jav a2s . c  om
 *
 * @param request DOCUMENT ME!
 *
 * @return DOCUMENT ME!
 *
 * @throws NamingException DOCUMENT ME!
 * @throws RemoteException DOCUMENT ME!
 * @throws CreateException DOCUMENT ME!
 */
protected Open getOpenInstance(HttpServletRequest request)
        throws NamingException, RemoteException, CreateException {
    OpenHome home = null;

    Boolean localServer = new Boolean(Configuration.properties.getProperty(Configuration.LOCAL_WEB_SERVER));

    if (localServer.booleanValue()) {
        home = OpenUtil.getHome();
    } else {
        Hashtable environment = getContextProperties(request);
        home = OpenUtil.getHome(environment);
    }

    return home.create();
}

From source file:eu.intermodalics.tango_ros_streamer.ParameterNode.java

/**
 * Syncs the Parameter Server with all the current local shared preferences (app --> server).
 * @param sharedPreferences Reference to the preferences to sync.
 *///from w  w  w. ja v  a  2s .c  o  m
private void uploadPreferencesToDynamicReconfigure(SharedPreferences sharedPreferences) {
    Map<String, ?> prefKeys = sharedPreferences.getAll();

    for (Map.Entry<String, ?> entry : prefKeys.entrySet()) {
        if (Arrays.asList(mDynamicParamNames).contains(entry.getKey())) {
            if (entry.getValue() instanceof Boolean) {
                Boolean bool = (Boolean) entry.getValue();
                callDynamicReconfigure(entry.getKey(), bool.booleanValue());
            }
        }
    }
}

From source file:edu.umn.msi.tropix.proteomics.sequest.SequestBeanParameterTranslator.java

private String convertBoolean(final Boolean bool) {
    if (bool != null && bool.booleanValue()) {
        return "1";
    } else {//from   w  w  w  .  j  a v  a  2s.  c o m
        return "0";
    }
}

From source file:com.microsoft.tfs.core.clients.workitem.internal.rules.cache.RulePersonScopeCache.java

public synchronized boolean isRuleInScope(final int personID, final boolean inversePerson) {
    final Integer key = new Integer(personID);
    Boolean matches = personIds.get(key);
    if (matches == null) {
        matches = Boolean.valueOf(currentUserMatches(personID));
        personIds.put(key, matches);//from  ww  w .j a  v a 2 s .  c o  m
    }

    return inversePerson != matches.booleanValue();
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindBoolDefDefaultValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFBamMssCFBindBoolDefDefaultValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }/*w  w w  .  j  a  v a 2s  . c o  m*/

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFBamBoolDefObj) {
        Boolean defaultValue = ((ICFBamBoolDefObj) genDef).getOptionalDefaultValue();
        if (defaultValue == null) {
            ret = null;
        } else if (defaultValue.booleanValue()) {
            ret = "yes";
        } else {
            ret = "no";
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFBamBoolDefObj");
    }

    return (ret);
}

From source file:net.community.chest.gitcloud.facade.AbstractContextInitializer.java

protected File resolveApplicationBase(MutablePropertySources propSources,
        ExtendedPlaceholderResolver sourcesResolver) {
    Pair<File, Boolean> result = ConfigUtils.resolveGitcloudBase(sourcesResolver);
    File rootDir = result.getLeft();
    Boolean baseExists = result.getRight();
    if (!baseExists.booleanValue()) {
        propSources.addFirst(new MapPropertySource("gitcloudBase", Collections
                .<String, Object>singletonMap(ConfigUtils.GITCLOUD_BASE_PROP, rootDir.getAbsolutePath())));
        System.setProperty(ConfigUtils.GITCLOUD_BASE_PROP, rootDir.getAbsolutePath());
        logger.info("resolveApplicationBase - added " + ConfigUtils.GITCLOUD_BASE_PROP + ": "
                + ExtendedFileUtils.toString(rootDir));
    }/*w  ww.j  av  a  2s.  c  o m*/

    return rootDir;
}