public class DefaultFieldScreenService extends Object implements FieldScreenService
| Constructor and Description |
|---|
DefaultFieldScreenService(I18nHelper.BeanFactory i18nFactory,
FieldScreenManager fieldScreenManager,
GlobalPermissionManager globalPermissionManager,
ProjectFieldScreenHelper projectFieldScreenHelper,
FieldManager fieldManager,
com.atlassian.event.api.EventPublisher eventPublisher,
FieldScreenSchemeManager fieldScreenSchemeManager,
WorkflowManager workflowManager,
DcLicenseOrDevModeChecker dcLicenseOrDevModeChecker) |
| Modifier and Type | Method and Description |
|---|---|
ServiceOutcome<Field> |
addFieldToScreen(FieldScreenTabId tabId,
String fieldId,
FieldScreenOperationContext context)
Adds a new field to the given tab
|
ServiceOutcome<FieldScreenTab> |
addTab(FieldScreenId screenId,
String tabName,
FieldScreenOperationContext context)
Creates and adds new tab for screen
|
ServiceOutcome<FieldScreen> |
copy(FieldScreen screenToCopy,
String copyName,
String copyDescription,
ApplicationUser loggedInUser)
Creates a copy of the passed field screen assigning the passed name and description.
|
ServiceOutcome<List<FieldScreenTab>> |
getAllTabs(FieldScreenId screenId,
FieldScreenOperationContext context)
Returns a list of all tabs for the given screen
|
ServiceOutcome<List<OrderableField>> |
getAvailableFieldsForScreen(FieldScreenId screenId,
FieldScreenOperationContext context)
Gets all fields, that can be added to given screen.
|
ServiceOutcome<List<Field>> |
getFieldsOnTab(FieldScreenTabId tabId,
FieldScreenOperationContext context)
Gets all fields on given tab
|
ServiceOutcome<List<FieldWithShowWhenEmpty>> |
getFieldsWithShowWhenEmpty(FieldScreenTabId tabId,
FieldScreenOperationContext context)
Get all fields for a
FieldScreenTab with information if field should be shown when it has no value
Can only be used within DC license or dev mode |
ServiceOutcome<Boolean> |
getIsFieldScreenDeletable(FieldScreenId id,
FieldScreenOperationContext context)
Gets information whether field screen can be safely deleted
|
ServiceResult |
moveField(FieldScreenLayoutItemId fieldToMoveId,
MoveFieldInfo moveInfo,
FieldScreenOperationContext context)
Moves field along the tab, according to instructed details
|
ServiceOutcome<FieldScreenTab> |
moveTab(FieldScreenTabId tabId,
Integer position,
FieldScreenOperationContext context)
Moves tab position on given screen
|
ServiceResult |
removeField(FieldScreenLayoutItemId item,
FieldScreenOperationContext context)
Removes a field from the tab and effectively from the screen
|
ServiceResult |
removeTab(FieldScreenTabId tabId,
FieldScreenOperationContext context)
Removes tab from screen
|
ServiceOutcome<FieldScreenTab> |
renameTab(FieldScreenTabId tabId,
String newName,
FieldScreenOperationContext context)
Renames already existing tab on given screen
|
ServiceResult |
updateShowWhenEmpty(FieldScreenLayoutItemId itemId,
FieldScreenOperationContext context,
boolean showWhenEmpty)
Update showWhenEmpty indicator of given
FieldScreenLayoutItemId
Can only be used within DC license or dev mode |
public DefaultFieldScreenService(I18nHelper.BeanFactory i18nFactory, FieldScreenManager fieldScreenManager, GlobalPermissionManager globalPermissionManager, ProjectFieldScreenHelper projectFieldScreenHelper, FieldManager fieldManager, com.atlassian.event.api.EventPublisher eventPublisher, FieldScreenSchemeManager fieldScreenSchemeManager, WorkflowManager workflowManager, DcLicenseOrDevModeChecker dcLicenseOrDevModeChecker)
public ServiceOutcome<FieldScreen> copy(FieldScreen screenToCopy, String copyName, String copyDescription, ApplicationUser loggedInUser)
FieldScreenServicecopy in interface FieldScreenServicescreenToCopy - screen to copycopyName - name for the copied screencopyDescription - description for the copied screenloggedInUser - user performing the copypublic ServiceOutcome<List<FieldScreenTab>> getAllTabs(FieldScreenId screenId, FieldScreenOperationContext context)
FieldScreenServicegetAllTabs in interface FieldScreenServicescreenId - id of screencontext - context in which current operation is being executedServiceOutcome containing a list of tabs, or errors in case operation being not allowedpublic ServiceOutcome<FieldScreenTab> addTab(FieldScreenId screenId, String tabName, FieldScreenOperationContext context)
FieldScreenServiceaddTab in interface FieldScreenServicescreenId - id of screentabName - new name of a tab. Cannot be emptycontext - context in which current operation is being executedServiceOutcome containing freshly created tab, or errors in case of failed validation or permission checkspublic ServiceOutcome<FieldScreenTab> renameTab(FieldScreenTabId tabId, String newName, FieldScreenOperationContext context)
FieldScreenServicerenameTab in interface FieldScreenServicetabId - id of a tab to be renamednewName - a new name of a tab. Cannot be emptycontext - context in which current operation is being executedServiceOutcome containing renamed tab, or errors in case of failed validation or permission checkspublic ServiceResult removeTab(FieldScreenTabId tabId, FieldScreenOperationContext context)
FieldScreenServiceremoveTab in interface FieldScreenServicetabId - id of a tab to be removedcontext - context in which current operation is being executedServiceResult indicating whether operation succeeded, or errors in case of failed validationpublic ServiceOutcome<FieldScreenTab> moveTab(FieldScreenTabId tabId, Integer position, FieldScreenOperationContext context)
FieldScreenServicemoveTab in interface FieldScreenServicetabId - id of a tab to be movedposition - new position on the screen expressed as 0-based indexcontext - context in which current operation is being executedServiceOutcome containing moved tab, or errors in case of failed validation or permission checkspublic ServiceOutcome<List<Field>> getFieldsOnTab(FieldScreenTabId tabId, FieldScreenOperationContext context)
FieldScreenServicegetFieldsOnTab in interface FieldScreenServicetabId - id of a tabcontext - context in which current operation is being executedServiceOutcome containing ordered list of all fields, or errors in case of failed validation or permission checkspublic ServiceOutcome<List<OrderableField>> getAvailableFieldsForScreen(FieldScreenId screenId, FieldScreenOperationContext context)
FieldScreenServicegetAvailableFieldsForScreen in interface FieldScreenServicescreenId - id of a screencontext - context in which current operation is being executedServiceOutcome containing a list of addable fields, or errors in case of failed validation or permission checkspublic ServiceResult removeField(FieldScreenLayoutItemId item, FieldScreenOperationContext context)
FieldScreenServiceremoveField in interface FieldScreenServiceitem - id of field to be removedcontext - context in which current operation is being executedServiceResult indicating whether operation succeeded, or errors in case of failed validationpublic ServiceResult moveField(FieldScreenLayoutItemId fieldToMoveId, MoveFieldInfo moveInfo, FieldScreenOperationContext context)
FieldScreenServicemoveField in interface FieldScreenServicefieldToMoveId - id of field to be movedmoveInfo - an MoveFieldInfo instructing how the field should be movedcontext - context in which current operation is being executedServiceResult indicating whether operation succeeded, or errors in case of failed validationpublic ServiceOutcome<Field> addFieldToScreen(FieldScreenTabId tabId, String fieldId, FieldScreenOperationContext context)
FieldScreenServiceaddFieldToScreen in interface FieldScreenServicetabId - id of tabfieldId - the field ID which is expected to be addedcontext - context in which current operation is being executedServiceOutcome containing newly added field, or errors in case of failed validation or permission checkspublic ServiceOutcome<Boolean> getIsFieldScreenDeletable(FieldScreenId id, FieldScreenOperationContext context)
FieldScreenServicegetIsFieldScreenDeletable in interface FieldScreenServiceid - id of a screencontext - context in which current operation is being executedServiceOutcome containing boolean denoting if screen can be deleted or notpublic ServiceResult updateShowWhenEmpty(FieldScreenLayoutItemId itemId, FieldScreenOperationContext context, boolean showWhenEmpty)
FieldScreenServiceFieldScreenLayoutItemId
Can only be used within DC license or dev modeupdateShowWhenEmpty in interface FieldScreenServiceitemId - id of field screen layout itemcontext - context in which current operation is being executedshowWhenEmpty - new value for indicatorServiceResult indicating whether operation succeeded, or errors in case of failed validationpublic ServiceOutcome<List<FieldWithShowWhenEmpty>> getFieldsWithShowWhenEmpty(FieldScreenTabId tabId, FieldScreenOperationContext context)
FieldScreenServiceFieldScreenTab with information if field should be shown when it has no value
Can only be used within DC license or dev modegetFieldsWithShowWhenEmpty in interface FieldScreenServicetabId - id of a tabcontext - context in which current operation is being executedFieldWithShowWhenEmptyCopyright © 2002-2023 Atlassian. All Rights Reserved.