Java Code Examples for org.apache.nifi.web.api.dto.RemoteProcessGroupDTO#setProxyHost()
The following examples show how to use
org.apache.nifi.web.api.dto.RemoteProcessGroupDTO#setProxyHost() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestRemoteProcessGroupAuditor.java From localization_nifi with Apache License 2.0 | 6 votes |
@Test public void testConfigureProxyHost() throws Throwable { final RemoteProcessGroup existingRPG = defaultRemoteProcessGroup(); final RemoteProcessGroupDTO inputRPGDTO = defaultInput(); inputRPGDTO.setProxyHost("proxy.example.com"); final Collection<Action> actions = updateProcessGroupConfiguration(inputRPGDTO, existingRPG); assertEquals(1, actions.size()); final Action action = actions.iterator().next(); assertEquals(Operation.Configure, action.getOperation()); assertConfigureDetails(action.getActionDetails(), "Proxy Host", existingRPG.getProxyHost(), inputRPGDTO.getProxyHost()); }
Example 2
Source File: TestRemoteProcessGroupAuditor.java From localization_nifi with Apache License 2.0 | 6 votes |
@Test public void testConfigureProxyHostUpdate() throws Throwable { final RemoteProcessGroup existingRPG = defaultRemoteProcessGroup(); when(existingRPG.getProxyHost()).thenReturn("proxy1.example.com"); final RemoteProcessGroupDTO inputRPGDTO = defaultInput(); inputRPGDTO.setProxyHost("proxy2.example.com"); final Collection<Action> actions = updateProcessGroupConfiguration(inputRPGDTO, existingRPG); assertEquals(1, actions.size()); final Action action = actions.iterator().next(); assertEquals(Operation.Configure, action.getOperation()); assertConfigureDetails(action.getActionDetails(), "Proxy Host", existingRPG.getProxyHost(), inputRPGDTO.getProxyHost()); }
Example 3
Source File: TestRemoteProcessGroupAuditor.java From localization_nifi with Apache License 2.0 | 6 votes |
@Test public void testConfigureProxyHostClear() throws Throwable { final RemoteProcessGroup existingRPG = defaultRemoteProcessGroup(); when(existingRPG.getProxyHost()).thenReturn("proxy.example.com"); final RemoteProcessGroupDTO inputRPGDTO = defaultInput(); inputRPGDTO.setProxyHost(""); final Collection<Action> actions = updateProcessGroupConfiguration(inputRPGDTO, existingRPG); assertEquals(1, actions.size()); final Action action = actions.iterator().next(); assertEquals(Operation.Configure, action.getOperation()); assertConfigureDetails(action.getActionDetails(), "Proxy Host", existingRPG.getProxyHost(), inputRPGDTO.getProxyHost()); }
Example 4
Source File: FlowFromDOMFactory.java From localization_nifi with Apache License 2.0 | 6 votes |
public static RemoteProcessGroupDTO getRemoteProcessGroup(final Element element, final StringEncryptor encryptor) { final RemoteProcessGroupDTO dto = new RemoteProcessGroupDTO(); dto.setId(getString(element, "id")); dto.setName(getString(element, "name")); dto.setTargetUri(getString(element, "url")); dto.setTargetUris(getString(element, "urls")); dto.setTransmitting(getBoolean(element, "transmitting")); dto.setPosition(getPosition(DomUtils.getChild(element, "position"))); dto.setCommunicationsTimeout(getString(element, "timeout")); dto.setComments(getString(element, "comment")); dto.setYieldDuration(getString(element, "yieldPeriod")); dto.setTransportProtocol(getString(element, "transportProtocol")); dto.setProxyHost(getString(element, "proxyHost")); dto.setProxyPort(getOptionalInt(element, "proxyPort")); dto.setProxyUser(getString(element, "proxyUser")); dto.setLocalNetworkInterface(getString(element, "networkInterface")); final String rawPassword = getString(element, "proxyPassword"); final String proxyPassword = encryptor == null ? rawPassword : decrypt(rawPassword, encryptor); dto.setProxyPassword(proxyPassword); return dto; }
Example 5
Source File: TestRemoteProcessGroupAuditor.java From nifi with Apache License 2.0 | 6 votes |
@Test public void testConfigureProxyHost() throws Throwable { final RemoteProcessGroup existingRPG = defaultRemoteProcessGroup(); final RemoteProcessGroupDTO inputRPGDTO = defaultInput(); inputRPGDTO.setProxyHost("proxy.example.com"); final Collection<Action> actions = updateProcessGroupConfiguration(inputRPGDTO, existingRPG); assertEquals(1, actions.size()); final Action action = actions.iterator().next(); assertEquals(Operation.Configure, action.getOperation()); assertConfigureDetails(action.getActionDetails(), "Proxy Host", existingRPG.getProxyHost(), inputRPGDTO.getProxyHost()); }
Example 6
Source File: TestRemoteProcessGroupAuditor.java From nifi with Apache License 2.0 | 6 votes |
@Test public void testConfigureProxyHostUpdate() throws Throwable { final RemoteProcessGroup existingRPG = defaultRemoteProcessGroup(); when(existingRPG.getProxyHost()).thenReturn("proxy1.example.com"); final RemoteProcessGroupDTO inputRPGDTO = defaultInput(); inputRPGDTO.setProxyHost("proxy2.example.com"); final Collection<Action> actions = updateProcessGroupConfiguration(inputRPGDTO, existingRPG); assertEquals(1, actions.size()); final Action action = actions.iterator().next(); assertEquals(Operation.Configure, action.getOperation()); assertConfigureDetails(action.getActionDetails(), "Proxy Host", existingRPG.getProxyHost(), inputRPGDTO.getProxyHost()); }
Example 7
Source File: TestRemoteProcessGroupAuditor.java From nifi with Apache License 2.0 | 6 votes |
@Test public void testConfigureProxyHostClear() throws Throwable { final RemoteProcessGroup existingRPG = defaultRemoteProcessGroup(); when(existingRPG.getProxyHost()).thenReturn("proxy.example.com"); final RemoteProcessGroupDTO inputRPGDTO = defaultInput(); inputRPGDTO.setProxyHost(""); final Collection<Action> actions = updateProcessGroupConfiguration(inputRPGDTO, existingRPG); assertEquals(1, actions.size()); final Action action = actions.iterator().next(); assertEquals(Operation.Configure, action.getOperation()); assertConfigureDetails(action.getActionDetails(), "Proxy Host", existingRPG.getProxyHost(), inputRPGDTO.getProxyHost()); }
Example 8
Source File: FlowFromDOMFactory.java From nifi with Apache License 2.0 | 6 votes |
public static RemoteProcessGroupDTO getRemoteProcessGroup(final Element element, final StringEncryptor encryptor) { final RemoteProcessGroupDTO dto = new RemoteProcessGroupDTO(); dto.setId(getString(element, "id")); dto.setVersionedComponentId(getString(element, "versionedComponentId")); dto.setName(getString(element, "name")); dto.setTargetUri(getString(element, "url")); dto.setTargetUris(getString(element, "urls")); dto.setTransmitting(getBoolean(element, "transmitting")); dto.setPosition(getPosition(DomUtils.getChild(element, "position"))); dto.setCommunicationsTimeout(getString(element, "timeout")); dto.setComments(getString(element, "comment")); dto.setYieldDuration(getString(element, "yieldPeriod")); dto.setTransportProtocol(getString(element, "transportProtocol")); dto.setProxyHost(getString(element, "proxyHost")); dto.setProxyPort(getOptionalInt(element, "proxyPort")); dto.setProxyUser(getString(element, "proxyUser")); dto.setLocalNetworkInterface(getString(element, "networkInterface")); final String rawPassword = getString(element, "proxyPassword"); final String proxyPassword = encryptor == null ? rawPassword : decrypt(rawPassword, encryptor); dto.setProxyPassword(proxyPassword); return dto; }