public class ProxyConnector extends Object implements RepositoryConnector
| Constructor and Description |
|---|
ProxyConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPolicy(Policy policy,
PolicyOption option)
Adds a new policy.
|
void |
disable()
Disables this connector, if it was enabled before, otherwise does nothing.
|
void |
enable()
Enables this connector, if it was disabled before, otherwise does nothing.
|
List<String> |
getBlacklist()
Returns a list of paths that are not fetched from the remote repository.
|
int |
getOrder()
Returns a number that orders the proxy connectors numerically.
|
Map<Policy,PolicyOption> |
getPolicies()
Returns the policies that are defined
|
Map<String,String> |
getProperties()
Returns additional properties defined for this connector.
|
String |
getProxyId()
Returns the id of this proxy connector.
|
ManagedRepository |
getSourceRepository()
Returns the local repository that is connected to the remote.
|
RemoteRepository |
getTargetRepository()
Returns the remote repository that is connected to the local.
|
List<String> |
getWhitelist()
Returns a list of paths that are fetched from the remote repository, even if a
parent path is in the blacklist.
|
boolean |
isEnabled()
Returns true, if this connector is enabled, otherwise false.
|
void |
setBlacklist(List<String> blacklist)
Sets the blacklist.
|
void |
setOrder(int order)
Set the order number of this proxy connector.
|
void |
setPolicies(Map<Policy,PolicyOption> policies)
Sets policies that set the behaviour of this proxy connector.
|
void |
setProperties(Map<String,String> properties)
Sets additional properties for this connector.
|
void |
setProxyId(String proxyId)
Sets the id of this proxy connector.
|
void |
setSourceRepository(ManagedRepository sourceRepository)
Sets the source repository.
|
void |
setTargetRepository(RemoteRepository targetRepository)
Sets the target repository.
|
void |
setWhitelist(List<String> whitelist)
Sets the list of paths that are proxied.
|
String |
toString() |
public ProxyConnector()
public boolean isEnabled()
RepositoryConnectorisEnabled in interface RepositoryConnectorRepositoryConnector.isEnabled()public void enable()
RepositoryConnectorenable in interface RepositoryConnectorRepositoryConnector.enable()public void disable()
RepositoryConnectordisable in interface RepositoryConnectorRepositoryConnector.disable()public List<String> getBlacklist()
RepositoryConnectorgetBlacklist in interface RepositoryConnectorRepositoryConnector.getBlacklist()public void setBlacklist(List<String> blacklist)
blacklist - List of paths.public ManagedRepository getSourceRepository()
RepositoryConnectorgetSourceRepository in interface RepositoryConnectorRepositoryConnector.getSourceRepository()public void setSourceRepository(ManagedRepository sourceRepository)
sourceRepository - The managed repository which is the local representation of the proxy.public RemoteRepository getTargetRepository()
RepositoryConnectorgetTargetRepository in interface RepositoryConnectorgetTargetRepository()public void setTargetRepository(RemoteRepository targetRepository)
targetRepository - The remote repository, where the artifacts are downloaded from.public List<String> getWhitelist()
RepositoryConnectorgetWhitelist in interface RepositoryConnectorgetWhitelist()public void setWhitelist(List<String> whitelist)
whitelist - List of paths.public Map<Policy,PolicyOption> getPolicies()
public void setPolicies(Map<Policy,PolicyOption> policies)
policies - A map of policies with each option.public void addPolicy(Policy policy, PolicyOption option)
policy - The policy to add.option - The option for the policy.public String getProxyId()
public void setProxyId(String proxyId)
proxyId - A id string.public int getOrder()
public void setOrder(int order)
order - The order number.public Map<String,String> getProperties()
public void setProperties(Map<String,String> properties)
properties - Map of key, value pairs.Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.