congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
BooleanUtils.isNotTrue
Code IndexAdd Tabnine to your IDE (free)

How to use
isNotTrue
method
in
org.apache.commons.lang3.BooleanUtils

Best Java code snippets using org.apache.commons.lang3.BooleanUtils.isNotTrue (Showing top 20 results out of 315)

origin: org.apache.commons/commons-lang3

@Test
public void test_isNotTrue_Boolean() {
  assertFalse(BooleanUtils.isNotTrue(Boolean.TRUE));
  assertTrue(BooleanUtils.isNotTrue(Boolean.FALSE));
  assertTrue(BooleanUtils.isNotTrue(null));
}
origin: BroadleafCommerce/BroadleafCommerce

protected void checkUser(AdminUser user, GenericResponse response) {
  if (user == null) {
    response.addErrorCode("invalidUser");
  } else if (StringUtils.isBlank(user.getEmail())) {
    response.addErrorCode("emailNotFound");
  } else if (BooleanUtils.isNotTrue(user.getActiveStatusFlag())) {
    response.addErrorCode("inactiveUser");
  }
}

origin: daniellitoc/xultimate-toolkit

/**
 * <p>Checks if a {@code Boolean} value is <i>not</i> {@code true},
 * handling {@code null} by returning {@code true}.</p>
 *
 * <pre>
 *   BooleanUtils.isNotTrue(Boolean.TRUE)  = false
 *   BooleanUtils.isNotTrue(Boolean.FALSE) = true
 *   BooleanUtils.isNotTrue(null)          = true
 * </pre>
 *
 * @param bool  the boolean to check, null returns {@code true}
 * @return {@code true} if the input is null or false
 * @since 2.3
 */
public static boolean isNotTrue(Boolean bool) {
  return org.apache.commons.lang3.BooleanUtils.isNotTrue(bool);
}
origin: metatron-app/metatron-discovery

/**
 * Used in Projection
 */
public List<Field> findUnloadedField() {
 if (CollectionUtils.isEmpty(this.fields)) {
  return Lists.newArrayList();
 }
 return fields.stream()
        .filter(field -> BooleanUtils.isNotTrue(field.getUnloaded()))
        .collect(Collectors.toList());
}
origin: com.haulmont.reports/reports-gui

protected EnumSet<ReportImportOption> getImportOptions() {
  if (BooleanUtils.isNotTrue(importRoles.getValue())) {
    return EnumSet.of(ReportImportOption.DO_NOT_IMPORT_ROLES);
  }
  return null;
}
origin: metatron-app/metatron-discovery

public void excludeUnloadedField() {
 if (CollectionUtils.isEmpty(this.fields)) {
  return;
 }
 fields = fields.stream()
         .filter(field -> BooleanUtils.isNotTrue(field.getUnloaded()))
         .collect(Collectors.toList());
}
origin: metatron-app/metatron-discovery

@HandleBeforeLinkSave
@PreAuthorize("hasAuthority('PERM_SYSTEM_MANAGE_DATASOURCE')")
public void handleBeforeLinkSave(DataSource dataSource, Object linked) {
 // 연결된 워크스페이스 개수 처리,
 // PATCH 일경우 linked 객체에 값이 주입되나 PUT 인경우 값이 주입되지 않아
 // linked 객체 체크를 수행하지 않음
 if (BooleanUtils.isNotTrue(dataSource.getPublished())) {
  dataSource.setLinkedWorkspaces(dataSource.getWorkspaces().size());
  LOGGER.debug("UPDATED: Set linked workspace in datasource({}) : {}", dataSource.getId(), dataSource.getLinkedWorkspaces());
 }
}
origin: metatron-app/metatron-discovery

@HandleBeforeCreate
public void handleBeforeCreate(DataConnection dataConnection) {
 if(BooleanUtils.isNotTrue(dataConnection.getPublished()) && CollectionUtils.isNotEmpty(dataConnection.getWorkspaces())) {
  dataConnection.setLinkedWorkspaces(dataConnection.getWorkspaces().size());
 }
}
origin: metatron-app/metatron-discovery

