org.apache.ivy.core.deliver

Class DeliverOptions

public class DeliverOptions extends Object

A set of options used to do a deliver.
Constructor Summary
DeliverOptions()
Creates an instance of DeliverOptions which require to be configured using the appropriate setters.
DeliverOptions(String status, Date pubDate, PublishingDependencyRevisionResolver pdrResolver, boolean validate, boolean resolveDynamicRevisions, String[] confs)
Creates an instance of DeliverOptions with all options explicitly set.
Method Summary
String[]getConfs()
Return the configurations which must be deliverd.
PublishingDependencyRevisionResolvergetPdrResolver()
Return the pdrResolver that will be used during deliver for each dependency to get its published information.
StringgetPubBranch()
Returns the branch with which the Ivy file should be delivered, or null if branch info shouldn't be changed.
DategetPubdate()
StringgetResolveId()
Returns the id of a previous resolve to use for delivering.
StringgetStatus()
Returns the status to which the module should be delivered, or null if the current status should be kept.
booleanisGenerateRevConstraint()
booleanisResolveDynamicRevisions()
booleanisValidate()
static DeliverOptionsnewInstance(IvySettings settings)
Returns an instance of DeliverOptions with options corresponding to default values taken from the given settings.
DeliverOptionssetConfs(String[] confs)
Sets the configurations to deliver.
DeliverOptionssetGenerateRevConstraint(boolean generateRevConstraint)
DeliverOptionssetPdrResolver(PublishingDependencyRevisionResolver pdrResolver)
Sets the pdrResolver that will be used during deliver for each dependency to get its published information.
DeliverOptionssetPubBranch(String pubBranch)
Sets the branch with which the Ivy file should be delivered.
DeliverOptionssetPubdate(Date pubdate)
DeliverOptionssetResolveDynamicRevisions(boolean resolveDynamicRevisions)
DeliverOptionssetResolveId(String resolveId)
Sets the id of a previous resolve to use for delivering.
DeliverOptionssetStatus(String status)
Sets the status to which the module should be delivered, use null if the current status should be kept.
DeliverOptionssetValidate(boolean validate)
StringtoString()

Constructor Detail

DeliverOptions

public DeliverOptions()
Creates an instance of DeliverOptions which require to be configured using the appropriate setters.

DeliverOptions

public DeliverOptions(String status, Date pubDate, PublishingDependencyRevisionResolver pdrResolver, boolean validate, boolean resolveDynamicRevisions, String[] confs)
Creates an instance of DeliverOptions with all options explicitly set.

Method Detail

getConfs

public String[] getConfs()
Return the configurations which must be deliverd. Returns null if all configurations has to be deliverd. Attention: the returned array can contain wildcards!

Returns: the configurations to deliver

getPdrResolver

public PublishingDependencyRevisionResolver getPdrResolver()
Return the pdrResolver that will be used during deliver for each dependency to get its published information. This can particularly useful when the deliver is made for a release, and when we wish to deliver each dependency which is still in integration. The PublishingDependencyRevisionResolver can then do the delivering work for the dependency and return the new (delivered) dependency info (with the delivered revision). Note that PublishingDependencyRevisionResolver is only called for each direct dependency.

Returns: the pdrResolver that will be used during deliver

getPubBranch

public String getPubBranch()
Returns the branch with which the Ivy file should be delivered, or null if branch info shouldn't be changed.

Returns: the branch with which the Ivy file should be delivered

getPubdate

public Date getPubdate()

getResolveId

public String getResolveId()
Returns the id of a previous resolve to use for delivering.

Returns: the id of a previous resolve

getStatus

public String getStatus()
Returns the status to which the module should be delivered, or null if the current status should be kept.

Returns: the status to which the module should be delivered

isGenerateRevConstraint

public boolean isGenerateRevConstraint()

isResolveDynamicRevisions

public boolean isResolveDynamicRevisions()

isValidate

public boolean isValidate()

newInstance

public static DeliverOptions newInstance(IvySettings settings)
Returns an instance of DeliverOptions with options corresponding to default values taken from the given settings.

Parameters: settings The settings to use to get default option values

Returns: a DeliverOptions instance ready to be used or customized

setConfs

public DeliverOptions setConfs(String[] confs)
Sets the configurations to deliver.

Parameters: confs the configurations to deliver

Returns: the instance of DeliverOptions on which the method has been called, for easy method chaining

setGenerateRevConstraint

public DeliverOptions setGenerateRevConstraint(boolean generateRevConstraint)

setPdrResolver

public DeliverOptions setPdrResolver(PublishingDependencyRevisionResolver pdrResolver)
Sets the pdrResolver that will be used during deliver for each dependency to get its published information. This can particularly useful when the deliver is made for a release, and when we wish to deliver each dependency which is still in integration. The PublishingDependencyRevisionResolver can then do the delivering work for the dependency and return the new (delivered) dependency info (with the delivered revision). Note that PublishingDependencyRevisionResolver is only called for each direct dependency.

Returns: the instance of DeliverOptions on which the method has been called, for easy method chaining

setPubBranch

public DeliverOptions setPubBranch(String pubBranch)
Sets the branch with which the Ivy file should be delivered.

Parameters: pubBranch the branch with which the Ivy file should be delivered

Returns: the instance of DeliverOptions on which the method has been called, for easy method chaining

setPubdate

public DeliverOptions setPubdate(Date pubdate)

setResolveDynamicRevisions

public DeliverOptions setResolveDynamicRevisions(boolean resolveDynamicRevisions)

setResolveId

public DeliverOptions setResolveId(String resolveId)
Sets the id of a previous resolve to use for delivering.

Parameters: resolveId the id of a previous resolve

Returns: the instance of DeliverOptions on which the method has been called, for easy method chaining

setStatus

public DeliverOptions setStatus(String status)
Sets the status to which the module should be delivered, use null if the current status should be kept.

Returns: the instance of DeliverOptions on which the method has been called, for easy method chaining

setValidate

public DeliverOptions setValidate(boolean validate)

toString

public String toString()