Interface LayoutService
public interface LayoutService
Layout service
-
Method Summary
Modifier and TypeMethodDescriptionvoid
associateToProject
(Layout layout, Long projectId) Associate a layout to a project.create
(LayoutBuilder layoutBuilder) Create the layout.void
Delete the layout.void
disassociateLayoutsToProject
(Long projectId) Disassociate layout from a projectvoid
disassociateToProject
(Layout layout, Long projectId) Disassociate a layout from a project.List<com.atlassian.jira.project.Project>
filterProjectsWithAssociatePermission
(List<com.atlassian.jira.project.Project> projectList) Get the list of projects those have associate permission.get()
Get the list of layouts.Get the layout by id.List<com.atlassian.jira.project.Project>
Get the projects that do not have a layout associated.Get the layout by name.getByProject
(com.atlassian.jira.project.Project project) Get the layout of the project.Gets container view builder.getContainerViewBuilderFrom
(ContainerView containerView) Get container view builder from a containergetDefault
(com.atlassian.jira.project.type.ProjectType projectType) Return the default layout for a project typeReturn the default empty layoutGet field view builder.getFieldViewBuilderFrom
(FieldView fieldView) Get field view builderGet the layout builder.List<com.atlassian.jira.project.Project>
getProjects
(Layout layout) Get the list of projects that have the layout.List<com.atlassian.jira.project.Project>
Get the list of projects that have the layout.Gets section view builder.getSectionViewBuilderFrom
(SectionView sectionView) Get section view builder from a sectiongetSectionViewBuildersFrom
(Layout layout) Get all section view builders from layoutgetSectionViewBuildersFrom
(List<SectionView> sectionViews) Get section view builders from a section listList<com.atlassian.jira.project.Project>
getUnassociatedProjects
(Layout layout) Get the list of projects those don't have this associated layout.List<com.atlassian.jira.project.Project>
Get the projects that have a layout.void
removeDefault
(com.atlassian.jira.project.type.ProjectType projectType) Remove the default layout for a project typevoid
setDefault
(com.atlassian.jira.project.type.ProjectType projectType, Layout layout) Set the default layout for a project typevoid
setDefault
(com.atlassian.jira.project.type.ProjectType projectType, Integer layoutId) Deprecated.void
Update the layout.
-
Method Details
-
getLayoutBuilder
LayoutBuilder getLayoutBuilder()Get the layout builder.- Returns:
- the layout builder
-
getSectionViewBuilder
SectionViewBuilder getSectionViewBuilder()Gets section view builder.- Returns:
- the section view builder
-
getSectionViewBuilderFrom
Get section view builder from a section- Parameters:
sectionView
-- Returns:
- the section view builder
-
getSectionViewBuildersFrom
Get section view builders from a section list- Parameters:
sectionViews
-- Returns:
- list of section view builders
-
getSectionViewBuildersFrom
Get all section view builders from layout- Parameters:
layout
-- Returns:
- list of section view builders
-
getContainerViewBuilder
ContainerViewBuilder getContainerViewBuilder()Gets container view builder.- Returns:
- the container view builder
-
getContainerViewBuilderFrom
Get container view builder from a container- Parameters:
containerView
-- Returns:
- the container view builder
-
getFieldViewBuilder
FieldViewBuilder getFieldViewBuilder()Get field view builder.- Returns:
- the field view builder
-
getFieldViewBuilderFrom
Get field view builder- Parameters:
fieldView
-- Returns:
- the field view builder
-
create
Create the layout.- Parameters:
layoutBuilder
- the layout builder- Returns:
- the layout created
-
get
Get the list of layouts.- Returns:
- the list of layouts
-
get
Get the layout by id.- Parameters:
id
- the id of the layout- Returns:
- the layout
-
getByName
Get the layout by name.- Parameters:
name
- the name of the layout- Returns:
- the layout
-
getByProject
Get the layout of the project. If the project doesn't have any layout, It gets the default empty layout.- Parameters:
project
- the project- Returns:
- the layout of the project
-
getProjects
Get the list of projects that have the layout. The layout predefined will not be taken to get the projects due to this layout has not associated projects.- Parameters:
layout
- the layout- Returns:
- the list of projects that have the layout
-
getProjectsWithPredefinedLayout
Get the list of projects that have the layout. If the layout is a predefined, it return the projects without layout associated.- Parameters:
layout
- the layout- Returns:
- the list of projects that have the layout
-
getUnassociatedProjects
Get the list of projects those don't have this associated layout.- Parameters:
layout
-- Returns:
- the list of projects those don't have this layout.
-
filterProjectsWithAssociatePermission
List<com.atlassian.jira.project.Project> filterProjectsWithAssociatePermission(List<com.atlassian.jira.project.Project> projectList) Get the list of projects those have associate permission.- Parameters:
projectList
-- Returns:
- the list of projects those have associate permission.
-
getAvailableProjects
List<com.atlassian.jira.project.Project> getAvailableProjects()Get the projects that do not have a layout associated.- Returns:
- the list of projects available
-
update
Update the layout.- Parameters:
layout
- the layout to be updated
-
delete
Delete the layout.- Parameters:
layout
- the layout to be deleted
-
associateToProject
Associate a layout to a project.- Parameters:
layout
- the layout to be associatedprojectId
- the project id
-
disassociateToProject
Disassociate a layout from a project.- Parameters:
layout
- the layout to be disassociateprojectId
- the project id
-
disassociateLayoutsToProject
Disassociate layout from a project- Parameters:
projectId
- the project id
-
getDefault
Return the default layout for a project type- Parameters:
projectType
- the project type- Returns:
- the default layout for this project type
-
setDefault
@Deprecated void setDefault(com.atlassian.jira.project.type.ProjectType projectType, Integer layoutId) Deprecated.Set the default layout for a project type- Parameters:
projectType
- the project typelayoutId
- the id of default layout
-
setDefault
Set the default layout for a project type- Parameters:
projectType
- the project typelayout
- default layout
-
removeDefault
void removeDefault(com.atlassian.jira.project.type.ProjectType projectType) Remove the default layout for a project type- Parameters:
projectType
- the project type
-
getDefaultEmptyLayout
Layout getDefaultEmptyLayout()Return the default empty layout- Returns:
- the default layout for this project type
-