ilog.rules.res.model
Class IlrPath
- java.lang.Object
-
- ilog.rules.res.model.IlrPath
-
- All Implemented Interfaces:
- java.io.Serializable
public class IlrPath extends java.lang.Object implements java.io.Serializable
TheIlrPath
class represents the path to a RuleApp or a ruleset.- Since:
- 7.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description IlrPath(java.lang.String ruleAppName)
Constructs a new RuleApp path with no version number.IlrPath(java.lang.String ruleAppName, IlrVersion ruleAppVersion)
Constructs a new RuleApp path.IlrPath(java.lang.String ruleAppName, IlrVersion ruleAppVersion, java.lang.String rulesetName)
Constructs a ruleset path with no version number.IlrPath(java.lang.String ruleAppName, IlrVersion ruleAppVersion, java.lang.String rulesetName, IlrVersion rulesetVersion)
Constructs a new canonical ruleset path.IlrPath(java.lang.String ruleAppName, java.lang.String rulesetName)
Constructs a new ruleset path with no version number.IlrPath(java.lang.String ruleAppName, java.lang.String rulesetName, IlrVersion rulesetVersion)
Constructs a new ruleset path with no RuleApp version number.
-
Method Summary
Methods Modifier and Type Method and Description boolean
equals(java.lang.Object obj)
java.lang.String
getRuleAppName()
Returns the RuleApp name.IlrVersion
getRuleAppVersion()
Returns the RuleApp version.java.lang.String
getRulesetName()
Returns the ruleset name.IlrVersion
getRulesetVersion()
Returns the ruleset version number.int
hashCode()
boolean
isCanonical()
Checks whether the path is canonical.boolean
isRuleAppPath()
Checks whether this path points to a RuleApp.boolean
isRulesetPath()
Checks whether this path points to a ruleset.static IlrPath
parsePath(java.lang.String path)
Returns anIlrPath
object that represents the path of the RuleApp or the ruleset specified by a string.java.lang.String
toString()
-
-
-
Constructor Detail
-
IlrPath
public IlrPath(java.lang.String ruleAppName)
Constructs a new RuleApp path with no version number.- Parameters:
ruleAppName
- The RuleApp name. This parameter cannot be set tonull
.
-
IlrPath
public IlrPath(java.lang.String ruleAppName, IlrVersion ruleAppVersion)
Constructs a new RuleApp path.- Parameters:
ruleAppName
- The RuleApp name. This parameter cannot be set tonull
.ruleAppVersion
- The RuleApp version number.
-
IlrPath
public IlrPath(java.lang.String ruleAppName, java.lang.String rulesetName, IlrVersion rulesetVersion)
Constructs a new ruleset path with no RuleApp version number.- Parameters:
ruleAppName
- The RuleApp name. This parameter cannot be set tonull
.rulesetName
- The ruleset name.rulesetVersion
- The ruleset version numbefr.
-
IlrPath
public IlrPath(java.lang.String ruleAppName, java.lang.String rulesetName)
Constructs a new ruleset path with no version number.- Parameters:
ruleAppName
- The RuleApp name. This parameter cannot be set tonull
.rulesetName
- The ruleset name.
-
IlrPath
public IlrPath(java.lang.String ruleAppName, IlrVersion ruleAppVersion, java.lang.String rulesetName)
Constructs a ruleset path with no version number.- Parameters:
ruleAppName
- The RuleApp name. This parameter cannot be set tonull
.ruleAppVersion
- The RuleApp version.rulesetName
- The ruleset name.
-
IlrPath
public IlrPath(java.lang.String ruleAppName, IlrVersion ruleAppVersion, java.lang.String rulesetName, IlrVersion rulesetVersion)
Constructs a new canonical ruleset path.- Parameters:
ruleAppName
- The RuleApp name. This parameter cannot be set tonull
.ruleAppVersion
- The RuleApp version number.rulesetName
- The ruleset name.rulesetVersion
- The ruleset version number.
-
-
Method Detail
-
parsePath
public static IlrPath parsePath(java.lang.String path) throws IlrFormatException
Returns anIlrPath
object that represents the path of the RuleApp or the ruleset specified by a string.- Throws:
IlrFormatException
- ifpath
is not in the correct format.- Parameters:
path
- The string to be parsed.- Returns:
- An
IlrPath
object representing the path of either the RuleApp or the ruleset specified by thepath
parameter. - See Also:
isRuleAppPath()
,isRulesetPath()
-
getRuleAppName
public java.lang.String getRuleAppName()
Returns the RuleApp name.- Returns:
- The RuleApp name. This method cannot return
null
.
-
getRuleAppVersion
public IlrVersion getRuleAppVersion()
Returns the RuleApp version.- Returns:
- The RuleApp version. If the RuleApp has not been assigned a version,
null
is returned.
-
getRulesetName
public java.lang.String getRulesetName()
Returns the ruleset name.- Returns:
- The ruleset name. If the ruleset has not been assigned a name,
null
is returned.
-
getRulesetVersion
public IlrVersion getRulesetVersion()
Returns the ruleset version number.- Returns:
- The ruleset version. If the ruleset has not been assigned a version number,
null
is returned.
-
isRuleAppPath
public boolean isRuleAppPath()
Checks whether this path points to a RuleApp. For example:- /ruleAppName
- /ruleAppName/ruleAppVersion
- Returns:
- If this path points to a RuleApp,
true
is returned.
-
isRulesetPath
public boolean isRulesetPath()
Checks whether this path points to a ruleset. For example:- /ruleAppName/rulesetName
- /ruleAppName/ruleAppVersion
- /ruleAppName/ruleAppVersion/rulesetName
- /ruleAppName/ruleAppVersion/rulesetName/rulesetVersion
- Returns:
true
if this path points to a ruleset.
-
isCanonical
public boolean isCanonical()
Checks whether the path is canonical. Examples of canonical paths are:- /ruleAppName/ruleAppVersion
- /ruleAppName/ruleAppVersion/rulesetName/rulesetVersion
- Returns:
true
if the path is canonical.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-