Rename and split rest resources ddi, mgmt and system
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ddi.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
/**
|
||||
* Annotation to enable {@link ComponentScan} in the resource package to setup
|
||||
* all {@link Controller} annotated classes and setup the Direct Device API.
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public @interface EnableDdiApi {
|
||||
|
||||
}
|
||||
@@ -10,13 +10,13 @@ package org.eclipse.hawkbit.ddi.json.model;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.artifact.ArtifactHash;
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Download information for all artifacts related to a specific {@link DdiChunk}.
|
||||
* Download information for all artifacts related to a specific {@link DdiChunk}
|
||||
* .
|
||||
*/
|
||||
public class DdiArtifact extends ResourceSupport {
|
||||
|
||||
@@ -25,16 +25,16 @@ public class DdiArtifact extends ResourceSupport {
|
||||
private String filename;
|
||||
|
||||
@JsonProperty
|
||||
private ArtifactHash hashes;
|
||||
private DdiArtifactHash hashes;
|
||||
|
||||
@JsonProperty
|
||||
private Long size;
|
||||
|
||||
public ArtifactHash getHashes() {
|
||||
public DdiArtifactHash getHashes() {
|
||||
return hashes;
|
||||
}
|
||||
|
||||
public void setHashes(final ArtifactHash hashes) {
|
||||
public void setHashes(final DdiArtifactHash hashes) {
|
||||
this.hashes = hashes;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ddi.json.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Hashes for given Artifact.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DdiArtifactHash {
|
||||
|
||||
@JsonProperty
|
||||
private String sha1;
|
||||
|
||||
@JsonProperty
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
public DdiArtifactHash() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Public constructor.
|
||||
*
|
||||
* @param sha1
|
||||
* @param md5
|
||||
*/
|
||||
public DdiArtifactHash(final String sha1, final String md5) {
|
||||
this.sha1 = sha1;
|
||||
this.md5 = md5;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the sha1
|
||||
*/
|
||||
public String getSha1() {
|
||||
return sha1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the md5
|
||||
*/
|
||||
public String getMd5() {
|
||||
return md5;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user