Java Code Examples for org.apache.commons.lang3.StringUtils.isNoneBlank()

The following are Jave code examples for showing how to use isNoneBlank() of the org.apache.commons.lang3.StringUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: saluki   File: GrpcReferenceRunner.java   View Source Code Vote up 7 votes
private String getGroup(SalukiReference reference, String serviceName, Class<?> referenceClass) {
  Pair<String, String> groupVersion = findGroupAndVersionByServiceName(serviceName);
  if (StringUtils.isNoneBlank(reference.group())) {
    return reference.group();
  } else if (StringUtils.isNoneBlank(groupVersion.getLeft())) {
    String replaceGroup = groupVersion.getLeft();
    Matcher matcher = REPLACE_PATTERN.matcher(replaceGroup);
    if (matcher.find()) {
      String replace = matcher.group().substring(2, matcher.group().length() - 1).trim();
      String[] replaces = StringUtils.split(replace, ":");
      if (replaces.length == 2) {
        String realGroup = env.getProperty(replaces[0], replaces[1]);
        return realGroup;
      } else {
        throw new IllegalArgumentException("replaces formater is #{XXXgroup:groupName}");
      }
    } else {
      return replaceGroup;
    }
  } else if (this.isGenericClient(referenceClass)) {
    return StringUtils.EMPTY;
  }
  throw new java.lang.IllegalArgumentException(String
      .format("reference group can not be null or empty,the servicName is %s", serviceName));

}
 
Example 2
Project: mmall   File: UserServiceImpl.java   View Source Code Vote up 6 votes
@Override
public ServerResponse<String> checkValid(String str, String type) {
    //isNoneBlank:表示null;"";"  "都返回false
    //isNoneEmpty:表示null;""返回false;而"   "返回true
    if (StringUtils.isNoneBlank(type)) {
        if (Const.USERNAME.equals(type)) {
            int resultCount = userMapper.checkUsername(str);
            if (resultCount > 0) {
                return ServerResponse.createByError("用户名已存在");
            }
        }
        if (Const.EMAIL.equals(type)) {
            int resultEmailCount = userMapper.checkEmail(str);
            if (resultEmailCount > 0) {
                return ServerResponse.createByError("邮箱已存在");
            }
        }
    }else {
        return ServerResponse.createByError("参数错误");
    }
    return ServerResponse.createBySuccess();
}
 
Example 3
Project: happylifeplat-transaction   File: NettyClientServiceImpl.java   View Source Code Vote up 5 votes
@Override
public void doConnect() {
    if (channel != null && channel.isActive()) {
        return;
    }
    final TxManagerServer txManagerServer = TxManagerLocator.getInstance().locator();
    if (Objects.nonNull(txManagerServer) &&
            StringUtils.isNoneBlank(txManagerServer.getHost())
            && Objects.nonNull(txManagerServer.getPort())) {
        host = txManagerServer.getHost();
        port = txManagerServer.getPort();
    }

    ChannelFuture future = bootstrap.connect(host, port);
    LogUtil.info(LOGGER, "连接txManager-socket服务-> host:port:{}", () -> host + ":" + port);

    future.addListener((ChannelFutureListener) futureListener -> {
        if (futureListener.isSuccess()) {
            channel = futureListener.channel();
            LogUtil.info(LOGGER, "Connect to server successfully!-> host:port:{}", () -> host + ":" + port);
        } else {
            LogUtil.info(LOGGER, "Failed to connect to server, try connect after 5s-> host:port:{}", () -> host + ":" + port);
            futureListener.channel().eventLoop().schedule(this::doConnect, 5, TimeUnit.SECONDS);
        }
    });

}
 
Example 4
Project: atlas   File: AbstractTool.java   View Source Code Vote up 5 votes
/**
 * 获取新版本的apkFileList
 *
 * @return
 */
public ApkFileList getNewApkFileList() {
    String newApkFileListStr = null;
    try {
        if (null != input.newApkFileList && input.newApkFileList.exists()) {
            newApkFileListStr = FileUtils.readFileToString(input.newApkFileList);
            if (StringUtils.isNoneBlank(newApkFileListStr)) {
                return JSON.parseObject(newApkFileListStr, ApkFileList.class);
            }
        }
    } catch (IOException e) {
    }

    return null;
}
 
