public static class StructureViewBean.Builder extends Object implements Cloneable
A builder class for StructureViewBean
, this class can be also used as the input
for StructureView.update(com.almworks.jira.structure.api.view.StructureViewBean.Builder)
.
This class is not thread-safe.
Constructor and Description |
---|
Builder()
Creates an empty builder.
|
Builder(StructureViewBean bean)
Creates a builder that is initialized with all properties from the specified bean.
|
Modifier and Type | Method and Description |
---|---|
StructureViewBean |
build()
Creates an immutable
StructureViewBean from the state in this builder. |
StructureViewBean.Builder |
clone() |
String |
getDescription() |
Long |
getId() |
String |
getName() |
PermissionSubject |
getOwner() |
List<PermissionRule> |
getPermissions() |
ViewSpecification.Builder |
getSpecification() |
boolean |
hasOwner() |
boolean |
hasPermissions() |
boolean |
isValid() |
boolean |
isValidExceptId() |
void |
setDescription(String description)
Sets the description of the view.
|
void |
setId(Long id)
Sets the ID of the view
|
void |
setName(String name)
Sets the name of the view
|
void |
setOwner(PermissionSubject owner)
Sets the owner of this view.
|
void |
setPermissions(Collection<? extends PermissionRule> permissions)
Sets the permission rules.
|
void |
setSpecification(ViewSpecification.Builder specification)
Updates view specification builder
|
String |
toString() |
void |
updatePropertiesOf(StructureViewBean.Builder target)
Updates properties of the target builder.
|
public Builder()
public Builder(@Nullable StructureViewBean bean)
public StructureViewBean.Builder clone()
public void updatePropertiesOf(StructureViewBean.Builder target)
target
- target beanpublic Long getId()
null
if not setpublic void setId(Long id)
id
- the ID or null
to clear the propertypublic String getName()
null
if not setpublic void setName(String name)
name
- the name of the view or null
to clear the propertypublic String getDescription()
null
if not setpublic void setDescription(String description)
description
- the description of the view or null
to clear the propertypublic PermissionSubject getOwner()
null
if not set or if no owner is specifiedpublic boolean hasOwner()
public void setOwner(PermissionSubject owner)
owner
- owner or null
to unset.@NotNull public List<PermissionRule> getPermissions()
public boolean hasPermissions()
public void setPermissions(@Nullable Collection<? extends PermissionRule> permissions)
permissions
- the list of permission rules for the view, or null
to clear the propertypublic ViewSpecification.Builder getSpecification()
public void setSpecification(ViewSpecification.Builder specification)
specification
- new view specification builder (it may be updated after it is installed into this builder)public boolean isValid()
public boolean isValidExceptId()
isValid()
but ID may be missing.@NotNull public StructureViewBean build() throws IllegalStateException
StructureViewBean
from the state in this builder.StructureViewBean
IllegalStateException
- if the current state is not validCopyright © 2024 Tempo Software. All Rights Reserved.