public class RequireOS extends AbstractStandardEnforcerRule
| Modifier and Type | Field and Description |
|---|---|
String |
arch
Deprecated.
the visibility will be reduced to private with the next major version
|
boolean |
display
Deprecated.
the visibility will be reduced to private with the next major version
|
String |
family
Deprecated.
the visibility will be reduced to private with the next major version
|
String |
name
Deprecated.
the visibility will be reduced to private with the next major version
|
String |
version
Deprecated.
the visibility will be reduced to private with the next major version
|
message| Constructor and Description |
|---|
RequireOS()
Instantiates a new RequireOS.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allParamsEmpty()
Helper method to check that at least one of family, name, version or arch is set.
|
void |
displayOSInfo(org.apache.maven.plugin.logging.Log log,
boolean info)
Log the current OS information.
|
void |
execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper) |
String |
getArch()
Gets the arch.
|
String |
getCacheId() |
String |
getFamily()
Gets the family.
|
String |
getName()
Gets the name.
|
String |
getVersion()
Gets the version.
|
boolean |
isAllowed()
Helper method to determine if the current OS is allowed based on the injected values for family, name, version
and arch.
|
boolean |
isCacheable() |
boolean |
isDisplay() |
boolean |
isResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule theCachedRule) |
boolean |
isValidFamily(String theFamily)
Helper method to check if the given family is in the following list:
dos
mac
netware
os/2
tandem
unix
windows
win9x
z/os
os/400
Note: '!'
|
void |
setArch(String theArch)
Sets the arch.
|
void |
setDisplay(boolean display) |
void |
setFamily(String theFamily)
Sets the family.
|
void |
setName(String theName)
Sets the name.
|
void |
setVersion(String theVersion)
Sets the version.
|
getMessage, setMessagepublic String family
#setFamily(String)},
#getFamily()}public String name
#setName(String)},
#getName()}public String version
#setVersion(String)},
#getVersion()}public String arch
#setArch(String)},
#getArch()}public boolean display
#setDisplay(boolean)},
#isDisplay()}public void execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper)
throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
org.apache.maven.enforcer.rule.api.EnforcerRuleExceptionpublic void displayOSInfo(org.apache.maven.plugin.logging.Log log,
boolean info)
log - the loginfo - the infopublic boolean isAllowed()
public boolean allParamsEmpty()
public boolean isValidFamily(String theFamily)
theFamily - the family to check.public String getArch()
public void setArch(String theArch)
theArch - the arch to setpublic String getFamily()
public void setFamily(String theFamily)
theFamily - the family to setpublic String getName()
public void setName(String theName)
theName - the name to setpublic String getVersion()
public void setVersion(String theVersion)
theVersion - the version to setpublic final void setDisplay(boolean display)
public final boolean isDisplay()
public String getCacheId()
public boolean isCacheable()
public boolean isResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule theCachedRule)
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.