Skip to content

Commit

Permalink
LPS-116757 configuration-admin-web: removes visibility filtering from…
Browse files Browse the repository at this point in the history
… the original impl of ConfigurationModelRetriever
  • Loading branch information
drewbrokke authored and brianchandotcom committed Jul 15, 2020
1 parent a026a27 commit 561aef1
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

package com.liferay.configuration.admin.web.internal.util;

import com.liferay.configuration.admin.display.ConfigurationVisibilityController;
import com.liferay.configuration.admin.web.internal.model.ConfigurationModel;
import com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMap;
import com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMapFactory;
import com.liferay.petra.reflect.ReflectionUtil;
import com.liferay.petra.string.StringBundler;
import com.liferay.petra.string.StringPool;
Expand Down Expand Up @@ -50,7 +47,6 @@
import org.osgi.service.cm.ConfigurationAdmin;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;

/**
Expand Down Expand Up @@ -225,11 +221,6 @@ public List<ConfigurationModel> getFactoryInstances(
@Activate
protected void activate(BundleContext bundleContext) {
_bundleContext = bundleContext;

_configurationVisibilityControllerServiceTrackerMap =
ServiceTrackerMapFactory.openSingleValueMap(
_bundleContext, ConfigurationVisibilityController.class,
"configuration.pid");
}

protected void collectConfigurationModels(
Expand Down Expand Up @@ -269,11 +260,6 @@ protected void collectConfigurationModels(
}
}

@Deactivate
protected void deactivate() {
_configurationVisibilityControllerServiceTrackerMap.close();
}

protected String getAndFilterString(String... filterStrings) {
return getLogicalOperatorFilterString(
StringPool.AMPERSAND, filterStrings);
Expand All @@ -293,15 +279,6 @@ protected ConfigurationModel getConfigurationModel(
extendedMetaTypeInformation.getObjectClassDefinition(pid, locale),
factory);

ConfigurationVisibilityController configurationVisibilityController =
_configurationVisibilityControllerServiceTrackerMap.getService(pid);

if ((configurationVisibilityController != null) &&
!configurationVisibilityController.isVisible(scope, scopePK)) {

return null;
}

if (scope.equals(scope.COMPANY) && configurationModel.isSystemScope()) {
return null;
}
Expand Down Expand Up @@ -427,9 +404,6 @@ protected String getPropertyFilterString(String key, String value) {
@Reference
private ConfigurationAdmin _configurationAdmin;

private ServiceTrackerMap<String, ConfigurationVisibilityController>
_configurationVisibilityControllerServiceTrackerMap;

@Reference
private ExtendedMetaTypeService _extendedMetaTypeService;

Expand Down

0 comments on commit 561aef1

Please sign in to comment.