Interface RuleLabelService
- All Known Implementing Classes:
RuleLabelServiceImpl
public interface RuleLabelService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionio.atlassian.fugue.Either<ErrorCollection,RuleLabelBean> createLabel(RemoteConnectUser remoteUser, TenantContext context, RuleLabelBean label) Creates label if it passes validationbooleandeleteLabel(RemoteConnectUser remoteUser, TenantContext context, Long labelId) Deletes label if it passes validationgetLabel(RemoteConnectUser remoteUser, TenantContext context, long labelId) Gets a single rule label by idgetLabels(RemoteConnectUser remoteUser, TenantContext context) Retrieves all the rule labels for a tenantbooleanisFeatureEnabled(TenantContext context) Should the rule label feature be visible to tenantio.atlassian.fugue.Either<ErrorCollection,RuleLabelBean> updateLabel(RemoteConnectUser remoteUser, TenantContext context, RuleLabelBean label) Updates given label if it passes validation
-
Field Details
-
RULE_COUNT_THRESHOLD
static final int RULE_COUNT_THRESHOLD- See Also:
-
-
Method Details
-
getLabels
Retrieves all the rule labels for a tenant- Parameters:
remoteUser- the user requesting the labelscontext- The database tenant context- Returns:
- the complete list or rule labels for the tenant
-
getLabel
Gets a single rule label by id- Parameters:
remoteUser- the user requesting the labelscontext- The database tenant contextlabelId- The id of the label- Returns:
- an optional of the label
-
updateLabel
io.atlassian.fugue.Either<ErrorCollection,RuleLabelBean> updateLabel(RemoteConnectUser remoteUser, TenantContext context, RuleLabelBean label) Updates given label if it passes validation- Parameters:
remoteUser- the user requesting the labelscontext- The database tenant contextlabel- The label with the updates to apply- Returns:
- The updated label or validation errors
-
createLabel
io.atlassian.fugue.Either<ErrorCollection,RuleLabelBean> createLabel(RemoteConnectUser remoteUser, TenantContext context, RuleLabelBean label) Creates label if it passes validation- Parameters:
remoteUser- the user requesting the labelscontext- The database tenant contextlabel- The label to create- Returns:
- The created label or validation errors
-
deleteLabel
Deletes label if it passes validation- Parameters:
remoteUser- the user requesting the labelscontext- The database tenant contextlabelId- The id of label to delete- Returns:
- true when deleted, false when doesn't exist
-
isFeatureEnabled
Should the rule label feature be visible to tenant- Parameters:
context- The database tenant context- Returns:
- Whether or not to surface the feature to tenant
-