com.atlassian.gadgets.spec
Class UserPrefSpec.Builder

java.lang.Object
  extended by com.atlassian.gadgets.spec.UserPrefSpec.Builder
Enclosing class:
UserPrefSpec

public static class UserPrefSpec.Builder
extends Object

A builder that facilitates construction of UserPrefSpec objects. The final UserPrefSpec is created by calling the build() method


Method Summary
 UserPrefSpec build()
          Returns the final constructed UserPrefSpec
 UserPrefSpec.Builder dataType(DataType dataType)
          Set the DataType of the UserPrefSpec under construction and return this Builder to allow further construction to be done.
 UserPrefSpec.Builder defaultValue(String defaultValue)
          Set the default value of the UserPrefSpec under construction and return this Builder to allow further construction to be done.
 UserPrefSpec.Builder displayName(String displayName)
          Set the display name of the UserPrefSpec under construction and return this Builder to allow further construction to be done.
 UserPrefSpec.Builder enumValues(Map<String,String> enumValues)
          Set the Map of the possible values for an enumerated UserPrefSpec under construction and return this Builder to allow further construction to be done.
 UserPrefSpec.Builder required(boolean required)
          Set the setting of the UserPrefSpec under construction whether it is required or not and return this Builder to allow further construction to be done.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

displayName

public UserPrefSpec.Builder displayName(String displayName)
Set the display name of the UserPrefSpec under construction and return this Builder to allow further construction to be done.

Parameters:
displayName - name to show the user for this UserPrefSpec
Returns:
this builder to allow for further construction

required

public UserPrefSpec.Builder required(boolean required)
Set the setting of the UserPrefSpec under construction whether it is required or not and return this Builder to allow further construction to be done.

Parameters:
required - the setting of this UserPrefSpec whether it is required or not
Returns:
this builder to allow for further construction

dataType

public UserPrefSpec.Builder dataType(DataType dataType)
Set the DataType of the UserPrefSpec under construction and return this Builder to allow further construction to be done.

Parameters:
dataType - the DataType of this pref
Returns:
this builder to allow for further construction

enumValues

public UserPrefSpec.Builder enumValues(Map<String,String> enumValues)
Set the Map of the possible values for an enumerated UserPrefSpec under construction and return this Builder to allow further construction to be done.

Parameters:
enumValues - the possible values for an enumerated pref
Returns:
this builder to allow for further construction

defaultValue

public UserPrefSpec.Builder defaultValue(String defaultValue)
Set the default value of the UserPrefSpec under construction and return this Builder to allow further construction to be done.

Parameters:
defaultValue - the pref's default value
Returns:
this builder to allow for further construction

build

public UserPrefSpec build()
Returns the final constructed UserPrefSpec

Returns:
the UserPrefSpec


Copyright © 2010 Atlassian. All Rights Reserved.