public class LicenseTemplateRule extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LicenseTemplateRule.RuleType |
| Constructor and Description |
|---|
LicenseTemplateRule(String parseableLicenseTemplateRule)
Create a new License Template Rule by parsing a rule string compliant with the SPDX
License Template text
|
LicenseTemplateRule(String ruleName,
LicenseTemplateRule.RuleType ruleType) |
LicenseTemplateRule(String name,
LicenseTemplateRule.RuleType type,
String original,
String match,
String example)
Create a new LicenseTemplateRule
|
| Modifier and Type | Method and Description |
|---|---|
String |
getExample() |
String |
getMatch() |
String |
getName() |
String |
getOriginal() |
LicenseTemplateRule.RuleType |
getType() |
void |
parseLicenseTemplateRule(String parseableLicenseTemplateRule)
Parse a license template rule string compliant with the SPDX license template text and
replace all properties with the parsed values
|
void |
setExample(String example) |
void |
setMatch(String match) |
void |
setName(String name) |
void |
setOriginal(String original) |
void |
setType(LicenseTemplateRule.RuleType type) |
String |
toString() |
void |
validate()
Validates that the LicenseTemplateRule is properly initialized
|
public LicenseTemplateRule(String name, LicenseTemplateRule.RuleType type, String original, String match, String example) throws LicenseTemplateRuleException
name - Name of the rule - must not be nulltype - - type of ruleoriginal - - Original text - must not be nullexample - - Example text - may be nullLicenseTemplateRuleExceptionpublic LicenseTemplateRule(String parseableLicenseTemplateRule) throws LicenseTemplateRuleException
parseableLicenseTemplateRule - LicenseTemplateRuleExceptionpublic LicenseTemplateRule(String ruleName, LicenseTemplateRule.RuleType ruleType) throws LicenseTemplateRuleException
ruleName - ruleType - LicenseTemplateRuleExceptionpublic void validate()
throws LicenseTemplateRuleException
LicenseTemplateRuleExceptionpublic void parseLicenseTemplateRule(String parseableLicenseTemplateRule) throws LicenseTemplateRuleException
parseableLicenseTemplateRule - LicenseTemplateRuleExceptionpublic LicenseTemplateRule.RuleType getType()
public void setType(LicenseTemplateRule.RuleType type)
type - the type to setpublic String getOriginal()
public void setOriginal(String original)
original - the original to setpublic String getName()
public void setName(String name)
name - the name to setpublic String getExample()
public void setExample(String example)
example - the example to setpublic String getMatch()
public void setMatch(String match)
match - the match to setCopyright © 2018 Linux Foundation. All Rights Reserved.