Java Doc for Ivy.java in  » Code-Analyzer » apache-ivy » org » apache » ivy » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Code Analyzer » apache ivy » org.apache.ivy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.ivy.Ivy

Ivy
public class Ivy (Code)
Ivy is a free java based dependency manager.

This class is the main class of Ivy, which acts as a Facade to all services offered by Ivy:

  • resolve dependencies
  • retrieve artifacts to a local location
  • deliver and publish modules
  • repository search and listing
Here is one typical usage:
 Ivy ivy = Ivy.newInstance();
 ivy.configure(new URL("ivysettings.xml"));
 ivy.resolve(new URL("ivy.xml"));
 

Using Ivy engines directly

If the methods offered by the Ivy class are not flexible enough and you want to use Ivy engines directly, you need to call the methods within a single IvyContext associated to the Ivy instance you use.
To do so, it is recommended to use the Ivy.execute(org.apache.ivy.Ivy.IvyCallback) method like this:

 Ivy ivy = Ivy.newInstance();
 ivy.execute(new IvyCallback() {
 public Object doInIvyContext(Ivy ivy, IvyContext context) {
 // obviously we can use regular Ivy methods in the callback 
 ivy.configure(new URL("ivysettings.xml"));
 // and we can safely use Ivy engines too
 ivy.getResolveEngine().resolve(new URL("ivy.xml"));
 return null;
 }
 });
 


Inner Class :public static interface IvyCallback

Field Summary
final public static  SimpleDateFormatDATE_FORMAT
    

Constructor Summary
public  Ivy()
     The default constructor of Ivy allows to create an instance of Ivy with none of its dependencies (engines, settings, ...) created.

Method Summary
public  voidbind()
     This method is used to bind this Ivy instance to required dependencies, i.e.
public  booleancheck(URL ivyFile, String resolvername)
    
public  voidcheckInterrupted()
    
public  voidconfigure(File settingsFile)
    
public  voidconfigure(URL settingsURL)
    
public  voidconfigureDefault()
    
public  voidconfigureDefault14()
    
public  voiddeliver(ModuleRevisionId mrid, String revision, String destIvyPattern)
    
public  voiddeliver(String revision, String destIvyPattern, DeliverOptions options)
    
public  voiddeliver(ModuleRevisionId mrid, String revision, String destIvyPattern, DeliverOptions options)
    
public  Objectexecute(IvyCallback callback)
     Executes the given callback in the context of this Ivy instance.
public  ResolvedModuleRevisionfindModule(ModuleRevisionId mrid)
    
public  CheckEnginegetCheckEngine()
    
public  DeliverEnginegetDeliverEngine()
    
public  EventManagergetEventManager()
    
public  InstallEnginegetInstallEngine()
    
public static  StringgetIvyDate()
     Returns the date at which this version of Ivy has been built.
public static  StringgetIvyHomeURL()
     Returns the URL at which Ivy web site can be found.
public static  StringgetIvyVersion()
     Returns the current version of Ivy, as displayed on the console when Ivy is initialized.
public  MessageLoggerEnginegetLoggerEngine()
    
public  PublishEnginegetPublishEngine()
    
public  RepositoryManagementEnginegetRepositoryEngine()
    
public  ResolutionCacheManagergetResolutionCacheManager()
    
public  ResolveEnginegetResolveEngine()
    
public  RetrieveEnginegetRetrieveEngine()
    
public  SearchEnginegetSearchEngine()
    
public  IvySettingsgetSettings()
    
public  SortEnginegetSortEngine()
    
public  StringgetVariable(String name)
    
public static  StringgetWorkingRevision()
    
public  ResolveReportinstall(ModuleRevisionId mrid, String from, String to, boolean transitive, boolean validate, boolean overwrite, Filter artifactFilter, String matcherName)
    
public  voidinterrupt()
    
public  voidinterrupt(Thread operatingThread)
    
public synchronized  booleanisInterrupted()
    
