1. /*
  2. * Copyright 2002,2004 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. */
  17. package org.apache.tools.ant.taskdefs.optional.extension;
  18. import org.apache.tools.ant.types.FileSet;
  19. /**
  20. * LibFileSet represents a fileset containing libraries.
  21. * Asociated with the libraries is data pertaining to
  22. * how they are to be handled when building manifests.
  23. *
  24. * @version $Revision: 1.3.2.4 $ $Date: 2004/03/09 17:01:45 $
  25. */
  26. public class LibFileSet
  27. extends FileSet {
  28. /**
  29. * Flag indicating whether should include the
  30. * "Implementation-URL" attribute in manifest.
  31. * Defaults to false.
  32. */
  33. private boolean includeURL;
  34. /**
  35. * Flag indicating whether should include the
  36. * "Implementation-*" attributes in manifest.
  37. * Defaults to false.
  38. */
  39. private boolean includeImpl;
  40. /**
  41. * String that is the base URL for the librarys
  42. * when constructing the "Implementation-URL"
  43. * attribute. For instance setting the base to
  44. * "http://jakarta.apache.org/avalon/libs/" and then
  45. * including the library "excalibur-cli-1.0.jar" in the
  46. * fileset will result in the "Implementation-URL" attribute
  47. * being set to "http://jakarta.apache.org/avalon/libs/excalibur-cli-1.0.jar"
  48. *
  49. * Note this is only used if the library does not define
  50. * "Implementation-URL" itself.
  51. *
  52. * Note that this also implies includeURL=true
  53. */
  54. private String urlBase;
  55. /**
  56. * Flag indicating whether should include the
  57. * "Implementation-URL" attribute in manifest.
  58. * Defaults to false.
  59. *
  60. * @param includeURL the flag
  61. * @see #includeURL
  62. */
  63. public void setIncludeUrl(boolean includeURL) {
  64. this.includeURL = includeURL;
  65. }
  66. /**
  67. * Flag indicating whether should include the
  68. * "Implementation-*" attributes in manifest.
  69. * Defaults to false.
  70. *
  71. * @param includeImpl the flag
  72. * @see #includeImpl
  73. */
  74. public void setIncludeImpl(boolean includeImpl) {
  75. this.includeImpl = includeImpl;
  76. }
  77. /**
  78. * Set the url base for fileset.
  79. *
  80. * @param urlBase the base url
  81. * @see #urlBase
  82. */
  83. public void setUrlBase(String urlBase) {
  84. this.urlBase = urlBase;
  85. }
  86. /**
  87. * Get the includeURL flag.
  88. *
  89. * @return the includeURL flag.
  90. */
  91. boolean isIncludeURL() {
  92. return includeURL;
  93. }
  94. /**
  95. * Get the includeImpl flag.
  96. *
  97. * @return the includeImpl flag.
  98. */
  99. boolean isIncludeImpl() {
  100. return includeImpl;
  101. }
  102. /**
  103. * Get the urlbase.
  104. *
  105. * @return the urlbase.
  106. */
  107. String getUrlBase() {
  108. return urlBase;
  109. }
  110. }