Class CardLayoutFieldConfigurationServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.rapid.view.cardlayout.CardLayoutFieldConfigurationServiceImpl
- All Implemented Interfaces:
CardLayoutFieldConfigurationService
@Service
public class CardLayoutFieldConfigurationServiceImpl
extends Object
implements CardLayoutFieldConfigurationService
Implementation of
CardLayoutFieldConfigurationService
. Currently, only CustomField
s of type
GenericTextCFType
can be added to the card layout fields configuration.- Since:
- v6.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, CardLayoutField cardLayoutField) Add a new card layout field at the beginning of a card layout configuration.Remove aCardLayoutField
from aRapidView
's configuration.ServiceOutcome
<Set<com.atlassian.jira.issue.fields.Field>> getAvailableCardLayoutFields
(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, CardLayoutField.Mode mode) Get the fields which can be configured for thisRapidView
andCardLayoutField.Mode
.getCardLayoutFields
(RapidView rapidView) Get the currently configured card layout fields for thisRapidView
.getCardLayoutFields
(RapidView rapidView, CardLayoutField.Mode mode) Get the currently configured card layout fields for thisRapidView
andCardLayoutField.Mode
.moveAfter
(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, long fieldIdToMove, io.atlassian.fugue.Option<Long> optionalFieldIdToMoveAfter) Move aCardLayoutField
to be before another one.
-
Constructor Details
-
CardLayoutFieldConfigurationServiceImpl
public CardLayoutFieldConfigurationServiceImpl()
-
-
Method Details
-
getCardLayoutFields
public ServiceOutcome<List<CardLayoutFieldConfig>> getCardLayoutFields(@Nonnull RapidView rapidView) Description copied from interface:CardLayoutFieldConfigurationService
Get the currently configured card layout fields for thisRapidView
. This will potentially include configurations which are not valid due to fields not being available.- Specified by:
getCardLayoutFields
in interfaceCardLayoutFieldConfigurationService
- Parameters:
rapidView
- the view- Returns:
- the outcome
-
getCardLayoutFields
public ServiceOutcome<List<CardLayoutFieldConfig>> getCardLayoutFields(@Nonnull RapidView rapidView, @Nonnull CardLayoutField.Mode mode) Description copied from interface:CardLayoutFieldConfigurationService
Get the currently configured card layout fields for thisRapidView
andCardLayoutField.Mode
. This will potentially include configurations which are not valid due to fields not being available.- Specified by:
getCardLayoutFields
in interfaceCardLayoutFieldConfigurationService
- Parameters:
rapidView
- the viewmode
- the mode- Returns:
- the outcome
-
getAvailableCardLayoutFields
public ServiceOutcome<Set<com.atlassian.jira.issue.fields.Field>> getAvailableCardLayoutFields(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView, @Nonnull CardLayoutField.Mode mode) Description copied from interface:CardLayoutFieldConfigurationService
Get the fields which can be configured for thisRapidView
andCardLayoutField.Mode
. Does not include fields which are already configured. Returns an empty list if the card layout configuration has reached maximum number of items.- Specified by:
getAvailableCardLayoutFields
in interfaceCardLayoutFieldConfigurationService
- Parameters:
rapidView
- the viewmode
- the mode- Returns:
- the outcome
-
add
public ServiceOutcome<CardLayoutFieldConfig> add(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView, @Nonnull CardLayoutField cardLayoutField) Description copied from interface:CardLayoutFieldConfigurationService
Add a new card layout field at the beginning of a card layout configuration.- Specified by:
add
in interfaceCardLayoutFieldConfigurationService
- Parameters:
user
- the userrapidView
- the viewcardLayoutField
- the field to add- Returns:
- the new configuration
-
delete
@Nonnull public ServiceResult delete(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView, long cardLayoutFieldId) Description copied from interface:CardLayoutFieldConfigurationService
Remove aCardLayoutField
from aRapidView
's configuration.- Specified by:
delete
in interfaceCardLayoutFieldConfigurationService
- Parameters:
user
- the user performing the deleterapidView
- the viewcardLayoutFieldId
- the ID of the row to delete- Returns:
- the outcome
-
moveAfter
@Nonnull public ServiceResult moveAfter(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView, long fieldIdToMove, @Nonnull io.atlassian.fugue.Option<Long> optionalFieldIdToMoveAfter) Description copied from interface:CardLayoutFieldConfigurationService
Move aCardLayoutField
to be before another one.- Specified by:
moveAfter
in interfaceCardLayoutFieldConfigurationService
- Parameters:
user
- the user performing the moverapidView
- the viewfieldIdToMove
- the ID of the row to moveoptionalFieldIdToMoveAfter
- the ID of the row to move the other one after. If empty, the fieldIdToMove is moved to the first position- Returns:
- the outcome
-