com.atlassian.gadgets.dashboard.internal.impl
Class UserPrefImpl

java.lang.Object
  extended by com.atlassian.gadgets.dashboard.internal.impl.UserPrefImpl
All Implemented Interfaces:
UserPref

public final class UserPrefImpl
extends Object
implements UserPref


Constructor Summary
UserPrefImpl(com.atlassian.gadgets.spec.UserPrefSpec userPrefSpec, String value)
           
 
Method Summary
 boolean equals(Object o)
           
 com.atlassian.gadgets.spec.DataType getDataType()
          Returns the DataType of this pref.
 String getDefaultValue()
          Returns the pref's default value.
 String getDisplayName()
          Returns the display name of this parameter; if not explicitly set by the gadget, returns the name.
 Map<String,String> getEnumValues()
          Returns the possible values for an enumerated pref, or null if the pref is not an enum.
 String getName()
          Returns the pref name.
 String getValue()
          Returns the pref's current value.
 int hashCode()
           
 boolean isRequired()
          Returns true if the pref is required.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserPrefImpl

public UserPrefImpl(com.atlassian.gadgets.spec.UserPrefSpec userPrefSpec,
                    String value)
Method Detail

getName

public String getName()
Description copied from interface: UserPref
Returns the pref name.

Specified by:
getName in interface UserPref
Returns:
the pref name

getDisplayName

public String getDisplayName()
Description copied from interface: UserPref
Returns the display name of this parameter; if not explicitly set by the gadget, returns the name.

Specified by:
getDisplayName in interface UserPref
Returns:
the name to show the user for this pref

isRequired

public boolean isRequired()
Description copied from interface: UserPref
Returns true if the pref is required.

Specified by:
isRequired in interface UserPref
Returns:
true if the pref is required

getDataType

public com.atlassian.gadgets.spec.DataType getDataType()
Description copied from interface: UserPref
Returns the DataType of this pref.

Specified by:
getDataType in interface UserPref
Returns:
this pref's datatype

getEnumValues

public Map<String,String> getEnumValues()
Description copied from interface: UserPref
Returns the possible values for an enumerated pref, or null if the pref is not an enum.

Specified by:
getEnumValues in interface UserPref
Returns:
possible values for the pref

getDefaultValue

public String getDefaultValue()
Description copied from interface: UserPref
Returns the pref's default value.

Specified by:
getDefaultValue in interface UserPref
Returns:
the default value of the pref or an empty string if there is no default value

getValue

public String getValue()
Description copied from interface: UserPref
Returns the pref's current value.

Specified by:
getValue in interface UserPref
Returns:
the current value of the pref

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2012 Atlassian. All Rights Reserved.