com.bowstreet.profiles
Class ProfileValue

java.lang.Object
  extended by com.bowstreet.profiles.NamedObject
      extended by com.bowstreet.profiles.ProfileValue
All Implemented Interfaces:
IProfileDefines, com.bowstreet.profiles.IXmlDataAccess, java.io.Serializable

public class ProfileValue
extends NamedObject
implements IProfileDefines, java.io.Serializable

Class that represents a single Value from within a Profile.

See Also:
Profile, Serialized Form

Field Summary
 
Fields inherited from interface com.bowstreet.profiles.IProfileDefines
CURRENT_CUSTOM_VALUE_PSET, CUSTOM_VALUE_MAP_KEY, DEFAULT, DESCRIPTION, EDIT_STATUS, EDITABLE, EFFECTS_CHILD, emptyIterator, ENTRIES, ENTRY, EXTRA_DATA, FALSE, FINAL_LOCKED, FINAL_LOCKED_STR, INHERITED_FROM, INHERITED_LOCKED, INHERITED_LOCKED_STR, IS_CONTAINER, IS_FINAL, IS_INHERITED, IS_RUNTIME, LAST_MODIFIED, LAST_MODIFIED_BY, MODEL, MODELS, NAME, PARENT, PC_ALREADY_CONVERTED, PC_INVALID_DATA, PC_NO_PROFILE, PC_OK, PROFILE, PROFILE_ATTR, PROFILE_DEF, PROFILE_SET, PROFILE_SET_MAP_PREVIEW_KEY, PROFILED, PROFILES, PROMPT, ROLE, ROLE_SELECTION_CLASS, ROLES, TRUE, TYPE, UI, USE_FULL_NAMES, VALUE, VALUE_CLASS, VALUES
 
Constructor Summary
ProfileValue()
          Creates an empty ProfileValue with its name and data value set to null.
ProfileValue(IXml tdValue)
          Creates a ProfileValue with its data members set from the specified IXml.
ProfileValue(java.lang.String strName, java.lang.String data)
          Creates a ProfileValue with its name and data value set from the specified inputs.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare two ProfileValue objects.
 IXml getAsIXml(boolean getAll)
          Gets the entire ProfileValue as IXml.
 java.lang.String getData()
          Gets the data value associated with this ProfileValue object.
 int getEditable()
          This is used by the customizer UI know that this value was created from a final value and can not me modified by the user.
 boolean getEffectsChild()
          This is used by the customizer UI know that this value effects a child value.
 boolean getFinal()
          Specifies if this ProfileValue can be changes in sub-profiles.
 boolean getInherited()
          Gets if this value has been calculated through an inherited profile value.
 java.lang.String getInheritedFrom()
          Gets the name of the parent if this value has been calculated through an inherited profile value.
 java.lang.String getUIData()
          Gets the UI data value associated with this ProfileValue object.
 boolean isRuntime()
          Gets if the entry for this value was specified as runtime data.
 void setData(java.lang.String value)
          Sets the data value associated with this ProfileValue object.
 void setEditable(int editable)
          This is used by the customizer UI know that this value was created from a final value and can not me modified by the user.
 void setEffectsChild(boolean effectsChild)
          This is used by the customizer UI know that this value effects a child value.
 void setFinal(boolean isFinal)
          Sets if this ProfileValue can be changes in sub-profiles.
 void setFromIXml(IXml tdValue)
          Sets the entire ProfileValue from a IXml.
 void setInherited(boolean isInherited)
          Sets if this value has been calculated through an inherited profile value.
 void setInheritedFrom(java.lang.String strInheritedFrom)
          Sets the name of the parent if this value has been calculated through an inherited profile value.
 void setIsRuntime(boolean isRuntime)
          Sets if the entry for this value was specified as runtime data.
 void setUIData(java.lang.String value)
          Sets the UI data value associated with this ProfileValue object.
 void update(com.bowstreet.profiles.IXmlDataAccess item)
          Updates from an existing ProfileValue.
 
Methods inherited from class com.bowstreet.profiles.NamedObject
clone, getName, setName
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileValue

public ProfileValue()
Creates an empty ProfileValue with its name and data value set to null.


ProfileValue

public ProfileValue(IXml tdValue)
             throws ProfileException
Creates a ProfileValue with its data members set from the specified IXml.

Parameters:
tdValue - The IXml to set data members from.
Throws:
ProfileException
See Also:
IXml
Example:
The IXml XML should be in the following format:
   <Value name="Foo">Bar</Value>

ProfileValue

public ProfileValue(java.lang.String strName,
                    java.lang.String data)
Creates a ProfileValue with its name and data value set from the specified inputs.