public  ModuleEntry[]listModuleEntries(OrganisationEntry org)
    
public  ModuleId[]listModules(ModuleId criteria, PatternMatcher matcher)
    
public  ModuleRevisionId[]listModules(ModuleRevisionId criteria, PatternMatcher matcher)
    
public  String[]listModules(String org)
    
public  OrganisationEntry[]listOrganisationEntries()
    
public  String[]listOrganisations()
    
public  RevisionEntry[]listRevisionEntries(ModuleEntry module)
    
public  String[]listRevisions(String org, String module)
    
public  String[]listTokenValues(String token, Map otherTokenValues)
    
public static  IvynewInstance()
    
public static  IvynewInstance(IvySettings settings)
    
public  voidpopContext()
     Pops the current Ivy context.
public  Collectionpublish(ModuleRevisionId mrid, Collection srcArtifactPattern, String resolverName, PublishOptions options)
    
public  voidpushContext()
     Pushes a new IvyContext bound to this Ivy instance if the current context is not already bound to this Ivy instance.
public  ResolveReportresolve(File ivySource)
    
public  ResolveReportresolve(URL ivySource)
    
public  ResolveReportresolve(ModuleRevisionId mrid, ResolveOptions options, boolean changing)
    
public  ResolveReportresolve(URL ivySource, ResolveOptions options)
    
public  ResolveReportresolve(ModuleDescriptor md, ResolveOptions options)
    
public  intretrieve(ModuleRevisionId mrid, String destFilePattern, RetrieveOptions options)
    
public  voidsetCheckEngine(CheckEngine checkEngine)
    
public  voidsetDeliverEngine(DeliverEngine deliverEngine)
    
public  voidsetEventManager(EventManager eventManager)
    
public  voidsetInstallEngine(InstallEngine installEngine)
    
public  voidsetPublishEngine(PublishEngine publishEngine)
    
public  voidsetRepositoryEngine(RepositoryManagementEngine repositoryEngine)
    
public  voidsetResolveEngine(ResolveEngine resolveEngine)
    
public  voidsetRetrieveEngine(RetrieveEngine retrieveEngine)
    
public  voidsetSearchEngine(SearchEngine searchEngine)
    
public  voidsetSettings(IvySettings settings)
    
public  voidsetSortEngine(SortEngine sortEngine)
    
public  voidsetVariable(String varName, String value)
    
public  ListsortModuleDescriptors(Collection moduleDescriptors, NonMatchingVersionReporter nonMatchingVersionReporter)
     Sorts the given ModuleDescriptors from the less dependent to the more dependent.
public  ListsortNodes(Collection nodes)
    
public  Stringsubstitute(String str)
    

Field Detail
DATE_FORMAT
final public static SimpleDateFormat DATE_FORMAT(Code)




Constructor Detail
Ivy
public Ivy()(Code)
The default constructor of Ivy allows to create an instance of Ivy with none of its dependencies (engines, settings, ...) created. If you use this constructor, it's your responsibility to set the dependencies of Ivy using the appropriate setters (setResolveEngine, ...). You can also call the bind method to set all the dependencies except those that you have provided using the setters. If you want to get an instance ready to use, prefer the use of Ivy.newInstance().




Method Detail
bind
public void bind()(Code)
This method is used to bind this Ivy instance to required dependencies, i.e. instance of settings, engines, and so on.

After this call Ivy is still not configured, which means that the settings object is still empty.




check
public boolean check(URL ivyFile, String resolvername)(Code)



checkInterrupted
public void checkInterrupted()(Code)
Check if the current operation has been interrupted, and if it is the case, throw a runtime exception



configure
public void configure(File settingsFile) throws ParseException, IOException(Code)



configure
public void configure(URL settingsURL) throws ParseException, IOException(Code)



configureDefault
public void configureDefault() throws ParseException, IOException(Code)



configureDefault14
public void configureDefault14() throws ParseException, IOException(Code)
Configures Ivy with 1.4 compatible default settings



