return bucket;
}
- private Bucket checkIndexed(@Nullable Resource resource) {
- Bucket bucket = getBucket(resource);
- if (bucket == null) {
- if (Scopes.isDirectory(resource) || Scopes.isFile(resource)) {
- bucket = doIndex(resource);
- }
- }
- return bucket;
- }
-
@Override
public boolean isExcluded(@Nullable Resource reference) {
return false;
* 1) key = new key and deprecatedKey = old key : this is the standard use case in a perfect world
* 2) key = null and deprecatedKey = oldKey : this is for plugins that are using deprecated constructors of
* {@link File} and {@link Directory}
- *
- * @param reference
- * @return
*/
private Bucket getBucket(@Nullable Resource reference) {
if (reference == null) {
if (ruleDto.getParentId() != null) {
RuleDto parent = buffer.rulesById.get(ruleDto.getParentId());
if (parent != null && !Rule.STATUS_REMOVED.equals(parent.getStatus())) {
- // TODO merge params and tags ?
ruleDto.setLanguage(parent.getLanguage());
ruleDto.setStatus(parent.getStatus());
ruleDto.setDefaultSubCharacteristicId(parent.getDefaultSubCharacteristicId());
}
}
if (toBeRemoved && !Rule.STATUS_REMOVED.equals(ruleDto.getStatus())) {
- // TODO log repository key
- LOG.info("Disable rule " + ruleDto.getRuleKey());
+ LOG.info(String.format("Disable rule %s:%s", ruleDto.getRepositoryKey(), ruleDto.getRuleKey()));
ruleDto.setStatus(Rule.STATUS_REMOVED);
ruleDto.setUpdatedAt(buffer.now());
for (RuleRuleTagDto removed : buffer.tagsByRuleId.removeAll(ruleDto.getId())) {