@RequestMapping(value = "/datasources/query/candidate", method = RequestMethod.POST)
public ResponseEntity<?> metaDataQuery(@RequestBody CandidateQueryRequest queryRequest) {
 dataSourceValidator.validateQuery(queryRequest);
 // Link 타입의 데이터 소스일 경우, 별도 JDBC 처리
 if (queryRequest.getDataSource().getMetaDataSource().getConnType() == LINK &&
   BooleanUtils.isNotTrue(queryRequest.getDataSource().getTemporary())) {
  return ResponseEntity.ok(jdbcConnectionService.selectCandidateQuery(queryRequest));
 } else {
  return ResponseEntity.ok(engineQueryService.candidate(queryRequest));
 }
}
origin: metatron-app/metatron-discovery

@HandleBeforeLinkSave
public void handleBeforeLinkSave(DataConnection dataConnection, Object linked) {
 // 연결된 워크스페이스 개수 처리,
 // PATCH 일경우 linked 객체에 값이 주입되나 PUT 인경우 값이 주입되지 않아
 // linked 객체 체크를 수행하지 않음
 if(BooleanUtils.isNotTrue(dataConnection.getPublished())) {
  dataConnection.setLinkedWorkspaces(dataConnection.getWorkspaces().size());
  LOGGER.debug("UPDATED: Set linked workspace in datasource({}) : {}", dataConnection.getId(), dataConnection.getLinkedWorkspaces());
 }
}
origin: metatron-app/metatron-discovery

@HandleBeforeLinkDelete
@PreAuthorize("hasAuthority('PERM_SYSTEM_MANAGE_DATASOURCE')")
public void handleBeforeLinkDelete(DataSource dataSource, Object linked) {
 // 연결된 워크스페이스 개수 처리,
 // 전체 공개 워크스페이스가 아니고 linked 내 Entity 타입이 Workspace 인 경우
 if (BooleanUtils.isNotTrue(dataSource.getPublished()) &&
   !CollectionUtils.sizeIsEmpty(linked) &&
   CollectionUtils.get(linked, 0) instanceof Workspace) {
  dataSource.setLinkedWorkspaces(dataSource.getWorkspaces().size());
  LOGGER.debug("DELETED: Set linked workspace in datasource({}) : {}", dataSource.getId(), dataSource.getLinkedWorkspaces());
 }
}
origin: metatron-app/metatron-discovery

@HandleBeforeLinkDelete
@PreAuthorize("hasAuthority('PERM_SYSTEM_MANAGE_DATASOURCE')")
public void handleBeforeLinkDelete(DataConnection dataConnection, Object linked) {
 // 연결된 워크스페이스 개수 처리,
 // 전체 공개 워크스페이스가 아니고 linked 내 Entity 타입이 Workspace 인 경우
 if(BooleanUtils.isNotTrue(dataConnection.getPublished()) &&
   !CollectionUtils.sizeIsEmpty(linked) &&
   CollectionUtils.get(linked, 0) instanceof Workspace) {
  dataConnection.setLinkedWorkspaces(dataConnection.getWorkspaces().size());
  LOGGER.debug("DELETED: Set linked workspace in datasource({}) : {}", dataConnection.getId(), dataConnection.getLinkedWorkspaces());
 }
}
origin: metatron-app/metatron-discovery

 break;
