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) |
public DefaultFieldScreenService(I18nHelper.BeanFactory i18nFactory, FieldScreenManager fieldScreenManager, GlobalPermissionManager globalPermissionManager, ProjectFieldScreenHelper projectFieldScreenHelper, FieldManager fieldManager, com.atlassian.event.api.EventPublisher eventPublisher)
public ServiceOutcome<FieldScreen> copy(FieldScreen screenToCopy, String copyName, String copyDescription, ApplicationUser loggedInUser)
FieldScreenService
copy
in interface FieldScreenService
screenToCopy
- 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)
FieldScreenService
getAllTabs
in interface FieldScreenService
screenId
- 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)
FieldScreenService
addTab
in interface FieldScreenService
screenId
- 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)
FieldScreenService
renameTab
in interface FieldScreenService
tabId
- 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)
FieldScreenService
removeTab
in interface FieldScreenService
tabId
- 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)
FieldScreenService
moveTab
in interface FieldScreenService
tabId
- 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)
FieldScreenService
getFieldsOnTab
in interface FieldScreenService
tabId
- 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)
FieldScreenService
getAvailableFieldsForScreen
in interface FieldScreenService
screenId
- 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)
FieldScreenService
removeField
in interface FieldScreenService
item
- 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)
FieldScreenService
moveField
in interface FieldScreenService
fieldToMoveId
- 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)
FieldScreenService
addFieldToScreen
in interface FieldScreenService
tabId
- 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 checksCopyright © 2002-2018 Atlassian. All Rights Reserved.