Example 5
Project: atlas   File: SmaliCodeUtils.java   View Source Code Vote up 5 votes
/**
 * 将方法的实现转换为smali代码
 *
 * @param dexBackedMethodImplementation
 * @param withLineNo                    是否包含行号
 * @return
 */
public static String methodImplementionToCode(DexBackedMethodImplementation dexBackedMethodImplementation, boolean withLineNo) {
    if (null == dexBackedMethodImplementation) {
        return null;
    }
    StringWriter stringWriter = new StringWriter();
    IndentingWriter writer = new IndentingWriter(stringWriter);
    MethodDefinition methodDefinition = new MethodDefinition(toClassDefinition(dexBackedMethodImplementation),
            dexBackedMethodImplementation.method,
            dexBackedMethodImplementation);
    try {
        methodDefinition.writeTo(writer);
    } catch (IOException e) {
        throw new RuntimeException(e.getMessage(), e);
    }
    if (withLineNo) {
        return stringWriter.toString();
    } else {
        List<String> codes = Lists.newArrayList();
        String[] lines = StringUtils.split(stringWriter.toString(), "\n");
        for (String line : lines) {
            if (StringUtils.isNoneBlank(line) && !line.matches("\\s+\\.line\\s+[0-9]+$")) {
                codes.add(line);
            }
        }
        return StringUtils.join(codes, "\n");
    }

}
 
Example 6
Project: cassandra-client   File: NewConnectionBox.java   View Source Code Vote up 5 votes
@SuppressWarnings("unused")
private void handleClick(Event event) {
    String url = urlField.getText();
    String keyspace = keyspaceField.getText();

    if (StringUtils.isNoneBlank(url, keyspace)) {
        valueHandler.onConnectionData(new ConnectionData(url, keyspace,
                credentials.getUsername(), credentials.getPassword()));
        close();
    }
}
 
Example 7
Project: JavaToolKit   File: StringUtil.java   View Source Code Vote up 5 votes
public static List<String> getAtUser(String str){
	Pattern p = Pattern.compile("(?<[email protected]).*?(?= )");
	Matcher m = p.matcher(str);
	List<String> result=new ArrayList<String>();
	while(m.find()){
		if(StringUtils.isNoneBlank(m.group().trim())){
			result.add(m.group().trim());
		}
	}
	return result;
}
 
Example 8
Project: xm-ms-entity   File: XmEntityServiceImpl.java   View Source Code Vote up 5 votes
/**
 * Get all the xmEntities.
 *
 * @param pageable the pagination information
 * @return the list of entities
 */
@LogicExtensionPoint("FindAll")
@Override
@Transactional(readOnly = true)
public Page<XmEntity> findAll(Pageable pageable, String typeKey) {
    log.debug("Request to get all XmEntities");
    if (StringUtils.isNoneBlank(typeKey)) {
        Set<String> typeKeys = xmEntitySpecService.findNonAbstractTypesByPrefix(typeKey).stream()
            .map(TypeSpec::getKey).collect(Collectors.toSet());
        log.debug("Find by typeKeys {}", typeKeys);
        return xmEntityRepository.findAllByTypeKeyIn(pageable, typeKeys);
    } else {
        return xmEntityRepository.findAll(pageable);
    }
}
 
Example 9
Project: CodeBroker   File: RedisMap.java   View Source Code Vote up 5 votes
@Override
public T get(Object key) {
    Objects.requireNonNull(key);
    String value = jedis.hget(nameSpace, key.toString());
    if (StringUtils.isNoneBlank(value)) {
        return gson.fromJson(value, clazz);
    }
    return null;
}
 
Example 10
Project: smarti   File: ProcessingData.java   View Source Code Vote up 5 votes
public static ProcessingData create(Conversation conversation){
    AnalyzedTextBuilder atb = AnalyzedText.build();
    int numMessages = conversation.getMessages().size();
    boolean first = true;
    for(int i=0;i < numMessages; i++){
        Message message = conversation.getMessages().get(i);
        if(StringUtils.isNoneBlank(message.getContent())){
            Section section = atb.appendSection(first ? null : "\n", message.getContent(), "\n");
            section.addAnnotation(MESSAGE_IDX_ANNOTATION, i);
            section.addAnnotation(MESSAGE_ANNOTATION, message);
            first = false;
        } //else ignore blank messages for analysis
    }
    return new ProcessingData(conversation, atb.create());
}
 
