Skip to content

Commit

Permalink
Fixed build configuration and javadoc errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Aug 14, 2018
1 parent 1c46989 commit d524460
Show file tree
Hide file tree
Showing 21 changed files with 190 additions and 42 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>gov.nist.secauto.swid</groupId>
<artifactId>parent</artifactId>
<version>0.0.6-SNAPSHOT</version>
<version>0.6.0-SNAPSHOT</version>

<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion swid-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>gov.nist.secauto.swid</groupId>
<artifactId>parent</artifactId>
<version>0.0.6-SNAPSHOT</version>
<version>0.6.0-SNAPSHOT</version>
</parent>

<artifactId>swid-builder</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public class CBORFirmwareOutputHandler extends CBORSupport {
// private static final long FIRMWARE_MANIFEST_DEPENDENCIES = 68L; // resource-reference
// private static final long FIRMWARE_MANIFEST_ALIASES = 69L; // resource-reference
private static final long FIRMWARE_MANIFEST_TARGET_DEVICE_ID = 85L; // object
private static final long FIRMWARE_MANIFEST_PAYLOAD_ENTRY = 60L; // firmware-payload / [ 2*
// firmware-payload ]
// firmware-payload / [ 2* firmware-payload ]
private static final long FIRMWARE_MANIFEST_PAYLOAD_ENTRY = 60L;
private static final long FIRMWARE_MANIFEST_SIMPLE_EXTENSIONS = 115L; // { + int => bytes }

private static final long FIRMWARE_PAYLOAD_ID = 61L; // bytes / text / uint
Expand Down Expand Up @@ -99,6 +99,14 @@ public class CBORFirmwareOutputHandler extends CBORSupport {
private static final long FIRMWARE_PAYLOAD_PACKAGE_COMPRESSION_GUIDANCE = 77L; // bytes
private static final long FIRMWARE_PAYLOAD_PACKAGE_VALUE = 78L; // bytes

/**
* Generate a CBOR object based on the provided builder.
*
* @param builder
* the firmware builder to read data from
* @param generator
* the generator to write data to
*/
public void generate(FirmwareBuilder builder, CBORGenerator generator) {
try {
generator.writeStartObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@
import gov.nist.swid.builder.resource.file.FileBuilder;
import gov.nist.swid.builder.resource.firmware.FirmwareBuilder;

/**
* Represents a collection of file, directory, and/or firmware resources.
*
* @param <T>
* the type of resource collection
*/
public interface ResourceCollectionEntryGenerator<T> {
/**
* Adds the file, represented by the builder, to this resource collection.
*
* @param builder
* the file builder representing the file resource to add
* @param parent
* the containing resource collection instance
*/
void generate(FileBuilder builder, T parent);

Expand All @@ -41,8 +49,18 @@ public interface ResourceCollectionEntryGenerator<T> {
*
* @param builder
* the directory builder representing the directory resource to add
* @param parent
* the containing resource collection instance
*/
void generate(DirectoryBuilder builder, T parent);

/**
* Adds the firmware manifest, represented by the builder, to this resource collection.
*
* @param firmwareBuilder
* the builder representing the firmware resource to add
* @param parent
* the containing resource collection instance
*/
void generate(FirmwareBuilder firmwareBuilder, T parent);
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public class DeviceIdentifier {
private String rfc4122;
private byte[] ieee8021ar;

/**
* Construct a new device identier.
*
* @param vendor
* the device vendor string
* @param model
* the device model string
*/
public DeviceIdentifier(String vendor, String model) {
super();
Util.requireNonEmpty(vendor, "vendor");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public FirmwareIdentifier getId() {
/**
* Set the id of the firmware manifest.
*
* @param name
* the firmware's name
* @param id
* the firmware's identifier
* @return the same builder instance
*/
public FirmwareBuilder id(FirmwareIdentifier id) {
Expand All @@ -96,8 +96,9 @@ public ZonedDateTime getCreationTimestamp() {
/**
* Set the creation timestamp of the firmware manifest.
*
* @param creationTimestamp
* @param dateTime
* the creationTimestamp to set
* @return the same builder instance
*/
public FirmwareBuilder creationTimestamp(ZonedDateTime dateTime) {
Objects.requireNonNull(dateTime, "dateTime");
Expand Down Expand Up @@ -183,7 +184,7 @@ public List<ResourceReference> getAliases() {
/**
* Adds a new alias to the list of aliases.
*
* @param aliases
* @param alias
* the alias to add
* @return the same builder instance
*/
Expand All @@ -205,8 +206,8 @@ public List<ResourceReference> getDependencies() {
/**
* Adds a new dependency to the list of aliases.
*
* @param aliases
* the alias to add
* @param dependency
* the dependency to add
* @return the same builder instance
*/
public FirmwareBuilder addDependency(ResourceReference dependency) {
Expand Down Expand Up @@ -293,14 +294,14 @@ public Map<Integer, byte[]> getExtensions() {
/**
* Adds a new extension object.
*
* @param extenstiontype
* @param extenstionType
* the extension type identifier
* @param extensions
* @param extension
* the extension content
* @return the same builder instance
*/
public FirmwareBuilder addExtension(int extenstiontype, byte[] extension) {
this.extensions.put(extenstiontype, extension);
public FirmwareBuilder addExtension(int extenstionType, byte[] extension) {
this.extensions.put(extenstionType, extension);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public FirmwareIdentifier getId() {
/**
* Set the id of the firmware payload.
*
* @param name
* the firmware's name
* @param id
* the firmware's identifier
* @return the same builder instance
*/
public FirmwarePayloadBuilder id(FirmwareIdentifier id) {
Expand Down Expand Up @@ -159,7 +159,7 @@ public byte[] getFormatGuidance() {
/**
* Set the firmware payload's format guidance.
*
* @param format
* @param bytes
* guidance a {@code non-null} byte string
* @return the same builder instance
*/
Expand Down Expand Up @@ -311,8 +311,8 @@ public FirmwarePayloadBuilder addDigest(DigestType type, HashAlgorithm algorithm
* the type of resource this digest is for
* @param algorithm
* the algorithm to establish a hash value for
* @param hashBytes
* an rray of bytes representing the digest value
* @param digest
* an array of bytes representing the digest value
* @return the same builder instance
*/
public FirmwarePayloadBuilder addDigest(DigestType type, HashAlgorithm algorithm, byte[] digest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public static Object[] requireNonEmpty(Object[] array, String message) {
* the pattern to match against
* @param str
* the string to check
* @param message
* the exception message to use
* @throws NullPointerException
* if the provided string is <code>null</code>
* @throws IllegalArgumentException
Expand Down
4 changes: 2 additions & 2 deletions swid-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>parent</artifactId>
<groupId>gov.nist.secauto.swid</groupId>
<version>0.0.6-SNAPSHOT</version>
<artifactId>parent</artifactId>
<version>0.6.0-SNAPSHOT</version>
</parent>

<artifactId>swid-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public String getTagName() {
* Determine the path to the SWID tag file and create any directories in this path.
*
* @return the tag file
* @throws MojoExecutionException
* @throws ArchiverException
* if an error occurred while creating directories
*/
protected File getSwidTagFile() throws ArchiverException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@
import java.util.List;

/**
* Goal which touches a timestamp file.
*
* @deprecated Don't use!
* Goal which generates a SWID Tag
*/
@Mojo(name = "generate", defaultPhase = LifecyclePhase.PREPARE_PACKAGE)
public class SwidGenerateMojo extends AbstractMojo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public interface FileEntry {
/**
* Retrieve the relative path of to the SWID Tag.
*
* @param swidTagPath
* the path to relativize
* @return the file's relative path
*/
public List<String> getRelativePathSegements(String swidTagPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
import java.util.List;

/**
* This class is a data transfer object used for conveying entity component configuration settings
* for the {@link SWIDHandler} plexus component.
* This class is a data transfer object used for conveying an entity to include in a SWID Tag.
*
*/
public class Entity {
Expand Down
17 changes: 7 additions & 10 deletions swidval-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>gov.nist.secauto.swid</groupId>
<artifactId>parent</artifactId>
<version>0.0.6-SNAPSHOT</version>
</parent>
<parent>
<groupId>gov.nist.secauto.swid</groupId>
<artifactId>parent</artifactId>
<version>0.6.0-SNAPSHOT</version>
</parent>

<artifactId>swidval-webapp</artifactId>
<version>0.0.1-SNAPSHOT</version>

<packaging>war</packaging>

Expand All @@ -21,14 +20,13 @@
<spring.version>4.3.2.RELEASE</spring.version>
<jstl.version>1.2</jstl.version>
<servletapi.version>4.0.0-b01</servletapi.version>
<swidval.version>0.5.1-SNAPSHOT</swidval.version>
</properties>

<dependencies>
<dependency>
<groupId>gov.nist.decima</groupId>
<groupId>gov.nist.secauto.swid</groupId>
<artifactId>swidval</artifactId>
<version>${swidval.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
Expand All @@ -43,7 +41,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/**
* Portions of this software was developed by employees of the National Institute
* of Standards and Technology (NIST), an agency of the Federal Government.
* Pursuant to title 17 United States Code Section 105, works of NIST employees are
* not subject to copyright protection in the United States and are considered to
* be in the public domain. Permission to freely use, copy, modify, and distribute
* this software and its documentation without fee is hereby granted, provided that
* this notice and disclaimer of warranty appears in all copies.
*
* THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER
* EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY
* THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM
* INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE
* SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT
* SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,
* INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR
* IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
* CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR
* PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT
* OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.
*/

package gov.nist.swidval.controller;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/**
* Portions of this software was developed by employees of the National Institute
* of Standards and Technology (NIST), an agency of the Federal Government.
* Pursuant to title 17 United States Code Section 105, works of NIST employees are
* not subject to copyright protection in the United States and are considered to
* be in the public domain. Permission to freely use, copy, modify, and distribute
* this software and its documentation without fee is hereby granted, provided that
* this notice and disclaimer of warranty appears in all copies.
*
* THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER
* EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY
* THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM
* INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE
* SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT
* SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,
* INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR
* IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
* CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR
* PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT
* OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.
*/

package gov.nist.swidval.controller;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/**
* Portions of this software was developed by employees of the National Institute
* of Standards and Technology (NIST), an agency of the Federal Government.
* Pursuant to title 17 United States Code Section 105, works of NIST employees are
* not subject to copyright protection in the United States and are considered to
* be in the public domain. Permission to freely use, copy, modify, and distribute
* this software and its documentation without fee is hereby granted, provided that
* this notice and disclaimer of warranty appears in all copies.
*
* THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER
* EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY
* THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM
* INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE
* SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT
* SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,
* INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR
* IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
* CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR
* PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT
* OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.
*/

package gov.nist.swidval.controller;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/**
* Portions of this software was developed by employees of the National Institute
* of Standards and Technology (NIST), an agency of the Federal Government.
* Pursuant to title 17 United States Code Section 105, works of NIST employees are
* not subject to copyright protection in the United States and are considered to
* be in the public domain. Permission to freely use, copy, modify, and distribute
* this software and its documentation without fee is hereby granted, provided that
* this notice and disclaimer of warranty appears in all copies.
*
* THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER
* EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY
* THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM
* INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE
* SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT
* SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,
* INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR
* IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
* CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR
* PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT
* OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.
*/

package gov.nist.swidval.controller;

Expand Down
Loading

0 comments on commit d524460

Please sign in to comment.