standup.clouds
Class ProfileCloudFrontend

java.lang.Object
  extended by standup.profiling.Profile
      extended by standup.clouds.ProfileCloudFrontend
All Implemented Interfaces:
XMLizable, XMLsaveable

public class ProfileCloudFrontend
extends Profile

This class stores all user parameters relating to the frontend. Care must be taken to coordinate the loading and saving of this with a UserBackendProfile!

Author:
Ruli Manurung

Field Summary
(package private)  ShapeDetails shapeDetailsCloud
          Constructor method where the Options is supplied from an appropriate file.
(package private)  ShapeDetails shapeDetailsHoose
           
(package private)  ShapeDetails shapeDetailsMsgWHead
           
(package private)  ShapeDetails shapeDetailsMsgWOHead
           
static String XMLTAG
           
 
Constructor Summary
ProfileCloudFrontend()
           
ProfileCloudFrontend(Element element)
           
ProfileCloudFrontend(File profileFile)
           
ProfileCloudFrontend(Options options)
           
ProfileCloudFrontend(URL profileURL)
           
 
Method Summary
 OptionsCloudFrontend createDefaultOptions()
          Returns an appropriate instance of Options with default values, i.e.
 OptionsCloudFrontend getOptions()
          Returns the Options contained within this Profile.
 ShapeDetails getShapeDetailsHouse()
           
 ShapeDetails getShapeDetailsLaffertyBubble()
           
 ShapeDetails getShapeDetailsLubble()
           
 ShapeDetails getShapeDetailsMessageWindowBubbleWithHead()
           
 ShapeDetails getShapeDetailsMessageWindowBubbleWithoutHead()
           
 ShapeDetails getShapeDetailsToolbarBubble()
           
 OptionsCloudFrontend loadOptions(Element element)
          Returns an appropriate instance of Options whose values are taken from the given XML Element.
 void quickSave(File file)
          Saves this Profile but not any associated files along with it.
 void save(File file)
          This method saves the necessary information contained within an instance to an XML file.
 boolean setOptions(Options incomingOptions)
          Makes the given Options the one used within this Profile.
 void writeXML(Writer out, String indent)
          This method writes the necessary information contained within an instance to an XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLTAG

public static final String XMLTAG
See Also:
Constant Field Values

shapeDetailsCloud

ShapeDetails shapeDetailsCloud
Constructor method where the Options is supplied from an appropriate file.


shapeDetailsHoose

ShapeDetails shapeDetailsHoose

shapeDetailsMsgWHead

ShapeDetails shapeDetailsMsgWHead

shapeDetailsMsgWOHead

ShapeDetails shapeDetailsMsgWOHead
Constructor Detail

ProfileCloudFrontend

public ProfileCloudFrontend()
                     throws ProfileException
Throws:
ProfileException

ProfileCloudFrontend

public ProfileCloudFrontend(Element element)

ProfileCloudFrontend

public ProfileCloudFrontend(File profileFile)

ProfileCloudFrontend

public ProfileCloudFrontend(Options options)

ProfileCloudFrontend

public ProfileCloudFrontend(URL profileURL)
Method Detail

getOptions

public OptionsCloudFrontend getOptions()
Description copied from class: Profile
Returns the Options contained within this Profile. It might be useful to override this method to return the options cast as the appropriate specific Options subclass.

Overrides:
getOptions in class Profile
Returns:

setOptions

public boolean setOptions(Options incomingOptions)
Description copied from class: Profile
Makes the given Options the one used within this Profile. Always returns true. Override this method to do validation that the given Options is indeed appropriate for the particular subclass of Profile.

Overrides:
setOptions in class Profile
Returns:

writeXML

public void writeXML(Writer out,
                     String indent)
              throws IOException,
                     XMLException
Description copied from interface: XMLizable
This method writes the necessary information contained within an instance to an XML file.

Parameters:
out - The output stream for the XML file, which is assumed to be already opened and writable.
indent - A string to be prepended before every line written by this method. If passed appropriate white space, e.g. XMLUtils.xmlIndent, it can be used to control indentation.
Throws:
IOException
XMLException

quickSave

public void quickSave(File file)
               throws XMLException
Description copied from class: Profile
Saves this Profile but not any associated files along with it. This is for profiles which may depend on other files aside from the XML file created by ProfileManager. For example, the joke generation backend ProfileJokeGeneration contains pointers to XML files that contain the custom lexicon, topic database, etc. If a Profile doesn't have any such files, this method behaves the same as XMLsaveable.save(File).

Specified by:
quickSave in class Profile
Parameters:
file - the file to which this Profile should be saved.
Throws:
XMLException

save

public void save(File file)
          throws XMLException
Description copied from interface: XMLsaveable
This method saves the necessary information contained within an instance to an XML file. It should:

Parameters:
file - The file to be saved.
Throws:
XMLException

createDefaultOptions

public OptionsCloudFrontend createDefaultOptions()
                                          throws ProfileException
Description copied from class: Profile
Returns an appropriate instance of Options with default values, i.e. those contained with the default options package (see ProfileManager.getDefaultOptionsPackage()).

Specified by:
createDefaultOptions in class Profile
Returns:
Throws:
ProfileException

loadOptions

public OptionsCloudFrontend loadOptions(Element element)
Description copied from class: Profile
Returns an appropriate instance of Options whose values are taken from the given XML Element.

Specified by:
loadOptions in class Profile
Returns:

getShapeDetailsLubble

public ShapeDetails getShapeDetailsLubble()

getShapeDetailsHouse

public ShapeDetails getShapeDetailsHouse()

getShapeDetailsToolbarBubble

public ShapeDetails getShapeDetailsToolbarBubble()

getShapeDetailsLaffertyBubble

public ShapeDetails getShapeDetailsLaffertyBubble()

getShapeDetailsMessageWindowBubbleWithHead

public ShapeDetails getShapeDetailsMessageWindowBubbleWithHead()

getShapeDetailsMessageWindowBubbleWithoutHead

public ShapeDetails getShapeDetailsMessageWindowBubbleWithoutHead()