Class Macro
- java.lang.Object
-
- com.synopsys.arc.jenkins.plugins.rolestrategy.Macro
-
public class Macro extends Object
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 Summary
Fields Modifier and Type Field Description static String
MACRO_PREFIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getDisplayName()
int
getIndex()
String
getName()
Get name of the macro.String[]
getParameters()
boolean
hasIndex()
boolean
hasParameters()
static boolean
isMacro(Role role)
Check if role is a macro.static boolean
isMacro(String macroString)
static Macro
parse(String macroString)
Parse macro from string.static Macro
Parse(String macroString)
Deprecated.String
toString()
-
-
-
Field Detail
-
MACRO_PREFIX
public static final String MACRO_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
Get name of the macro.- Returns:
- Name of the macro (without prefix)
-
getDisplayName
public String getDisplayName()
-
getIndex
public int getIndex()
-
hasIndex
public boolean hasIndex()
-
getParameters
public String[] getParameters()
-
hasParameters
public boolean hasParameters()
-
isMacro
public static boolean isMacro(Role role)
Check if role is a macro.- Parameters:
role
- Role to be checked- Returns:
- true if role meets macro criteria
-
isMacro
public static boolean isMacro(String macroString)
-
Parse
@Deprecated public static Macro Parse(String macroString) throws MacroException
Deprecated.Parse Macro.- Throws:
MacroException
-
parse
public static Macro parse(String macroString) throws MacroException
Parse macro from string.- Parameters:
macroString
- - macro string- Returns:
- Macro instance
- Throws:
MacroException
- - Parse error- Since:
- 2.3.0
-
-