Package edu.mit.simile.butterfly
Class ScriptableButterfly
java.lang.Object
org.mozilla.javascript.ScriptableObject
edu.mit.simile.butterfly.ButterflyScriptableObject
edu.mit.simile.butterfly.ScriptableButterfly
- All Implemented Interfaces:
Serializable,org.mozilla.javascript.ConstProperties,org.mozilla.javascript.debug.DebuggableObject,org.mozilla.javascript.Scriptable,org.mozilla.javascript.SymbolScriptable
This class represents the "butterfly" javascript object that
is made available to the javascript controllers and allows
the controller to interact with butterfly and invoke
its operations.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.ScriptableObject.KeyComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.slf4j.Loggerprotected static org.slf4j.LoggerFields inherited from class edu.mit.simile.butterfly.ButterflyScriptableObject
_module, _propertiesFields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic StringgetName()jsFunction_getContextPath(Object request, boolean absolute)jsFunction_getProperty(String key, String defaultValue)jsFunction_getString(Object request)voidjsFunction_log(String message)jsFunction_makePath(String pathInfo, Object levels)voidjsFunction_redirect(Object request, Object response, String location)voidvoidjsFunction_sendBinary(Object request, Object response, String file, String mimeType)voidjsFunction_sendError(Object request, Object response, int code, String str)voidjsFunction_sendString(Object request, Object response, String str, String encoding, String mimeType)voidjsFunction_sendText(Object request, Object response, String file, String encoding, String mimeType, boolean absolute)voidjsFunction_sendTextFromTemplate(Object request, Object response, Object context, String template, String encoding, String mimeType, boolean absolute)voidjsFunction_sendWrappedText(Object request, Object response, String file, String encoding, String mimeType, String prologue, String epilogue, boolean absolute)voidjsFunction_sendXHtmlDocument(Object request, Object response, Object document, String encoding, String mimeType, boolean absolute)voidjsFunction_sendXmlDocument(Object request, Object response, Object document, String encoding, String mimeType, boolean absolute)static org.apache.velocity.VelocityContextjsToVelocity(Object o)Methods inherited from class edu.mit.simile.butterfly.ButterflyScriptableObject
destroy, init, unwrap, wrapMethods inherited from class org.mozilla.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
Field Details
-
_logger
protected static final org.slf4j.Logger _logger -
_jsLogger
protected static final org.slf4j.Logger _jsLogger
-
-
Constructor Details
-
ScriptableButterfly
public ScriptableButterfly()
-
-
Method Details
-
getName
-
getClassName
- Specified by:
getClassNamein interfaceorg.mozilla.javascript.Scriptable- Specified by:
getClassNamein classButterflyScriptableObject
-
didRespond
public boolean didRespond() -
jsFunction_redirect
- Throws:
Exception
-
jsFunction_sendBinary
public void jsFunction_sendBinary(Object request, Object response, String file, String mimeType) throws Exception- Throws:
Exception
-
jsFunction_sendText
public void jsFunction_sendText(Object request, Object response, String file, String encoding, String mimeType, boolean absolute) throws Exception- Throws:
Exception
-
jsFunction_sendWrappedText
public void jsFunction_sendWrappedText(Object request, Object response, String file, String encoding, String mimeType, String prologue, String epilogue, boolean absolute) throws Exception- Throws:
Exception
-
jsFunction_sendTextFromTemplate
public void jsFunction_sendTextFromTemplate(Object request, Object response, Object context, String template, String encoding, String mimeType, boolean absolute) throws Exception- Throws:
Exception
-
jsFunction_sendXmlDocument
public void jsFunction_sendXmlDocument(Object request, Object response, Object document, String encoding, String mimeType, boolean absolute) throws Exception- Throws:
Exception
-
jsFunction_sendXHtmlDocument
public void jsFunction_sendXHtmlDocument(Object request, Object response, Object document, String encoding, String mimeType, boolean absolute) throws Exception- Throws:
Exception
-
jsFunction_log
-
jsFunction_makePath
- Throws:
Exception
-
jsFunction_responded
public void jsFunction_responded() -
jsFunction_sendString
public void jsFunction_sendString(Object request, Object response, String str, String encoding, String mimeType) throws Exception- Throws:
Exception
-
jsFunction_sendError
public void jsFunction_sendError(Object request, Object response, int code, String str) throws Exception- Throws:
Exception
-
jsFunction_getString
- Throws:
Exception
-
jsFunction_getMountPoint
- Throws:
Exception
-
jsFunction_getMounter
- Throws:
Exception
-
jsFunction_getProperty
- Throws:
Exception
-
jsFunction_getContextPath
- Throws:
Exception
-
jsToMap
-
jsToVelocity
-