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:ch.ralscha.extdirectspring.bean.api.Action.java

Action(String name, Integer len, Boolean formHandler, List<String> params, Boolean strict,
        List<String> metadataParams) {
    this.name = name;
    this.len = len;

    if (formHandler != null && formHandler.booleanValue()) {
        this.formHandler = formHandler;
    } else {/*ww w .j a v  a  2s.  c  o  m*/
        this.formHandler = null;
    }

    if (params != null) {
        this.params = params;
    } else {
        this.params = null;
    }

    if (strict != null && !strict.booleanValue()) {
        this.strict = strict;
    } else {
        this.strict = null;
    }

    if (metadataParams != null && !metadataParams.isEmpty()) {
        this.metadata = new Metadata(metadataParams);
    } else {
        this.metadata = null;
    }
}

From source file:mocks.MockEmailNotificationServiceImpl.java

/**
 * This overridden method will perform the standard operations from org.kuali.rice.kew.mail.ActionListEmailServiceImpl but will also keep track of action
 * items processed/*from  w w  w  .  jav  a  2 s  . c o  m*/
 */
@Override
public void sendImmediateReminder(ActionItem actionItem, Boolean skipOnApprovals) {
    if (skipOnApprovals != null && skipOnApprovals.booleanValue()
            && actionItem.getActionRequestCd().equals(KewApiConstants.ACTION_REQUEST_APPROVE_REQ)) {
        LOG.debug("As requested, skipping immediate reminder notification on action item approval for "
                + actionItem.getPrincipalId());
        return;
    }
    List actionItemsSentUser = (List) immediateReminders.get(actionItem.getPrincipalId());
    Preferences preferences = getPreferencesService().getPreferences(actionItem.getPrincipalId());

    boolean shouldNotify = checkEmailNotificationPreferences(actionItem, preferences,
            KewApiConstants.EMAIL_RMNDR_IMMEDIATE);
    if (shouldNotify) {
        if (actionItemsSentUser == null) {
            actionItemsSentUser = new ArrayList();
            immediateReminders.put(actionItem.getPrincipalId(), actionItemsSentUser);
        }
        actionItemsSentUser.add(actionItem);
    }
}

From source file:com.aurel.track.fieldType.runtime.matchers.run.SystemSelectMatcherRT.java

/**
 * Whether the value matches or not/*from   ww w. j a  v  a2s.com*/
 * @param attributeValue
 * @return
 */
@Override
public boolean match(Object attributeValue) {
    Boolean nullMatch = nullMatcher(attributeValue);
    if (nullMatch != null) {
        return nullMatch.booleanValue();
    }
    if (attributeValue == null || matchValue == null) {
        return false;
    }
    Integer attributeValueSystemOption = null;
    Integer matcherValueSystemOption = null;
    try {
        attributeValueSystemOption = (Integer) attributeValue;
    } catch (Exception e) {
        LOGGER.warn("Converting the attribute value " + attributeValue + " of type "
                + attributeValue.getClass().getName() + " to Integer failed with " + e.getMessage());
        LOGGER.debug(ExceptionUtils.getStackTrace(e));
        return false;
    }
    try {
        Integer[] matchValueArr = (Integer[]) matchValue;
        if (matchValueArr.length > 0) {
            matcherValueSystemOption = matchValueArr[0];
        }
    } catch (Exception e) {
        LOGGER.warn("Converting the matcher value " + matchValue + " of type " + matchValue.getClass().getName()
                + " to Integer failed with " + e.getMessage());
        LOGGER.debug(ExceptionUtils.getStackTrace(e));
        return false;
    }

    switch (relation) {
    case MatchRelations.EQUAL:
        return attributeValueSystemOption.equals(matcherValueSystemOption);
    case MatchRelations.NOT_EQUAL:
        return !attributeValueSystemOption.equals(matcherValueSystemOption);
    default:
        return false;
    }
}

From source file:edu.scripps.fl.curves.plot.MyXYErrorRenderer.java

public boolean getSeriesYError(int series) {
    Boolean yError = seriesYError.getBoolean(series);
    if (yError != null)
        return yError.booleanValue();
    return baseSeriesYError;
}

From source file:edu.scripps.fl.curves.plot.MyXYErrorRenderer.java

public boolean getSeriesXError(int series) {
    Boolean xError = seriesXError.getBoolean(series);
    if (xError != null)
        return xError.booleanValue();
    return baseSeriesXError;
}

From source file:ExpenseReport.java