Example 11
Project: happylifeplat-tcc   File: DubboTccTransactionInterceptor.java   View Source Code Vote up 5 votes
@Override
public Object interceptor(ProceedingJoinPoint pjp) throws Throwable {
    final String context = RpcContext.getContext().getAttachment(CommonConstant.TCC_TRANSACTION_CONTEXT);
    TccTransactionContext tccTransactionContext;
    if (StringUtils.isNoneBlank(context)) {
        tccTransactionContext =
                GsonUtils.getInstance().fromJson(context, TccTransactionContext.class);
    } else {
        tccTransactionContext = TransactionContextLocal.getInstance().get();
    }
    return tccTransactionAspectService.invoke(tccTransactionContext, pjp);
}
 
Example 12
Project: happylifeplat-transaction   File: ZookeeperRecoverTransactionServiceImpl.java   View Source Code Vote up 4 votes
/**
 * 分页获取补偿事务信息
 *
 * @param query 查询条件
 * @return CommonPager<TransactionRecoverVO>
 */
@Override
public CommonPager<TransactionRecoverVO> listByPage(RecoverTransactionQuery query) {

    CommonPager<TransactionRecoverVO> voCommonPager = new CommonPager<>();
    final int currentPage = query.getPageParameter().getCurrentPage();
    final int pageSize = query.getPageParameter().getPageSize();

    int start = (currentPage - 1) * pageSize;

    final String rootPath = RepositoryPathUtils.buildZookeeperPath(query.getApplicationName());

    List<String> zNodePaths;

    List<TransactionRecoverVO> voList;

    int totalCount;

    try {
        //如果只查 重试条件的
        if (StringUtils.isBlank(query.getTxGroupId()) && Objects.nonNull(query.getRetry())) {
            zNodePaths = zooKeeper.getChildren(rootPath, false);
            final List<TransactionRecoverVO> all = findAll(zNodePaths, rootPath);
            final List<TransactionRecoverVO> collect =
                    all.stream()
                            .filter(vo -> vo.getRetriedCount() < query.getRetry())
                            .collect(Collectors.toList());
            totalCount = collect.size();
            voList = collect.stream().skip(start).limit(pageSize).collect(Collectors.toList());

        } else if (StringUtils.isNoneBlank(query.getTxGroupId()) && Objects.isNull(query.getRetry())) {
            zNodePaths = Lists.newArrayList(query.getTxGroupId());
            totalCount = zNodePaths.size();
            voList = findAll(zNodePaths, rootPath);

        } else if (StringUtils.isNoneBlank(query.getTxGroupId()) && Objects.nonNull(query.getRetry())) {
            zNodePaths = Lists.newArrayList(query.getTxGroupId());
            totalCount = zNodePaths.size();
            voList = findAll(zNodePaths, rootPath)
                    .stream()
                    .filter(vo -> vo.getRetriedCount() < query.getRetry())
                    .collect(Collectors.toList());
        } else {
            zNodePaths = zooKeeper.getChildren(rootPath, false);
            totalCount = zNodePaths.size();
            voList = findByPage(zNodePaths, rootPath, start, pageSize);
        }
        voCommonPager.setPage(PageHelper.buildPage(query.getPageParameter(), totalCount));
        voCommonPager.setDataList(voList);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return voCommonPager;
}
 
Example 13
Project: happylifeplat-tcc   File: ZookeeperCompensationServiceImpl.java   View Source Code Vote up 4 votes
/**
 * 分页获取补偿事务信息
 *
 * @param query 查询条件
 * @return CommonPager<TransactionRecoverVO>
 */
@Override
public CommonPager<TccCompensationVO> listByPage(CompensationQuery query) {

    CommonPager<TccCompensationVO> voCommonPager = new CommonPager<>();
    final int currentPage = query.getPageParameter().getCurrentPage();
    final int pageSize = query.getPageParameter().getPageSize();

    int start = (currentPage - 1) * pageSize;

    final String rootPath = RepositoryPathUtils.buildZookeeperPathPrefix(query.getApplicationName());

    List<String> zNodePaths;

    List<TccCompensationVO> voList;

    int totalCount;

    try {
        //如果只查 重试条件的
        if (StringUtils.isBlank(query.getTransId()) && Objects.nonNull(query.getRetry())) {
            zNodePaths = zooKeeper.getChildren(rootPath, false);
            final List<TccCompensationVO> all = findAll(zNodePaths, rootPath);
            final List<TccCompensationVO> collect =
                    all.stream()
                            .filter(vo -> vo.getRetriedCount() < query.getRetry())
                            .collect(Collectors.toList());
            totalCount = collect.size();
            voList = collect.stream().skip(start).limit(pageSize).collect(Collectors.toList());

        } else if (StringUtils.isNoneBlank(query.getTransId()) && Objects.isNull(query.getRetry())) {
            zNodePaths = Lists.newArrayList(query.getTransId());
            totalCount = zNodePaths.size();
            voList = findAll(zNodePaths, rootPath);

        } else if (StringUtils.isNoneBlank(query.getTransId()) && Objects.nonNull(query.getRetry())) {
            zNodePaths = Lists.newArrayList(query.getTransId());
            totalCount = zNodePaths.size();
            voList = findAll(zNodePaths, rootPath)
                    .stream()
                    .filter(vo -> vo.getRetriedCount() < query.getRetry())
                    .collect(Collectors.toList());
        } else {
            zNodePaths = zooKeeper.getChildren(rootPath, false);
            totalCount = zNodePaths.size();
            voList = findByPage(zNodePaths, rootPath, start, pageSize);
        }
        voCommonPager.setPage(PageHelper.buildPage(query.getPageParameter(), totalCount));
        voCommonPager.setDataList(voList);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return voCommonPager;
}
 
Example 14
Project: happylifeplat-tcc   File: RedisCompensationServiceImpl.java   View Source Code Vote up 4 votes
/**
 * 分页获取补偿事务信息
 *
 * @param query 查询条件
 * @return CommonPager<TransactionRecoverVO>
 */
@Override
public CommonPager<TccCompensationVO> listByPage(CompensationQuery query) {

    CommonPager<TccCompensationVO> commonPager = new CommonPager<>();

    final String redisKeyPrefix = RepositoryPathUtils.buildRedisKeyPrefix(query.getApplicationName());

    final int currentPage = query.getPageParameter().getCurrentPage();
    final int pageSize = query.getPageParameter().getPageSize();

    int start = (currentPage - 1) * pageSize;


    //transaction:compensate:alipay-service:
    //获取所有的key
    Set<byte[]> keys;

    List<TccCompensationVO> voList;

    int totalCount;

    //如果只查 重试条件的
    if (StringUtils.isBlank(query.getTransId()) && Objects.nonNull(query.getRetry())) {
        keys = jedisClient.keys((redisKeyPrefix + "*").getBytes());
        final List<TccCompensationVO> all = findAll(keys);
        final List<TccCompensationVO> collect =
                all.stream()
                        .filter(vo -> vo.getRetriedCount() < query.getRetry())
                        .collect(Collectors.toList());
        totalCount = collect.size();
        voList = collect.stream().skip(start).limit(pageSize).collect(Collectors.toList());
    } else if (StringUtils.isNoneBlank(query.getTransId()) && Objects.isNull(query.getRetry())) {
        keys = Sets.newHashSet(String.join(":", redisKeyPrefix, query.getTransId()).getBytes());
        totalCount = keys.size();
        voList = findAll(keys);
    } else if (StringUtils.isNoneBlank(query.getTransId()) && Objects.nonNull(query.getRetry())) {
        keys = Sets.newHashSet(String.join(":", redisKeyPrefix, query.getTransId()).getBytes());
        totalCount = keys.size();
        voList = findAll(keys)
                .stream()
                .filter(vo -> vo.getRetriedCount() < query.getRetry())
                .collect(Collectors.toList());
    } else {
        keys = jedisClient.keys((redisKeyPrefix + "*").getBytes());
        if (keys.size() <= 0 || keys.size() < start) {
            return commonPager;
        }
        totalCount = keys.size();
        voList = findByPage(keys, start, pageSize);
    }

    if (keys.size() <= 0 || keys.size() < start) {
        return commonPager;
    }
    commonPager.setPage(PageHelper.buildPage(query.getPageParameter(), totalCount));
    commonPager.setDataList(voList);
    return commonPager;
}
 
Example 15
Project: lib-edge   File: PipeService.java   View Source Code Vote up 4 votes
/**
 * 获取带参数的url链接
 *
 * @return URI
 * @throws URISyntaxException exception
 */
private URL getRequestUri(HttpServletRequest request, Method method, Class controllerClass, String mappingUrl, Map<String, String[]> filterParam)
  throws URISyntaxException, UnsupportedEncodingException, MalformedURLException, GenericException {
  PipeConfig controllerPipeConfig = (PipeConfig) controllerClass.getAnnotation(PipeConfig.class);
  String requestUri = request.getRequestURI();
  log.debug("requestUri:{}", requestUri);
  String finalRequestUrl = mappingUrl;
  PipeConfig pipeConfig = method.getAnnotation(PipeConfig.class);
  if (pipeConfig != null && StringUtils.isNoneBlank(pipeConfig.clientUrl())) {
    finalRequestUrl = pipeConfig.clientUrl();
  }
  String requestHost = null;
  if (controllerPipeConfig != null && StringUtils.isNoneBlank(controllerPipeConfig.clientHost())) {
    requestHost = env.getProperty(controllerPipeConfig.clientHost());
  }
  if (pipeConfig != null && StringUtils.isNoneBlank(pipeConfig.clientHost())) {
    requestHost = env.getProperty(pipeConfig.clientHost());
  }
  if (requestHost == null) {
    throw new GenericException("1911003", "透传Host不能为空");
  }
  URL url = new URL(requestHost);
  String path = url.getPath();
  if (path.startsWith("/")) {
    path = path.substring(1);
  }
  if (path.endsWith("/")) {
    path = path.substring(0, path.length() - 1);
  }
  //get a map which have many <key,value> like <"{orderNumber}","123">
  Map<String, String> paramMap = getPathParamMap(mappingUrl, requestUri);
  for (Map.Entry<String, String> entry : paramMap.entrySet()) {
    finalRequestUrl = finalRequestUrl.replace(entry.getKey(), entry.getValue());
  }
  if (finalRequestUrl.startsWith("/")) {
    finalRequestUrl = finalRequestUrl.substring(1);
  }
  log.debug("finalRequestUri:{}", finalRequestUrl);
  HttpUrl.Builder builder = getBuilder(url, path, finalRequestUrl, filterParam);
  return builder.build().url();
}
 
Example 16
Project: cas-5.1.0   File: Beans.java   View Source Code Vote up 4 votes
/**
 * New blocking connection pool connection pool.
 *
 * @param l the l
 * @return the connection pool
 */
public static ConnectionPool newLdaptiveBlockingConnectionPool(final AbstractLdapProperties l) {
    final DefaultConnectionFactory bindCf = newLdaptiveConnectionFactory(l);
    final PoolConfig pc = newLdaptivePoolConfig(l);
    final BlockingConnectionPool cp = new BlockingConnectionPool(pc, bindCf);

    cp.setBlockWaitTime(newDuration(l.getBlockWaitTime()));
    cp.setPoolConfig(pc);

    final IdlePruneStrategy strategy = new IdlePruneStrategy();
    strategy.setIdleTime(newDuration(l.getIdleTime()));
    strategy.setPrunePeriod(newDuration(l.getPrunePeriod()));

    cp.setPruneStrategy(strategy);

    switch (l.getValidator().getType().trim().toLowerCase()) {
        case "compare":
            final CompareRequest compareRequest = new CompareRequest();
            compareRequest.setDn(l.getValidator().getDn());
            compareRequest.setAttribute(new LdapAttribute(l.getValidator().getAttributeName(),
                    l.getValidator().getAttributeValues().toArray(new String[]{})));
            compareRequest.setReferralHandler(new SearchReferralHandler());
            cp.setValidator(new CompareValidator(compareRequest));
            break;
        case "none":
            LOGGER.debug("No validator is configured for the LDAP connection pool of [{}]", l.getLdapUrl());
            break;
        case "search":
        default:
            final SearchRequest searchRequest = new SearchRequest();
            searchRequest.setBaseDn(l.getValidator().getBaseDn());
            searchRequest.setSearchFilter(new SearchFilter(l.getValidator().getSearchFilter()));
            searchRequest.setReturnAttributes(ReturnAttributes.NONE.value());
            searchRequest.setSearchScope(l.getValidator().getScope());
            searchRequest.setSizeLimit(1L);
            searchRequest.setReferralHandler(new SearchReferralHandler());
            cp.setValidator(new SearchValidator(searchRequest));
            break;
    }

    cp.setFailFastInitialize(l.isFailFast());

    if (StringUtils.isNotBlank(l.getPoolPassivator())) {
        final AbstractLdapProperties.LdapConnectionPoolPassivator pass =
                AbstractLdapProperties.LdapConnectionPoolPassivator.valueOf(l.getPoolPassivator().toUpperCase());
        switch (pass) {
            case CLOSE:
                cp.setPassivator(new ClosePassivator());
                LOGGER.debug("Created [{}] passivator for [{}]", l.getPoolPassivator(), l.getLdapUrl());
                break;
            case BIND:
                if (StringUtils.isNotBlank(l.getBindDn()) && StringUtils.isNoneBlank(l.getBindCredential())) {
                    final BindRequest bindRequest = new BindRequest();
                    bindRequest.setDn(l.getBindDn());
                    bindRequest.setCredential(new Credential(l.getBindCredential()));
                    cp.setPassivator(new BindPassivator(bindRequest));
                    LOGGER.debug("Created [{}] passivator for [{}]", l.getPoolPassivator(), l.getLdapUrl());
                } else {
                    LOGGER.warn("No [{}] passivator could be created for [{}] given bind credentials are not specified",
                            l.getPoolPassivator(), l.getLdapUrl());
                }
                break;
            default:
                break;
        }
    }

    LOGGER.debug("Initializing ldap connection pool for [{}] and bindDn [{}]", l.getLdapUrl(), l.getBindDn());
    cp.initialize();
    return cp;
}
 
Example 17
Project: oscm   File: UdaRow.java   View Source Code Vote up 4 votes
public String getUdaNameToShow() {
    if (StringUtils.isNoneBlank(udaDefinition.getName())) {
        return udaDefinition.getName();
    }
    return udaDefinition.getUdaId();
}
 
Example 18
Project: cas-server-4.2.1   File: DefaultUniqueTicketIdGenerator.java   View Source Code Vote up 4 votes
public void setSuffix(final String suffix) {
    this.suffix = StringUtils.isNoneBlank(suffix) ? '-' + suffix : null;
}
 
Example 19
Project: happylifeplat-transaction   File: JdbcRecoverTransactionServiceImpl.java   View Source Code Vote up 2 votes
/**
 * 分页获取补偿事务信息
 *
 * @param query 查询条件
 * @return CommonPager<TransactionRecoverVO>
 */
@Override
public CommonPager<TransactionRecoverVO> listByPage(RecoverTransactionQuery query) {
    final String tableName = RepositoryPathUtils.buildDbTableName(query.getApplicationName());
    final PageParameter pageParameter = query.getPageParameter();

    StringBuilder sqlBuilder = new StringBuilder();

    sqlBuilder.append("select id,target_class,target_method," +
            " retried_count,create_time,last_time,version,group_id,task_id from ")
            .append(tableName).append(" where 1= 1 ");


    if (StringUtils.isNoneBlank(query.getTxGroupId())) {
        sqlBuilder.append(" and group_id = ").append(query.getTxGroupId());
    }

    if (Objects.nonNull(query.getRetry())) {

        sqlBuilder.append(" and retried_count < ").append(query.getRetry());
    }

    final String sql = buildPageSql(sqlBuilder.toString(), pageParameter);

    CommonPager<TransactionRecoverVO> pager = new CommonPager<>();


    final List<Map<String, Object>> mapList = jdbcTemplate.queryForList(sql);

    if (CollectionUtils.isNotEmpty(mapList)) {

        pager.setDataList(mapList.stream().map(this::buildByMap).collect(Collectors.toList()));
    }

    final Integer totalCount =
            jdbcTemplate.queryForObject("select count(1) from " + tableName, Integer.class);


    pager.setPage(PageHelper.buildPage(pageParameter, totalCount));

    return pager;
}
 
Example 20
Project: living-documentation   File: DomainObject.java   View Source Code Vote up 2 votes
/**
 * The full name of a domain object is it's qualified name like Class.field.
 * If the domain object is mapped, i.e. it has been translated by a business glossary file, then the fullName is only the translated name.
 * Parent class name is not showed because the field should already be fully qualified by it's translation.
 *
 * @return the full name as it will be represented in the glossary.
 */
public String getFullName() {
    return (!mapped && StringUtils.isNoneBlank(parentName) ? parentName + "." : EMPTY) + name;
}