public class

SimplePropertySupport

extends Object
implements PropertySupport
java.lang.Object
   ↳ com.atlassian.bitbucket.property.SimplePropertySupport

Class Overview

An implementation of PropertySupport for use in SCM entities, with write-once immutability provided by setProperties(PropertyMap). Note: The recommended way to use this class is by composition.

Summary

Nested Classes
class SimplePropertySupport.AbstractPropertyBuilder<B extends AbstractPropertyBuilder<B>>  
Public Constructors
SimplePropertySupport(AbstractPropertyBuilder<?> builder)
Public Methods
@Nonnull PropertyMap getProperties()
void setProperties(PropertyMap properties)
Set properties on this entity.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.bitbucket.property.PropertySupport

Public Constructors

public SimplePropertySupport (AbstractPropertyBuilder<?> builder)

Public Methods

@Nonnull public PropertyMap getProperties ()

public void setProperties (PropertyMap properties)

Set properties on this entity. Note: this class allows to set a non-empty instance of properties only once in its life time, either when constructing an instance, or by using this method. Once a non-empty instance of properties is set, any subsequent attempts to call this method will result in a runtime exception.

Clients can use getProperties() to query the current state of the properties.

Parameters
properties the properties to set
Throws
IllegalStateException if the properties has previously been set to a non-empty value