com.ge.research.acuity.ui
Class PresentationObject

java.lang.Object
  extended bycom.ge.research.acuity.ui.PresentationObject
Direct Known Subclasses:
CellDecorator, CellFontDecorator, Dataseries, HighlightRegionColumnInfo, IndependentDisplayPO, TableColumnInfo

public abstract class PresentationObject
extends java.lang.Object

An abstract class which represents a PresentationObject in an ontology. This class holds information to uniquely identify a presentation object within a client application, and be able to find, update, and relate information about this presentation object with that of the presentation object in the ontology.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:24 $
Author:
garbiras

Constructor Summary
PresentationObject()
          Default constructor.
 
Method Summary
 void addLookupInfo(java.lang.String parameter, ParameterLookupInfo info)
          Adds parameter lookup information (subject lookup) for the parameter.
 java.lang.String getHasPresentationNature()
          Returns the presentation nature of this presentation object.
 java.lang.String getIdentifier()
          Returns the identification string for the presentation object.
 java.util.Map getLookupInfo()
          Returns the map of ParameterLookupInfo ids to the ParameterLookupInfo objects; The ParameterLookupInfo ids are the subjects for the parameters of the presentation object.
 java.lang.String getSubject(java.lang.String parameter)
          Looks up the subject information for the parameter.
 boolean hasSubject(java.lang.String subj)
          Checks to see if subj is a subject of a parameter of this presentation object.
 boolean isDisplayed()
          Returns the state of the isDisplayed flag.
 boolean isEditable(java.lang.String parameter)
          Returns whether or not the parameter value is able to be edited by a user of the client application.
 void setEditability(java.lang.String parameter, boolean value)
          Sets whether or not the parameter's value is able to be edited by a user of the client application
 void setHasPresentationNature(java.lang.String string)
          Checks that the new value for presentation nature is a valid presentation nature type.
 void setIdentifier(java.lang.String string)
          Sets the identification string for the presentation object.
 void setIsDisplayed(boolean b)
          Sets the state of the isDisplayed flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresentationObject

public PresentationObject()
Default constructor. Sets the identifier to the hashCode value of the newly created object.

See Also:
Object.hashCode(), setIdentifier(java.lang.String)
Method Detail

addLookupInfo

public final void addLookupInfo(java.lang.String parameter,
                                ParameterLookupInfo info)
Adds parameter lookup information (subject lookup) for the parameter. If the info object already exists in the lookup information for another parameter, then the info object is not added to the collection of parameter lookup information. Regardless of whether the info object was found to already exist in the lookup collection, the subject map is updated with information relating the parameter to the parameter lookup info.

Parameters:
parameter - the presentation object parameter/attribute to add subject lookup information for
info - the parameter lookup object to be used for subject lookup for the parameter
See Also:
ParameterLookupInfo.isSameAs(com.ge.research.acuity.ui.helpers.ParameterLookupInfo)

getHasPresentationNature

public final java.lang.String getHasPresentationNature()
Returns the presentation nature of this presentation object. The presentation nature is a defining characteristic within the ontology that defines the type of presentation object this is, and the attributes, styles, and behaviors it can have.

Returns:
The presentation nature of this presentation object

getIdentifier

public final java.lang.String getIdentifier()
Returns the identification string for the presentation object.

Returns:
The identifier string for this presentation object

getSubject

public final java.lang.String getSubject(java.lang.String parameter)
Looks up the subject information for the parameter. The subject is used in communication with the ontology in order to extract and update information about this parameter for its presentation object within the ontology.

Parameters:
parameter - the parameter/attribute of this presentation object for which to find its subject
Returns:
The subject of the parameter

getLookupInfo

public final java.util.Map getLookupInfo()
Returns the map of ParameterLookupInfo ids to the ParameterLookupInfo objects; The ParameterLookupInfo ids are the subjects for the parameters of the presentation object.

Returns:
The map of ParameterLookupInfo ids to the ParameterLookupInfo objects

hasSubject

public boolean hasSubject(java.lang.String subj)
Checks to see if subj is a subject of a parameter of this presentation object.

Parameters:
subj - the subject to lookup in the set of subject information kept for all the parameters of the presentation object
Returns:
true if the subj is a subject identifier for a parameter of this presentation object; false otherwise.

isDisplayed

public final boolean isDisplayed()
Returns the state of the isDisplayed flag.

Returns:
true if this presentation object should be rendered by a client application; false if this presentation object should not be made visible in a client application.

isEditable

public final boolean isEditable(java.lang.String parameter)
Returns whether or not the parameter value is able to be edited by a user of the client application. If the parameter editability was never explicitly set, then returns the default value of parameter editability as defined by AcuityConstants.DEFAULT_PARAMETER_EDITABILITY

Returns:
true if the parameter value is editable by a user of the client application; false otherwise
See Also:
AcuityConstants.DEFAULT_PARAMETER_EDITABILITY

setEditability

public final void setEditability(java.lang.String parameter,
                                 boolean value)
Sets whether or not the parameter's value is able to be edited by a user of the client application

Parameters:
value - true if the parameter value should be editable by a user of the client application; false if the parameter value should not be editable by a user of the client application.

setHasPresentationNature

public void setHasPresentationNature(java.lang.String string)
Checks that the new value for presentation nature is a valid presentation nature type. If not, the value of presentation nature does not change.

Parameters:
string - the new value of presentation nature
See Also:
PresentationNatureConstants.isPresentationNature(java.lang.String)

setIdentifier

public void setIdentifier(java.lang.String string)
Sets the identification string for the presentation object. If string is null or empty, than the identifier does not get changed.

Parameters:
string - the identifier string to use for this presentation object

setIsDisplayed

public void setIsDisplayed(boolean b)
Sets the state of the isDisplayed flag.

Parameters:
b - true if this presentation object should be rendered by a client application; false if this presentation object should not be made visible in a client application.