Class PluggableComponentInfo
java.lang.Object
com.codebarrel.automation.api.addons.PluggableComponentInfo
-
Constructor Summary
ConstructorsConstructorDescriptionPluggableComponentInfo(com.codebarrel.automation.api.config.ComponentType component, String type, String name, String description, String iconUrl, boolean projectSafe) Creates a PluggableComponentInfo with default isRestricted = false.PluggableComponentInfo(com.codebarrel.automation.api.config.ComponentType component, String type, String name, String description, String iconUrl, boolean projectSafe, boolean isRestricted) Creates a PluggableComponentInfo with restriction information. -
Method Summary
Modifier and TypeMethodDescriptioncom.codebarrel.automation.api.config.ComponentTypegetName()getType()booleanbooleanReturns whether this component is restricted for the current user.voidsetRestricted(boolean restricted) Sets whether this component is restricted for the current user.
-
Constructor Details
-
PluggableComponentInfo
public PluggableComponentInfo() -
PluggableComponentInfo
public PluggableComponentInfo(com.codebarrel.automation.api.config.ComponentType component, String type, String name, String description, String iconUrl, boolean projectSafe) Creates a PluggableComponentInfo with default isRestricted = false. This constructor maintains backward compatibility.- Parameters:
component- the component type (TRIGGER, CONDITION, or ACTION)type- the unique component keyname- the display namedescription- the component descriptioniconUrl- the icon URLprojectSafe- whether the component can be used in project-scoped rules
-
PluggableComponentInfo
public PluggableComponentInfo(com.codebarrel.automation.api.config.ComponentType component, String type, String name, String description, String iconUrl, boolean projectSafe, boolean isRestricted) Creates a PluggableComponentInfo with restriction information.- Parameters:
component- the component type (TRIGGER, CONDITION, or ACTION)type- the unique component keyname- the display namedescription- the component descriptioniconUrl- the icon URLprojectSafe- whether the component can be used in project-scoped rulesisRestricted- whether the component is restricted for the current user based on their group membership
-
-
Method Details
-
getComponent
public com.codebarrel.automation.api.config.ComponentType getComponent() -
getType
-
getName
-
getDescription
-
getIconUrl
-
isProjectSafe
public boolean isProjectSafe() -
isRestricted
public boolean isRestricted()Returns whether this component is restricted for the current user. When true, the UI should render the component as greyed out and disabled, but still visible for transparency. The component will not be clickable in the rule component picker.- Returns:
- true if the current user cannot use this component, false otherwise
-
setRestricted
public void setRestricted(boolean restricted) Sets whether this component is restricted for the current user. Used for builder pattern compatibility.- Parameters:
restricted- true if the component is restricted for the current user
-