deliver
public void deliver(ModuleRevisionId mrid, String revision, String destIvyPattern) throws IOException, ParseException(Code)



deliver
public void deliver(String revision, String destIvyPattern, DeliverOptions options) throws IOException, ParseException(Code)



deliver
public void deliver(ModuleRevisionId mrid, String revision, String destIvyPattern, DeliverOptions options) throws IOException, ParseException(Code)
Example of use: deliver(mrid, "1.5", "target/ivy/ivy-[revision].xml", DeliverOptions.newInstance(settings).setStatus("release").setValidate(false));
Parameters:
  mrid -
Parameters:
  revision -
Parameters:
  destIvyPattern -
Parameters:
  options -
throws:
  IOException -
throws:
  ParseException -



execute
public Object execute(IvyCallback callback)(Code)
Executes the given callback in the context of this Ivy instance.

Alternatively you can use the Ivy.pushContext() and Ivy.popContext() methods, but this is not recommended:

 Object result = null;
 pushContext();
 try {
 result = callback.doInIvyContext(this, IvyContext.getContext());
 } finally {
 popContext();
 }
 doSomethingWithResult(result);
 


Parameters:
  callback -



findModule
public ResolvedModuleRevision findModule(ModuleRevisionId mrid)(Code)



getCheckEngine
public CheckEngine getCheckEngine()(Code)



getDeliverEngine
public DeliverEngine getDeliverEngine()(Code)



getEventManager
public EventManager getEventManager()(Code)



getInstallEngine
public InstallEngine getInstallEngine()(Code)



getIvyDate
public static String getIvyDate()(Code)
Returns the date at which this version of Ivy has been built.

May be empty if unknown. the date at which this version of Ivy has been built
See Also:   Ivy.getIvyVersion()




getIvyHomeURL
public static String getIvyHomeURL()(Code)
Returns the URL at which Ivy web site can be found. the URL at which Ivy web site can be found



getIvyVersion
public static String getIvyVersion()(Code)
Returns the current version of Ivy, as displayed on the console when Ivy is initialized. the current version of Ivy
See Also:   Ivy.getIvyVersion()



getLoggerEngine
public MessageLoggerEngine getLoggerEngine()(Code)



getPublishEngine
public PublishEngine getPublishEngine()(Code)



getRepositoryEngine
public RepositoryManagementEngine getRepositoryEngine()(Code)



getResolutionCacheManager
public ResolutionCacheManager getResolutionCacheManager()(Code)



getResolveEngine
public ResolveEngine getResolveEngine()(Code)



getRetrieveEngine
public RetrieveEngine getRetrieveEngine()(Code)



getSearchEngine
public SearchEngine getSearchEngine()(Code)



getSettings
public IvySettings getSettings()(Code)



getSortEngine
public SortEngine getSortEngine()(Code)



getVariable
public String getVariable(String name)(Code)



getWorkingRevision
public static String getWorkingRevision()(Code)



install
public ResolveReport install(ModuleRevisionId mrid, String from, String to, boolean transitive, boolean validate, boolean overwrite, Filter artifactFilter, String matcherName) throws IOException(Code)



interrupt
public void interrupt()(Code)
Interrupts the current running operation, no later than interruptTimeout milliseconds after the call



interrupt
public void interrupt(Thread operatingThread)(Code)
Interrupts the current running operation in the given operating thread, no later than interruptTimeout milliseconds after the call



isInterrupted
public synchronized boolean isInterrupted()(Code)



listModuleEntries
public ModuleEntry[] listModuleEntries(OrganisationEntry org)(Code)



listModules
public ModuleId[] listModules(ModuleId criteria, PatternMatcher matcher)(Code)



listModules
public ModuleRevisionId[] listModules(ModuleRevisionId criteria, PatternMatcher matcher)(Code)



listModules
public String[] listModules(String org)(Code)



