X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fbuild%2FVersionedResourceDistribution.java;h=4f64335fc2fe38cd3e472e9e47df7e02c19104db;hb=9b2422e7198df6f34282a805058dd5f497417318;hp=a813438ba1f31b90fc7da2b4099f33dd70ee667c;hpb=b98bef7b2e743103c93e719ac5c18bf41858ec3a;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/build/VersionedResourceDistribution.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/build/VersionedResourceDistribution.java index a813438ba..4f64335fc 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/build/VersionedResourceDistribution.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/build/VersionedResourceDistribution.java @@ -1,8 +1,28 @@ +/* + * Copyright (C) 2010 Mathieu Baudier + * + * 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);