Last active
August 29, 2015 14:12
-
-
Save r-brown/9fe6fa117131a82ae2d9 to your computer and use it in GitHub Desktop.
SWID Tag Generator (example 01)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prepare SWID Tag processor | |
SwidProcessor processor = new DefaultSwidProcessor(); | |
((DefaultSwidProcessor) processor).setEntitlementRequiredIndicator(true) | |
.setProductTitle("NetLicensing") | |
.setProductVersion("2.1.0", 2, 1, 0, 0) | |
.setSoftwareCreator("Labs64", "regid.2010-04.com.labs64") | |
.setSoftwareLicensor("Labs64", "regid.2010-04.com.labs64") | |
.setSoftwareId("NLIC", "regid.2010-04.com.labs64") | |
.setTagCreator("Labs64", "regid.2010-04.com.labs64"); | |
// create builder and pass processor as build param | |
SwidBuilder builder = new SwidBuilder(); | |
SoftwareIdentificationTagComplexType swidTag = builder.build(processor); | |
// output resulting object | |
SwidWriter writer = new SwidWriter(); | |
StringWriter out = new StringWriter(); | |
writer.write(swidTag, out); | |
System.out.println(out); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment