@Test(expected = PolicyEngineException.class) public void testStdPolicyEngineInitialize_NoPDP_noException() throws Exception { final File file = temporaryFolder.newFile(CONFIG_PROPERTIES_FILE); final Properties properties = new Properties(); properties.setProperty(CLIENT_ID_PROP_NAME, "test"); properties.setProperty(CLIENT_KEY_PROP_NAME, "test"); properties.setProperty(NOTIFICATION_TYPE_PROP_NAME, UEB + COMMA + DMAAP); properties.setProperty(NOTIFICATION_SERVERS_PROP_NAME, SERVER_NAME + COMMA + SERVER_NAME); properties.setProperty(NOTIFICATION_TOPIC_PROP_NAME, "test"); properties.setProperty(ENVIRONMENT_PROP_NAME, "TEST"); creatPropertyFile(file, properties); new StdPolicyEngine(file.toString(), (String) null); }
private void setProperty(final String propertyFilePath, String clientKey) throws PolicyEngineException { if (propertyFilePath == null) { throw new PolicyEngineException( XACMLErrorConstants.ERROR_DATA_ISSUE + "Error NO PropertyFile Path provided"); } final Properties prop = getProperties(propertyFilePath); setProperty(prop, clientKey); }
StdPolicyEngine { private void setProperty(final String propertyFilePath, String clientKey) throws PolicyEngineException { if (propertyFilePath == null) { throw new PolicyEngineException( XACMLErrorConstants.ERROR_DATA_ISSUE + "Error NO PropertyFile Path provided"); } final Properties prop = getProperties(propertyFilePath); setProperty(prop, clientKey); } }
StdPolicyEngine { private void setProperty(final String propertyFilePath, String clientKey) throws PolicyEngineException { if (propertyFilePath == null) { throw new PolicyEngineException( XACMLErrorConstants.ERROR_DATA_ISSUE + "Error NO PropertyFile Path provided"); } final Properties prop = getProperties(propertyFilePath); setProperty(prop, clientKey); } StdPolicyEngine(final String propertyFilePath, final String clientKey);  StdPolicyEngine(final Properties properties, final String clientKey);  StdPolicyEngine(final String propertyFilePath, final NotificationScheme scheme,
            final NotificationHandler handler);  StdPolicyEngine(final String propertyFilePath, final NotificationScheme scheme); }
StdPolicyEngine { private void setProperty(final String propertyFilePath, String clientKey) throws PolicyEngineException { if (propertyFilePath == null) { throw new PolicyEngineException( XACMLErrorConstants.ERROR_DATA_ISSUE + "Error NO PropertyFile Path provided"); } final Properties prop = getProperties(propertyFilePath); setProperty(prop, clientKey); } StdPolicyEngine(final String propertyFilePath, final String clientKey);  StdPolicyEngine(final Properties properties, final String clientKey);  StdPolicyEngine(final String propertyFilePath, final NotificationScheme scheme,
            final NotificationHandler handler);  StdPolicyEngine(final String propertyFilePath, final NotificationScheme scheme); Collection<PolicyResponse> sendEvent(final Map<String, String> eventAttributes, final UUID requestID); Collection<PolicyResponse> sendEvent(final EventRequestParameters eventRequestParameters); Collection<PolicyConfig> getConfig(final ConfigRequestParameters configRequestParameters); Collection<String> listConfig(final ConfigRequestParameters listPolicyRequestParameters); Collection<String> listPolicy(final ConfigNameRequest listPolicyRequestParameters); DecisionResponse getDecision(final String onapName, final Map<String, String> decisionAttributes,
            final UUID requestID); DecisionResponse getDecision(final DecisionRequestParameters decisionRequestParameters); MetricsResponse getMetrics(final MetricsRequestParameters parameters); MetricsResponse getMetricsImpl(final MetricsRequestParameters parameters); PolicyChangeResponse pushPolicy(final PushPolicyParameters pushPolicyParameters); PolicyChangeResponse pushPolicyImpl(final PushPolicyParameters pushPolicyParameters); PolicyChangeResponse deletePolicy(final DeletePolicyParameters parameters); DictionaryResponse getDictionaryItem(final DictionaryParameters parameters); PolicyChangeResponse createDictionaryItem(final DictionaryParameters parameters); PolicyChangeResponse updateDictionaryItem(final DictionaryParameters parameters); PolicyChangeResponse policyEngineImport(final ImportParameters importParameters); PolicyChangeResponse createPolicy(final PolicyParameters policyParameters); PolicyChangeResponse updatePolicy(final PolicyParameters policyParameters); Collection<String> listPolicyImpl(final ConfigNameRequest listPolicyRequestParameters); void notification(final NotificationScheme scheme, final NotificationHandler handler); PDPNotification getNotification(); void setScheme(final NotificationScheme scheme); NotificationScheme getScheme(); NotificationHandler getNotificationHandler(); void stopNotification(); String pushPolicy(final String policyScope, final String policyName, final String policyType,
            final String pdpGroup, final UUID requestID); String createUpdateConfigPolicy(final String policyName, final String policyDescription,
            final String onapName, final String configName, final Map<String, String> configAttributes,
            final String configType, final String body, final String policyScope, final UUID requestID,
            final String riskLevel, final String riskType, final String guard, final String ttlDate,
            final boolean updateFlag); String createUpdateConfigFirewallPolicy(final String policyName, final JsonObject firewallJson,
            final String policyScope, final UUID requestID, final String riskLevel, final String riskType,
            final String guard, final String ttlDate, final boolean updateFlag); static void setClientKey(final String clientKey); static String getEnvironment(); static void rotatePDPList(); static String getPDPURL(); }