listOrganisationEntries
public OrganisationEntry[] listOrganisationEntries()(Code)



listOrganisations
public String[] listOrganisations()(Code)



listRevisionEntries
public RevisionEntry[] listRevisionEntries(ModuleEntry module)(Code)



listRevisions
public String[] listRevisions(String org, String module)(Code)



listTokenValues
public String[] listTokenValues(String token, Map otherTokenValues)(Code)



newInstance
public static Ivy newInstance()(Code)



newInstance
public static Ivy newInstance(IvySettings settings)(Code)



popContext
public void popContext()(Code)
Pops the current Ivy context.

You must call this method once and only once for each call to Ivy.pushContext() , when you're done with the your Ivy related work.

Alternatively, you can use the Ivy.execute(org.apache.ivy.Ivy.IvyCallback) method which takes care of everything for you.




publish
public Collection publish(ModuleRevisionId mrid, Collection srcArtifactPattern, String resolverName, PublishOptions options) throws IOException(Code)



pushContext
public void pushContext()(Code)
Pushes a new IvyContext bound to this Ivy instance if the current context is not already bound to this Ivy instance. If the current context is already bound to this Ivy instance, it pushes the current context on the context stack, so that you can (and must) always call Ivy.popContext() when you're done.

Alternatively, you can use the Ivy.execute(org.apache.ivy.Ivy.IvyCallback) method which takes care of everything for you.




resolve
public ResolveReport resolve(File ivySource) throws ParseException, IOException(Code)



resolve
public ResolveReport resolve(URL ivySource) throws ParseException, IOException(Code)



resolve
public ResolveReport resolve(ModuleRevisionId mrid, ResolveOptions options, boolean changing) throws ParseException, IOException(Code)



resolve
public ResolveReport resolve(URL ivySource, ResolveOptions options) throws ParseException, IOException(Code)



resolve
public ResolveReport resolve(ModuleDescriptor md, ResolveOptions options) throws ParseException, IOException(Code)



retrieve
public int retrieve(ModuleRevisionId mrid, String destFilePattern, RetrieveOptions options) throws IOException(Code)



setCheckEngine
public void setCheckEngine(CheckEngine checkEngine)(Code)



setDeliverEngine
public void setDeliverEngine(DeliverEngine deliverEngine)(Code)



setEventManager
public void setEventManager(EventManager eventManager)(Code)



setInstallEngine
public void setInstallEngine(InstallEngine installEngine)(Code)



setPublishEngine
public void setPublishEngine(PublishEngine publishEngine)(Code)



setRepositoryEngine
public void setRepositoryEngine(RepositoryManagementEngine repositoryEngine)(Code)



setResolveEngine
public void setResolveEngine(ResolveEngine resolveEngine)(Code)



setRetrieveEngine
public void setRetrieveEngine(RetrieveEngine retrieveEngine)(Code)



setSearchEngine
public void setSearchEngine(SearchEngine searchEngine)(Code)



setSettings
public void setSettings(IvySettings settings)(Code)



setSortEngine
public void setSortEngine(SortEngine sortEngine)(Code)



setVariable
public void setVariable(String varName, String value)(Code)



sortModuleDescriptors
public List sortModuleDescriptors(Collection moduleDescriptors, NonMatchingVersionReporter nonMatchingVersionReporter)(Code)
Sorts the given ModuleDescriptors from the less dependent to the more dependent. This sort ensures that a ModuleDescriptor is always found in the list before all ModuleDescriptors depending directly on it.
Parameters:
  moduleDescriptors - a Collection of ModuleDescriptor to sort
Parameters:
  nonMatchingVersionReporter - Used to report some non matching version (when a modules depends on a specificrevision of an other modules present in the of modules to sort with a differentrevision. a List of sorted ModuleDescriptors



sortNodes
public List sortNodes(Collection nodes)(Code)
Sorts the collection of IvyNode from the less dependent to the more dependent



substitute
public String substitute(String str)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.