Class Macro
java.lang.Object
com.synopsys.arc.jenkins.plugins.rolestrategy.Macro
Macro representation for roles and users. Implements following format:
@macroId[:index][(parameter1, parameter2, ...)]
,
- macroId - name of the macro. Supports alphanumeric symbols
- index - optional integer, which allow to duplicate macro calls
- parameters - optional set of strings. each parameter should be string without quotes
- Since:
- 2.1.0
- Author:
- Oleg Nenashev, Synopsys Inc.
-
Field Details
-
MACRO_PREFIX
- See Also:
-
-
Constructor Details
-
Macro
Create new Macro.- Parameters:
name
- Name of Macroindex
- Index of Macroparameters
- List of Parameters
-
-
Method Details
-
getName
Get name of the macro.- Returns:
- Name of the macro (without prefix)
-
getDisplayName
-
getIndex
public int getIndex() -
hasIndex
public boolean hasIndex() -
getParameters
-
hasParameters
public boolean hasParameters() -
toString
-
isMacro
Check if role is a macro.- Parameters:
role
- Role to be checked- Returns:
- true if role meets macro criteria
-
isMacro
-
Parse
Deprecated.Parse Macro.- Throws:
MacroException
-
parse
Parse macro from string.- Parameters:
macroString
- - macro string- Returns:
- Macro instance
- Throws:
MacroException
- - Parse error- Since:
- 2.3.0
-
parse(java.lang.String)