@Override protected void notifyForGenericListener(final String upstreamDependency) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); // If the upstream dependency is null or invalid do not continue if (StringUtils.isBlank(upstreamDependency) || !MetadataIdentificationUtils.isValid(upstreamDependency)) { return; } // If the upstream dependency isn't ProjectMetadata do not continue if (!ProjectMetadata.isValid(upstreamDependency)) { return; } // If the project isn't valid do not continue if (projectOperations.isProjectAvailable(ProjectMetadata.getModuleName(upstreamDependency))) { final boolean isGaeEnabled = projectOperations.isFeatureInstalled(FeatureNames.GAE); // We need to determine if the persistence state has changed, we do // this by comparing the last known state to the current state final boolean hasGaeStateChanged = wasGaeEnabled == null || isGaeEnabled != wasGaeEnabled; if (hasGaeStateChanged) { wasGaeEnabled = isGaeEnabled; for (final String producedMid : producedMids) { getMetadataService().evictAndGet(producedMid); } } } }
projectOperations = getProjectOperations();
@Override protected void notifyForGenericListener(final String upstreamDependency) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); // If the upstream dependency is null or invalid do not continue if (StringUtils.isBlank(upstreamDependency) || !MetadataIdentificationUtils.isValid(upstreamDependency)) { return; } // If the upstream dependency isn't ProjectMetadata do not continue if (!ProjectMetadata.isValid(upstreamDependency)) { return; } // If the project isn't valid do not continue if (projectOperations.isProjectAvailable(ProjectMetadata.getModuleName(upstreamDependency))) { final boolean isGaeEnabled = projectOperations.isFeatureInstalled(FeatureNames.GAE); // We need to determine if the persistence state has changed, we do // this by comparing the last known state to the current state final boolean hasGaeStateChanged = wasGaeEnabled == null || isGaeEnabled != wasGaeEnabled; if (hasGaeStateChanged) { wasGaeEnabled = isGaeEnabled; for (final String producedMid : producedMids) { getMetadataService().evictAndGet(producedMid); } } } }