Source Code Cross Referenced for DeliverOptions.java in  » Code-Analyzer » apache-ivy » org » apache » ivy » core » deliver » 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.core.deliver 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         *
017:         */
018:        package org.apache.ivy.core.deliver;
019:
020:        import java.util.Date;
021:
022:        import org.apache.ivy.core.settings.IvySettings;
023:
024:        /**
025:         * A set of options used to do a deliver.
026:         */
027:        public class DeliverOptions {
028:            private String status;
029:
030:            private Date pubdate;
031:
032:            private PublishingDependencyRevisionResolver pdrResolver = new DefaultPublishingDRResolver();
033:
034:            private boolean validate = true;
035:
036:            private boolean resolveDynamicRevisions = true;
037:
038:            private String resolveId;
039:
040:            private String[] confs;
041:
042:            /**
043:             * Returns an instance of DeliverOptions with options corresponding to default values taken from
044:             * the given settings.
045:             * 
046:             * @param settings
047:             *            The settings to use to get default option values
048:             * @return a DeliverOptions instance ready to be used or customized
049:             */
050:            public static DeliverOptions newInstance(IvySettings settings) {
051:                return new DeliverOptions(null, new Date(),
052:                        new DefaultPublishingDRResolver(), settings
053:                                .doValidate(), true, null);
054:            }
055:
056:            /**
057:             * Creates an instance of DeliverOptions which require to be configured using the appropriate
058:             * setters.
059:             */
060:            public DeliverOptions() {
061:            }
062:
063:            /**
064:             * Creates an instance of DeliverOptions with all options explicitly set.
065:             */
066:            public DeliverOptions(String status, Date pubDate,
067:                    PublishingDependencyRevisionResolver pdrResolver,
068:                    boolean validate, boolean resolveDynamicRevisions,
069:                    String[] confs) {
070:                this .status = status;
071:                this .pubdate = pubDate;
072:                this .pdrResolver = pdrResolver;
073:                this .validate = validate;
074:                this .resolveDynamicRevisions = resolveDynamicRevisions;
075:                this .confs = confs;
076:            }
077:
078:            /**
079:             * Return the pdrResolver that will be used during deliver for each dependency to get its
080:             * published information. This can particularly useful when the deliver is made for a release,
081:             * and when we wish to deliver each dependency which is still in integration. The
082:             * PublishingDependencyRevisionResolver can then do the delivering work for the dependency and
083:             * return the new (delivered) dependency info (with the delivered revision). Note that
084:             * PublishingDependencyRevisionResolver is only called for each <b>direct</b> dependency.
085:             * 
086:             * @return the pdrResolver that will be used during deliver
087:             */
088:            public PublishingDependencyRevisionResolver getPdrResolver() {
089:                return pdrResolver;
090:            }
091:
092:            /**
093:             * Sets the pdrResolver that will be used during deliver for each dependency to get its
094:             * published information. This can particularly useful when the deliver is made for a release,
095:             * and when we wish to deliver each dependency which is still in integration. The
096:             * PublishingDependencyRevisionResolver can then do the delivering work for the dependency and
097:             * return the new (delivered) dependency info (with the delivered revision). Note that
098:             * PublishingDependencyRevisionResolver is only called for each <b>direct</b> dependency.
099:             * 
100:             * @return the instance of DeliverOptions on which the method has been called, for easy method
101:             *         chaining
102:             */
103:            public DeliverOptions setPdrResolver(
104:                    PublishingDependencyRevisionResolver pdrResolver) {
105:                this .pdrResolver = pdrResolver;
106:                return this ;
107:            }
108:
109:            public boolean isResolveDynamicRevisions() {
110:                return resolveDynamicRevisions;
111:            }
112:
113:            public DeliverOptions setResolveDynamicRevisions(
114:                    boolean resolveDynamicRevisions) {
115:                this .resolveDynamicRevisions = resolveDynamicRevisions;
116:                return this ;
117:            }
118:
119:            public boolean isValidate() {
120:                return validate;
121:            }
122:
123:            public DeliverOptions setValidate(boolean validate) {
124:                this .validate = validate;
125:                return this ;
126:            }
127:
128:            public Date getPubdate() {
129:                return pubdate;
130:            }
131:
132:            public DeliverOptions setPubdate(Date pubdate) {
133:                this .pubdate = pubdate;
134:                return this ;
135:            }
136:
137:            /**
138:             * Returns the status to which the module should be delivered, or null if the current status
139:             * should be kept.
140:             * 
141:             * @return the status to which the module should be delivered
142:             */
143:            public String getStatus() {
144:                return status;
145:            }
146:
147:            /**
148:             * Sets the status to which the module should be delivered, use null if the current status
149:             * should be kept.
150:             * 
151:             * @return the instance of DeliverOptions on which the method has been called, for easy method
152:             *         chaining
153:             */
154:            public DeliverOptions setStatus(String status) {
155:                this .status = status;
156:                return this ;
157:            }
158:
159:            /**
160:             * Returns the id of a previous resolve to use for delivering.
161:             * 
162:             * @return the id of a previous resolve
163:             */
164:            public String getResolveId() {
165:                return resolveId;
166:            }
167:
168:            /**
169:             * Sets the id of a previous resolve to use for delivering.
170:             * 
171:             * @param resolveId
172:             *            the id of a previous resolve
173:             * @return the instance of DeliverOptions on which the method has been called, for easy method
174:             *         chaining
175:             */
176:            public DeliverOptions setResolveId(String resolveId) {
177:                this .resolveId = resolveId;
178:                return this ;
179:            }
180:
181:            /**
182:             * Return the configurations which must be deliverd. Returns <tt>null</tt> if all
183:             * configurations has to be deliverd. Attention: the returned array can contain wildcards!
184:             * 
185:             * @return the configurations to deliver
186:             */
187:            public String[] getConfs() {
188:                return confs;
189:            }
190:
191:            /**
192:             * Sets the configurations to deliver.
193:             * 
194:             * @param confs
195:             *            the configurations to deliver
196:             * @return the instance of DeliverOptions on which the method has been called, for easy method
197:             *         chaining
198:             */
199:            public DeliverOptions setConfs(String[] confs) {
200:                this .confs = confs;
201:                return this ;
202:            }
203:
204:            public String toString() {
205:                return "status=" + status + " pubdate=" + pubdate
206:                        + " validate=" + validate + " resolveDynamicRevisions="
207:                        + resolveDynamicRevisions + " resolveId=" + resolveId;
208:
209:            }
210:
211:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.