X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ECOMP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Frest%2Fjpa%2FPIPConfiguration.java;h=07f1b3bbc2b15ca67c0bbe0c55d19b087e806615;hp=8f75bef89f403599ce097175b687ec03f3758827;hb=e0addf5b588a1244f9679becd90999dfcb4c3a94;hpb=39fb0f30472777e4b60d6a7ac8aa4eb9773961ff diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java index 8f75bef89..07f1b3bbc 100644 --- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java +++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java @@ -51,21 +51,16 @@ import javax.persistence.Transient; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - +import org.openecomp.policy.common.logging.eelf.MessageCodes; +import org.openecomp.policy.common.logging.eelf.PolicyLogger; import org.openecomp.policy.xacml.api.XACMLErrorConstants; + import com.att.research.xacml.api.pip.PIPException; import com.att.research.xacml.std.pip.engines.StdConfigurableEngine; -import com.att.research.xacml.std.pip.engines.csv.CSVEngine; -import com.att.research.xacml.std.pip.engines.csv.HyperCSVEngine; -import com.att.research.xacml.std.pip.engines.jdbc.JDBCEngine; -import com.att.research.xacml.std.pip.engines.ldap.LDAPEngine; import com.att.research.xacml.util.XACMLProperties; import com.google.common.base.Joiner; import com.google.common.base.Splitter; -import org.openecomp.policy.common.logging.eelf.MessageCodes; -import org.openecomp.policy.common.logging.eelf.PolicyLogger; - /** * The persistent class for the PIPConfiguration database table. @@ -358,15 +353,12 @@ public class PIPConfiguration implements Serializable { PIPConfiguration configuration; try { String user = "super-admin"; - //TODO - //String user = ((XacmlAdminUI)UI.getCurrent()).getUserid(); configuration = new PIPConfiguration(id, properties, user); configuration.setCreatedBy(user); configuration.setModifiedBy(user); configurations.add(configuration); } catch (PIPException e) { logger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Import failed: " + e.getLocalizedMessage()); - // TODO:EELF Cleanup - Remove logger PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PIPConfiguration", "Import failed"); } } @@ -385,7 +377,6 @@ public class PIPConfiguration implements Serializable { this.id = Integer.parseInt(id); } catch (NumberFormatException e) { logger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Convert id to integer failed: " + id); - // TODO:EELF Cleanup - Remove logger PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PIPConfiguration", "Convert id to integer failed"); } } @@ -397,30 +388,6 @@ public class PIPConfiguration implements Serializable { throw new PIPException("PIP Engine defined without a classname"); } // - // These classes we know for sure require resolvers. - // - //TODO: Commented out due to JPAUtils class & As of now we are not using PIP. So, it will not impact any Errors - /*if (this.classname.equals(JDBCEngine.class.getCanonicalName())) { - this.setRequiresResolvers(true); - this.setPiptype(JPAUtils.getPIPType(PIPType.TYPE_SQL)); - } else if (this.classname.equals(LDAPEngine.class.getCanonicalName())) { - this.setRequiresResolvers(true); - this.setPiptype(JPAUtils.getPIPType(PIPType.TYPE_LDAP)); - } else if (this.classname.equals(HyperCSVEngine.class.getCanonicalName())) { - this.setRequiresResolvers(true); - this.setPiptype(JPAUtils.getPIPType(PIPType.TYPE_HYPERCSV)); - } else if (this.classname.equals(CSVEngine.class.getCanonicalName())) { - this.setRequiresResolvers(true); - this.setPiptype(JPAUtils.getPIPType(PIPType.TYPE_CSV)); - } else { - // - // Assume it does not require resolvers for now, if we encounter - // one then we will change it. The user can always change it via the gui. - // - this.setRequiresResolvers(false); - this.setPiptype(JPAUtils.getPIPType(PIPType.TYPE_CUSTOM)); - }*/ - // // Go through each property // for (Object name : properties.keySet()) { @@ -450,8 +417,6 @@ public class PIPConfiguration implements Serializable { properties.getProperty(name.toString()), properties,"super-admin" ); - //TODO: replace with UserId - //((XacmlAdminUI)UI.getCurrent()).getUserid() for (PIPResolver resolver : resolvers) { this.addPipresolver(resolver); }