public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
        int row, int column) {
    if (value instanceof Boolean) {
        Boolean b = (Boolean) value;
        setSelected(b.booleanValue());
    }/*ww w .  j a va  2  s  .  com*/

    setBackground(isSelected && !hasFocus ? table.getSelectionBackground() : table.getBackground());
    setForeground(isSelected && !hasFocus ? table.getSelectionForeground() : table.getForeground());

    setFont(table.getFont());
    setBorder(hasFocus ? UIManager.getBorder("Table.focusCellHighlightBorder") : m_noFocusBorder);

    return this;
}

From source file:eagle.query.aggregate.timeseries.AbstractAggregator.java

protected String determineGroupbyFieldValue(TaggedLogAPIEntity entity, String groupbyField, int i) {
    Boolean placement = _groupbyFieldPlacementCache[i];
    String groupbyFieldValue = null;
    if (placement != null) {
        groupbyFieldValue = placement.booleanValue() ? createGroupFromTags(entity, groupbyField, i)
                : createGroupFromQualifiers(entity, groupbyField, i);
    } else {//from  w  w  w.  j  ava  2  s .c  om
        groupbyFieldValue = createGroupFromTags(entity, groupbyField, i);
        if (groupbyFieldValue == null) {
            groupbyFieldValue = createGroupFromQualifiers(entity, groupbyField, i);
        }
    }
    groupbyFieldValue = (groupbyFieldValue == null ? UNASSIGNED : groupbyFieldValue);
    return groupbyFieldValue;
}

From source file:at.porscheinformatik.common.spring.web.extended.config.SpringWebExtendedRegistrar.java

@SuppressWarnings("unchecked")
private void handleTemplateController(Map<String, Object> annotationAttributes,
        BeanDefinitionRegistry registry) {
    Map<String, Object> templateControllerConfig = (Map<String, Object>) annotationAttributes
            .get(TEMPLATECONTROLLER_KEY);

    Assert.notNull(templateControllerConfig,
            "No config for TemplateController found in EnableSpringWebExtended");

    Boolean register = (Boolean) templateControllerConfig.get(TEMPLATECONTROLLERREGISTER_KEY);
    Boolean fallback = (Boolean) templateControllerConfig.get(TEMPLATECONTROLLERFALLBACK_KEY);

    if (register != null && register.booleanValue()) {
        registerTemplateController(registry, fallback);
    }/* w w  w .  ja  v a  2s .  c  o  m*/
}

From source file:be.agiv.security.handler.WSAddressingHandler.java

public boolean handleMessage(SOAPMessageContext context) {
    Boolean outboundProperty = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
    if (true == outboundProperty.booleanValue()) {
        try {/*  w ww  . j  av a 2s.com*/
            handleOutboundMessage(context);
        } catch (SOAPException e) {
            throw new ProtocolException(e);
        }
    } else {
        handleInboundMessage(context);
    }
    return true;
}

From source file:com.duroty.application.bookmark.actions.InsertBookmarkAction.java

protected ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
    ActionMessages errors = new ActionMessages();

    try {/*w ww .j  a  v a2  s.com*/
        DynaActionForm _form = (DynaActionForm) form;

        Bookmark bookmarkInstance = getBookmarkInstance(request);

        BookmarkObj bookmarkObj = new BookmarkObj();
        bookmarkObj.setUrl(_form.getString("url"));
        bookmarkObj.setTitle(_form.getString("title"));
        bookmarkObj.setComments(_form.getString("comments"));
        bookmarkObj.setKeywords(_form.getString("keywords"));

        Boolean flagged = (Boolean) _form.get("flagged");

        if (flagged == null) {
            flagged = new Boolean(false);
        }

        bookmarkObj.setFlagged(flagged.booleanValue());

        if (!StringUtils.isBlank(_form.getString("comments"))) {
            bookmarkObj.setNotebook(true);
        } else {
            bookmarkObj.setNotebook(false);
        }

        bookmarkInstance.addBookmark(bookmarkObj);
    } catch (Exception ex) {
        String errorMessage = ExceptionUtilities.parseMessage(ex);

        if (errorMessage == null) {
            errorMessage = "NullPointerException";
        }

        errors.add("general", new ActionMessage(ExceptionCode.ERROR_MESSAGES_PREFIX + "general", errorMessage));
        request.setAttribute("exception", errorMessage);
        doTrace(request, DLog.ERROR, getClass(), errorMessage);
    } finally {
    }

    if (errors.isEmpty()) {
        doTrace(request, DLog.INFO, getClass(), "OK");

        return mapping.findForward(Constants.ACTION_SUCCESS_FORWARD);
    } else {
        saveErrors(request, errors);

        return mapping.findForward(Constants.ACTION_FAIL_FORWARD);
    }
}