SnapContentMediaInteractivateApplet Class Reference
[Content Modules]

Content module for Interactivate Applets. More...

Inheritance diagram for SnapContentMediaInteractivateApplet:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 checkMedia ()
 Checks to make sure jarfile exists and is readable.
 getAppClass ()
 Gets applet class of applet.
 getHeight ()
 Gets height of applet.
 getJarName ()
 Gets original name of jarfile.
 getJarPath ()
 Gets path on server to jarfile.
 getJarURL ()
 Gets URL of jarfile.
 getSize ()
 INSERT BRIEF DESCRIPTION HERE.
 getWidth ()
 Gets width of applet.
 setAppClass ($oldCM, $appclass)
 Sets the applet class.
 setHeight ($oldCM, $height)
 Sets the applet height.
 setWidth ($oldCM, $width)
 Sets the applet width.
 updateFileList ()
 Updates entry in external file database for jarfile.
 uploadApplet ($tmpFile, $fileName, $appclass, $width, $height)
 Uploads applet jarfile into content module.

Protected Member Functions

 doCopy ()
 INSERT BRIEF DESCRIPTION HERE.
 doDelete ()
 INSERT BRIEF DESCRIPTION HERE.
 doGetHTML ($params)
 INSERT BRIEF DESCRIPTION HERE.
 validate ()
 INSERT BRIEF DESCRIPTION HERE.

Private Member Functions

 copyFrom ($oldCM)
 Called when building a new version from an existing version.

Private Attributes

 $hasUploaded
 Begins false. Set to true when the old info has been copied from an old CM.


Detailed Description

Content module for Interactivate Applets.

Each content module stores information about an applet. There is one external file, which is the jarfile for the applet. The module also stores the width and height of the applet, as well as the name of the class that is the main class of the applet. No other information is stored because the jarfile contains parameters and the like. Additionally, this module handles generating the correct JavaScript and HTML to work with switcher.js, which is embedded in Snap2.

When generating HTML for an applet, you can use the following extra parameters:

Definition at line 18 of file SnapContentMediaInteractivateApplet.php5.


Member Function Documentation

SnapContentMediaInteractivateApplet::checkMedia (  ) 

Checks to make sure jarfile exists and is readable.

Returns:
[boolean]: whether jarfile exists and is readable

Reimplemented from SnapContent.

Definition at line 439 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::copyFrom ( oldCM  )  [private]

Called when building a new version from an existing version.

Whenever we call a function other than uploadApplet(), we have to copy over any old stuff from an existing content module, and that's what this method does. It only does the copy once, so that we don't have dangling jarfiles and the like.

Parameters:
$oldCM [SnapContentMediaInteractivateApplet]: old content module to copy from
Returns:
[boolean]: success or failure

Definition at line 260 of file SnapContentMediaInteractivateApplet.php5.

References SObject::getError(), and SObject::setError().

Referenced by setAppClass(), setHeight(), and setWidth().

SnapContentMediaInteractivateApplet::doCopy (  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 49 of file SnapContentMediaInteractivateApplet.php5.

References SObject::getError(), and SObject::setError().

SnapContentMediaInteractivateApplet::doDelete (  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 32 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::doGetHTML ( params  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$params [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 93 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::getAppClass (  ) 

Gets applet class of applet.

Returns:
[integer]: applet class of applet, or false if invalid content module

Definition at line 373 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::getHeight (  ) 

Gets height of applet.

Returns:
[integer]: height of applet, or false if invalid content module

Definition at line 362 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::getJarName (  ) 

Gets original name of jarfile.

You should never need to call this method since the name of the jarfile may not be correct or worthwhile (it is whatever the user had it called on their machine).

Returns:
[string]: original name of jarfile

Definition at line 413 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::getJarPath (  ) 

Gets path on server to jarfile.

You should never need to call this method.

Returns:
[string]: path to jarfile on server

Definition at line 398 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::getJarURL (  ) 

Gets URL of jarfile.

Returns:
[string]: URL to jarfile of applet, or false if invalid content module

Definition at line 384 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::getSize (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 428 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::getWidth (  ) 

Gets width of applet.

Returns:
[integer]: width of applet, or false if invalid content module

Definition at line 351 of file SnapContentMediaInteractivateApplet.php5.

References validate().

SnapContentMediaInteractivateApplet::setAppClass ( oldCM,
appclass 
)

Sets the applet class.

This method should only be called on a content module that's being used for a version that is being copied from an existing version.

Parameters:
$oldCM [SnapContentMediaInteractivateApplet]: content module to copy additional data from
$appclass [string]: name of applet main class (e.g., Histogram.class)
Returns:
[boolean]: success or failure

Definition at line 292 of file SnapContentMediaInteractivateApplet.php5.

References copyFrom(), and SObject::setError().

SnapContentMediaInteractivateApplet::setHeight ( oldCM,
height 
)

Sets the applet height.

This method should only be called on a content module that's being used for a version that is being copied from an existing version.

Parameters:
$oldCM [SnapContentMediaInteractivateApplet]: content module to copy additional data from
$height [integer]: height of applet
Returns:
[boolean]: success or failure

Definition at line 336 of file SnapContentMediaInteractivateApplet.php5.

References copyFrom(), and SObject::setError().

SnapContentMediaInteractivateApplet::setWidth ( oldCM,
width 
)

Sets the applet width.

This method should only be called on a content module that's being used for a version that is being copied from an existing version.

Parameters:
$oldCM [SnapContentMediaInteractivateApplet]: content module to copy additional data from
$width [integer]: width of applet
Returns:
[boolean]: success or failure

Definition at line 314 of file SnapContentMediaInteractivateApplet.php5.

References copyFrom(), and SObject::setError().

SnapContentMediaInteractivateApplet::updateFileList (  ) 

Updates entry in external file database for jarfile.

Returns:
[boolean]: success or failure

Reimplemented from SnapContent.

Definition at line 456 of file SnapContentMediaInteractivateApplet.php5.

References SnapDBI::cancelTransaction(), SnapDBI::commitTransaction(), SnapDBI::startTransaction(), and validate().

SnapContentMediaInteractivateApplet::uploadApplet ( tmpFile,
fileName,
appclass,
width,
height 
)

Uploads applet jarfile into content module.

This method is straightforward and simply fills the content module with a jarfile and a few bits of information needed to embed the applet, such as the width and height. There are no optional parameters, or additional configuration options.

Parameters:
$tmpFile [string]: path to jarfile on server
$fileName [string]: original name of jarfile (e.g., histogram.jar)
$appclass [string]: name of class file that is the main class for the applet (e.g., 'Histogram.class')
$width [integer]: width of applet in pixels
$height [integer]: height of applet in pixels
Returns:
[boolean]: success or failure

Definition at line 216 of file SnapContentMediaInteractivateApplet.php5.

References SnapContent::create(), SObject::getError(), and SObject::setError().

SnapContentMediaInteractivateApplet::validate (  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 76 of file SnapContentMediaInteractivateApplet.php5.

References SnapContent::getAll().

Referenced by checkMedia(), doDelete(), doGetHTML(), getAppClass(), getHeight(), getJarName(), getJarPath(), getJarURL(), getSize(), getWidth(), and updateFileList().


Member Data Documentation

SnapContentMediaInteractivateApplet::$hasUploaded [private]

Begins false. Set to true when the old info has been copied from an old CM.

For internal use only.

Definition at line 23 of file SnapContentMediaInteractivateApplet.php5.


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:06:24 2010 for Common by  doxygen 1.5.6