StdPolicyEngine { private void setProperty(final String propertyFilePath, String clientKey) throws PolicyEngineException { if (propertyFilePath == null) { throw new PolicyEngineException( XACMLErrorConstants.ERROR_DATA_ISSUE + "Error NO PropertyFile Path provided"); } final Properties prop = getProperties(propertyFilePath); setProperty(prop, clientKey); } StdPolicyEngine(final String propertyFilePath, final String clientKey);  StdPolicyEngine(final Properties properties, final String clientKey);  StdPolicyEngine(final String propertyFilePath, final NotificationScheme scheme,
            final NotificationHandler handler);  StdPolicyEngine(final String propertyFilePath, final NotificationScheme scheme); Collection<PolicyResponse> sendEvent(final Map<String, String> eventAttributes, final UUID requestID); Collection<PolicyResponse> sendEvent(final EventRequestParameters eventRequestParameters); Collection<PolicyConfig> getConfig(final ConfigRequestParameters configRequestParameters); Collection<String> listConfig(final ConfigRequestParameters listPolicyRequestParameters); Collection<String> listPolicy(final ConfigNameRequest listPolicyRequestParameters); DecisionResponse getDecision(final String onapName, final Map<String, String> decisionAttributes,
            final UUID requestID); DecisionResponse getDecision(final DecisionRequestParameters decisionRequestParameters); MetricsResponse getMetrics(final MetricsRequestParameters parameters); MetricsResponse getMetricsImpl(final MetricsRequestParameters parameters); PolicyChangeResponse pushPolicy(final PushPolicyParameters pushPolicyParameters); PolicyChangeResponse pushPolicyImpl(final PushPolicyParameters pushPolicyParameters); PolicyChangeResponse deletePolicy(final DeletePolicyParameters parameters); DictionaryResponse getDictionaryItem(final DictionaryParameters parameters); PolicyChangeResponse createDictionaryItem(final DictionaryParameters parameters); PolicyChangeResponse updateDictionaryItem(final DictionaryParameters parameters); PolicyChangeResponse policyEngineImport(final ImportParameters importParameters); PolicyChangeResponse createPolicy(final PolicyParameters policyParameters); PolicyChangeResponse updatePolicy(final PolicyParameters policyParameters); Collection<String> listPolicyImpl(final ConfigNameRequest listPolicyRequestParameters); void notification(final NotificationScheme scheme, final NotificationHandler handler); PDPNotification getNotification(); void setScheme(final NotificationScheme scheme); NotificationScheme getScheme(); NotificationHandler getNotificationHandler(); void stopNotification(); String pushPolicy(final String policyScope, final String policyName, final String policyType,
            final String pdpGroup, final UUID requestID); String createUpdateConfigPolicy(final String policyName, final String policyDescription,
            final String onapName, final String configName, final Map<String, String> configAttributes,
            final String configType, final String body, final String policyScope, final UUID requestID,
            final String riskLevel, final String riskType, final String guard, final String ttlDate,
            final boolean updateFlag); String createUpdateConfigFirewallPolicy(final String policyName, final JsonObject firewallJson,
            final String policyScope, final UUID requestID, final String riskLevel, final String riskType,
            final String guard, final String ttlDate, final boolean updateFlag); static void setClientKey(final String clientKey); static String getEnvironment(); static void rotatePDPList(); static String getPDPURL();  }