* ================================================================================\r
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\r
* Modifications Copyright (C) 2020-2021 Nordix Foundation.\r
+ * Modifications Copyright (C) 2022 Bell Canada. All rights reserved.\r
* ================================================================================\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
package org.onap.policy.api.main.rest.provider;\r
\r
import org.onap.policy.models.base.PfModelException;\r
+import org.onap.policy.models.provider.PolicyModelsProvider;\r
import org.onap.policy.models.tosca.authorative.concepts.ToscaEntityFilter;\r
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType;\r
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.stereotype.Service;\r
\r
/**\r
* Class to provide all kinds of policy type operations.\r
*\r
* @author Chenfei Gao (cgao@research.att.com)\r
*/\r
+@Service\r
public class PolicyTypeProvider extends CommonModelProvider {\r
\r
/**\r
* Default constructor.\r
*/\r
- public PolicyTypeProvider() throws PfModelException {\r
- super();\r
+ @Autowired\r
+ public PolicyTypeProvider(PolicyModelsProvider modelsProvider) throws PfModelException {\r
+ super(modelsProvider);\r
}\r
\r
/**\r
ToscaEntityFilter.<ToscaPolicyType>builder().name(policyTypeName).version(policyTypeVersion).build();\r
return modelsProvider.getFilteredPolicyTypes(policyTypeFilter);\r
}\r
-}\r
+}
\ No newline at end of file