]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/build/VersionedResourceDistribution.java
Save current state even if not completely stable
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / build / VersionedResourceDistribution.java
index a813438ba1f31b90fc7da2b4099f33dd70ee667c..4f64335fc2fe38cd3e472e9e47df7e02c19104db 100644 (file)
@@ -1,8 +1,28 @@
+/*
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.argeo.slc.core.build;
 
-import org.argeo.slc.build.NameVersion;
+import org.argeo.slc.NameVersion;
 import org.springframework.core.io.Resource;
 
+/**
+ * The distribution of a software package (jar, zip, RPM, etc.) which is
+ * versioned. The archive itself is accessible via a {@link Resource}.
+ */
 public class VersionedResourceDistribution extends ResourceDistribution
                implements NameVersion {
        private String name;
@@ -12,6 +32,11 @@ public class VersionedResourceDistribution extends ResourceDistribution
                super();
        }
 
+       public VersionedResourceDistribution(NameVersion nameVersion,
+                       Resource resource) {
+               this(nameVersion.getName(), nameVersion.getVersion(), resource);
+       }
+
        public VersionedResourceDistribution(String name, String version,
                        Resource resource) {
                super(resource);