case TIMESTAMP:
 if (BooleanUtils.isNotTrue(field.getDerived())) {
  resultFields.add(new TimestampField(fieldName, ref, field.getFormatObject()));
origin: org.opensingular/singular-form-wicket

/**
 * Method for reload the configuration of Javascript for the Component.
 * This method will include a meta data for configure the Javascripts elements just one time.
 *
 * @param ctx   The context.
 * @param input The input.
 */
private void configureJSForComponent(WicketBuildContext ctx, Component input) {
  for (FormComponent<?> fc : findAjaxComponents(input)) {
    if (BooleanUtils.isNotTrue(fc.getMetaData(MDK_COMPONENT_CONFIGURED))) {
      ctx.configure(this, fc);
      fc.setMetaData(MDK_COMPONENT_CONFIGURED, Boolean.TRUE);
    }
  }
}
origin: org.finra.herd/herd-service

/**
 * Validate the tag search request. This method also trims the request parameters.
 *
 * @param tagSearchRequest the tag search request
 */
private void validateTagSearchRequest(TagSearchRequest tagSearchRequest)
{
  Assert.notNull(tagSearchRequest, "A tag search request must be specified.");
  // Continue validation if the list of tag search filters is not empty.
  if (CollectionUtils.isNotEmpty(tagSearchRequest.getTagSearchFilters()) && tagSearchRequest.getTagSearchFilters().get(0) != null)
  {
    // Validate that there is only one tag search filter.
    Assert.isTrue(CollectionUtils.size(tagSearchRequest.getTagSearchFilters()) == 1, "At most one tag search filter must be specified.");
    // Get the tag search filter.
    TagSearchFilter tagSearchFilter = tagSearchRequest.getTagSearchFilters().get(0);
    // Validate that exactly one tag search key is specified.
    Assert.isTrue(CollectionUtils.size(tagSearchFilter.getTagSearchKeys()) == 1 && tagSearchFilter.getTagSearchKeys().get(0) != null,
      "Exactly one tag search key must be specified.");
    // Get the tag search key.
    TagSearchKey tagSearchKey = tagSearchFilter.getTagSearchKeys().get(0);
    tagSearchKey.setTagTypeCode(alternateKeyHelper.validateStringParameter("tag type code", tagSearchKey.getTagTypeCode()));
    if (tagSearchKey.getParentTagCode() != null)
    {
      tagSearchKey.setParentTagCode(tagSearchKey.getParentTagCode().trim());
    }
    // Fail validation when parent tag code is specified along with the isParentTagNull flag set to true.
    Assert.isTrue(StringUtils.isBlank(tagSearchKey.getParentTagCode()) || BooleanUtils.isNotTrue(tagSearchKey.isIsParentTagNull()),
      "A parent tag code can not be specified when isParentTagNull flag is set to true.");
  }
}
origin: metatron-app/metatron-discovery

if(ds.getStatus() == FAILED && BooleanUtils.isNotTrue(ds.getFailOnEngine())) {
 continue;
origin: FINRAOS/herd

/**
 * Validate the tag search request. This method also trims the request parameters.
 *
 * @param tagSearchRequest the tag search request
 */
private void validateTagSearchRequest(TagSearchRequest tagSearchRequest)
{
  Assert.notNull(tagSearchRequest, "A tag search request must be specified.");
  // Continue validation if the list of tag search filters is not empty.
  if (CollectionUtils.isNotEmpty(tagSearchRequest.getTagSearchFilters()) && tagSearchRequest.getTagSearchFilters().get(0) != null)
  {
    // Validate that there is only one tag search filter.
    Assert.isTrue(CollectionUtils.size(tagSearchRequest.getTagSearchFilters()) == 1, "At most one tag search filter must be specified.");
    // Get the tag search filter.
    TagSearchFilter tagSearchFilter = tagSearchRequest.getTagSearchFilters().get(0);
    // Validate that exactly one tag search key is specified.
    Assert.isTrue(CollectionUtils.size(tagSearchFilter.getTagSearchKeys()) == 1 && tagSearchFilter.getTagSearchKeys().get(0) != null,
      "Exactly one tag search key must be specified.");
    // Get the tag search key.
    TagSearchKey tagSearchKey = tagSearchFilter.getTagSearchKeys().get(0);
    tagSearchKey.setTagTypeCode(alternateKeyHelper.validateStringParameter("tag type code", tagSearchKey.getTagTypeCode()));
    if (tagSearchKey.getParentTagCode() != null)
    {
      tagSearchKey.setParentTagCode(tagSearchKey.getParentTagCode().trim());
    }
    // Fail validation when parent tag code is specified along with the isParentTagNull flag set to true.
    Assert.isTrue(StringUtils.isBlank(tagSearchKey.getParentTagCode()) || BooleanUtils.isNotTrue(tagSearchKey.isIsParentTagNull()),
      "A parent tag code can not be specified when isParentTagNull flag is set to true.");
  }
}
origin: com.haulmont.cuba/cuba-core

protected Set<String> getAllAttributes(Entity entity) {
  if (entity == null) {
    return null;
  }
  Set<String> attributes = new HashSet<>();
  MetaClass metaClass = metadata.getClassNN(entity.getClass());
  for (MetaProperty metaProperty : metaClass.getProperties()) {
    Range range = metaProperty.getRange();
    if (range.isClass() && range.getCardinality().isMany()) {
      continue;
    }
    attributes.add(metaProperty.getName());
  }
  Collection<CategoryAttribute> categoryAttributes = dynamicAttributes.getAttributesForMetaClass(metaClass);
  if (categoryAttributes != null) {
    for (CategoryAttribute categoryAttribute : categoryAttributes) {
      if (BooleanUtils.isNotTrue(categoryAttribute.getIsCollection())) {
        attributes.add(
            DynamicAttributesUtils.getMetaPropertyPath(metaClass, categoryAttribute).getMetaProperty().getName());
      }
    }
  }
  return attributes;
}
origin: metatron-app/metatron-discovery

/**
 * 데이터 소스 상세 조회 (임시 데이터 소스도 함께 조회 가능)
 */
@Transactional(readOnly = true)
public DataSource findDataSourceIncludeTemporary(String dataSourceId, Boolean includeUnloadedField) {
 DataSource dataSource;
 if (dataSourceId.indexOf(ID_PREFIX) == 0) {
  LOGGER.debug("Find temporary datasource : {}" + dataSourceId);
  DataSourceTemporary temporary = temporaryRepository.findOne(dataSourceId);
  if (temporary == null) {
   throw new ResourceNotFoundException(dataSourceId);
  }
  dataSource = dataSourceRepository.findOne(temporary.getDataSourceId());
  if (dataSource == null) {
   throw new DataSourceTemporaryException(DataSourceErrorCodes.VOLATILITY_NOT_FOUND_CODE,
                       "Not found related datasource :" + temporary.getDataSourceId());
  }
  dataSource.setEngineName(temporary.getName());
  dataSource.setTemporary(temporary);
 } else {
  dataSource = dataSourceRepository.findOne(dataSourceId);
  if (dataSource == null) {
   throw new ResourceNotFoundException(dataSourceId);
  }
 }
 if (BooleanUtils.isNotTrue(includeUnloadedField)) {
  dataSource.excludeUnloadedField();
 }
 return dataSource;
}
origin: OpenWiseSolutions/openhub-framework

protected void finalizeExternalCall(Exchange exchange, ExternalCall externalCall, ExternalCallService service) {
  Boolean success = exchange.getProperty(ExtCallComponentParams.EXTERNAL_CALL_SUCCESS, Boolean.class);
  if (success == null) {
    // success is not defined forcefully -> determine success normally
    success = !exchange.isFailed()
        && isNotTrue(exchange.getProperty(Exchange.ROUTE_STOP, Boolean.class));
  }
  if (success) {
    service.complete(externalCall);
  } else {
    service.failed(externalCall);
  }
  // cleanup:
  exchange.removeProperty(ExtCallComponentParams.EXTERNAL_CALL_OPERATION);
  exchange.removeProperty(ExtCallComponentParams.EXTERNAL_CALL_KEY);
  exchange.removeProperty(ExtCallComponentParams.EXTERNAL_CALL_SUCCESS);
}
org.apache.commons.lang3BooleanUtilsisNotTrue

Javadoc

Checks if a Boolean value is not true, handling null by returning true.

 
BooleanUtils.isNotTrue(Boolean.TRUE)  = false 
BooleanUtils.isNotTrue(Boolean.FALSE) = true 
BooleanUtils.isNotTrue(null)          = true 

Popular methods of BooleanUtils

  • toBoolean
    Converts a String to a Boolean throwing an exception if no match found. BooleanUtils.toBoolean("t
  • isTrue
    Checks if a Boolean value is true, handling null by returning false. BooleanUtils.isTrue(Boolean.
  • toBooleanObject
    Converts a String to a Boolean throwing an exception if no match. NOTE: This returns null and will
  • isFalse
    Checks if a Boolean value is false, handling null by returning false. BooleanUtils.isFalse(Boolea
  • toStringTrueFalse
    Converts a boolean to a String returning 'true'or 'false'. BooleanUtils.toStringTrueFalse(true)
  • toBooleanDefaultIfNull
    Converts a Boolean to a boolean handling null. BooleanUtils.toBooleanDefaultIfNull(Boolean.TRUE,
  • toString
    Converts a boolean to a String returning one of the input Strings. BooleanUtils.toString(true, "t
  • isNotFalse
    Checks if a Boolean value is not false, handling null by returning true. BooleanUtils.isNotFalse(
  • or
    Performs an or on a set of booleans. BooleanUtils.or(true, true) = true BooleanUtils.or
  • and
    Performs an and on a set of booleans. BooleanUtils.and(true, true) = true BooleanUtils.a
  • toStringYesNo
    Converts a boolean to a String returning 'yes'or 'no'. BooleanUtils.toStringYesNo(true) = "yes"
  • xor
    Performs an xor on a set of booleans. BooleanUtils.xor(true, true) = false BooleanUtils.xor(fa
  • toStringYesNo,
  • xor,
  • toInteger,
  • compare,
  • negate,
  • toStringOnOff,
  • <init>,
  • toIntegerObject

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now