
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. | |
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.
| SnapContentMediaInteractivateApplet::checkMedia | ( | ) |
Checks to make sure 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.
| $oldCM | [SnapContentMediaInteractivateApplet]: old content module to copy from |
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
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
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
| $params | [TYPE]: DESCRIPTION |
Reimplemented from SnapContent.
Definition at line 93 of file SnapContentMediaInteractivateApplet.php5.
References validate().
| SnapContentMediaInteractivateApplet::getAppClass | ( | ) |
Gets applet class of applet.
Definition at line 373 of file SnapContentMediaInteractivateApplet.php5.
References validate().
| SnapContentMediaInteractivateApplet::getHeight | ( | ) |
Gets height of applet.
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).
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.
Definition at line 398 of file SnapContentMediaInteractivateApplet.php5.
References validate().
| SnapContentMediaInteractivateApplet::getJarURL | ( | ) |
Gets URL of jarfile.
Definition at line 384 of file SnapContentMediaInteractivateApplet.php5.
References validate().
| SnapContentMediaInteractivateApplet::getSize | ( | ) |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
Definition at line 428 of file SnapContentMediaInteractivateApplet.php5.
References validate().
| SnapContentMediaInteractivateApplet::getWidth | ( | ) |
Gets width of applet.
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.
| $oldCM | [SnapContentMediaInteractivateApplet]: content module to copy additional data from | |
| $appclass | [string]: name of applet main class (e.g., Histogram.class) |
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.
| $oldCM | [SnapContentMediaInteractivateApplet]: content module to copy additional data from | |
| $height | [integer]: height of applet |
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.
| $oldCM | [SnapContentMediaInteractivateApplet]: content module to copy additional data from | |
| $width | [integer]: width of applet |
Definition at line 314 of file SnapContentMediaInteractivateApplet.php5.
References copyFrom(), and SObject::setError().
| SnapContentMediaInteractivateApplet::updateFileList | ( | ) |
Updates entry in external file database for jarfile.
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.
| $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 |
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
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().
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.
1.5.6