]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/build/ResourceDistribution.java
1 package org
.argeo
.slc
.core
.build
;
3 import java
.io
.IOException
;
4 import java
.io
.InputStream
;
6 import org
.argeo
.slc
.SlcException
;
7 import org
.argeo
.slc
.StreamReadable
;
8 import org
.argeo
.slc
.build
.Distribution
;
9 import org
.springframework
.core
.io
.Resource
;
11 public class ResourceDistribution
implements Distribution
, StreamReadable
{
12 private Resource location
;
14 public ResourceDistribution() {
17 public ResourceDistribution(Resource location
) {
18 this.location
= location
;
21 public String
getDistributionId() {
22 return location
.toString();
25 public Resource
getLocation() {
29 public void setLocation(Resource location
) {
30 this.location
= location
;
33 public InputStream
getInputStream() {
35 return location
.getInputStream();
36 } catch (IOException e
) {
37 throw new SlcException("Cannot get input stream", e
);