Parameters:
strName - The name of this Profile Value.
data - The data for this Profile Value.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare two ProfileValue objects. Just compares the actual value

Overrides:
equals in class NamedObject
Parameters:
obj - The ProfileValue.
Returns:
true if ProfileValue is equal, else false

getAsIXml

public IXml getAsIXml(boolean getAll)
               throws ProfileException
Gets the entire ProfileValue as IXml. The entire ProfileValue will be represented as one block of XML(IXml).

Specified by:
getAsIXml in interface com.bowstreet.profiles.IXmlDataAccess
Parameters:
getAll - true to get all of the calculated inherited data, else false.
Returns:
The XML data representation of this ProfileValue.
Throws:
ProfileException
See Also:
IXml
Example:
The IXml XML results will be in the following format:
   <Value name="Foo">Bar</Value>

getData

public java.lang.String getData()
Gets the data value associated with this ProfileValue object.

Returns:
The data as a String.

getEditable

public int getEditable()
This is used by the customizer UI know that this value was created from a final value and can not me modified by the user.

Returns:
can be one of the following EDITABLE, FINAL_LOCKED or INHERITED_LOCKED.

getEffectsChild

public boolean getEffectsChild()
This is used by the customizer UI know that this value effects a child value. This is calculated during the calculate inherited values process.

Returns:
true if this value effects a child value, else false.

getFinal

public boolean getFinal()
Specifies if this ProfileValue can be changes in sub-profiles. The default is false.

Returns:
true if this ProfileValue can't be changes in sub-profiles, else false.

getInherited

public boolean getInherited()
Gets if this value has been calculated through an inherited profile value. The default is false.

Returns:
true if this value has been calculated through an inherited profile, else false.

getInheritedFrom

public java.lang.String getInheritedFrom()
Gets the name of the parent if this value has been calculated through an inherited profile value.

Returns:
The name or null if the value is not inherited.

getUIData

public java.lang.String getUIData()
Gets the UI data value associated with this ProfileValue object.

Returns:
The data as an Object.

isRuntime

public boolean isRuntime()
Gets if the entry for this value was specified as runtime data.

Returns:
true if the entry for this value was specified as runtime data, else false.

setData

public void setData(java.lang.String value)
Sets the data value associated with this ProfileValue object.

Parameters:
value - The data as an Object. If this in not a TaggeData object the object's toString() method will be called and stored as Text.

setEditable

public void setEditable(int editable)
This is used by the customizer UI know that this value was created from a final value and can not me modified by the user.

Parameters:
editable - Can be one of the following EDITABLE, FINAL_LOCKED or INHERITED_LOCKED.

setEffectsChild

public void setEffectsChild(boolean effectsChild)
This is used by the customizer UI know that this value effects a child value. This is calculated during the calculate inherited values process.

Parameters:
effectsChild - true if this value effects a child value, else false.

setFinal

public void setFinal(boolean isFinal)
Sets if this ProfileValue can be changes in sub-profiles. The default is false.

Parameters:
isFinal - true if this ProfileValue can't be changes in sub-profiles, else false.

setFromIXml

public void setFromIXml(IXml tdValue)
                 throws ProfileException
Sets the entire ProfileValue from a IXml. The entire ProfileValue will be overwritten with the XML(IXml) data.

Specified by:
setFromIXml in interface com.bowstreet.profiles.IXmlDataAccess
Parameters:
tdValue - The IXml representation of a ProfileValue.
Throws:
ProfileException
See Also:
IXml
Example:
The IXml XML should be in the following format:
   <Value name="Foo">Bar</Value>

setInherited

public void setInherited(boolean isInherited)
Sets if this value has been calculated through an inherited profile value. The default is false.

Parameters:
isInherited - true to specify this value has been calculated through an inherited profile value, else false.

setInheritedFrom

public void setInheritedFrom(java.lang.String strInheritedFrom)
Sets the name of the parent if this value has been calculated through an inherited profile value.

Parameters:
strInheritedFrom - the name of the profile which the value was inherited from.

setIsRuntime

public void setIsRuntime(boolean isRuntime)
Sets if the entry for this value was specified as runtime data.

Parameters:
isRuntime - true if the entry for this value was specified as runtime data, else false.

setUIData

public void setUIData(java.lang.String value)
Sets the UI data value associated with this ProfileValue object.

Parameters:
value - The data as an Object.

update

public void update(com.bowstreet.profiles.IXmlDataAccess item)
Updates from an existing ProfileValue.

Specified by:
update in interface com.bowstreet.profiles.IXmlDataAccess
Overrides:
update in class NamedObject
Parameters:
item - The IXmlDataAccess, which must be a ProfileValue.


Copyright © 2009 IBM. All Rights Reserved.