Package edu.mit.simile.butterfly
Interface ButterflyModule
-
- All Known Implementing Classes:
ButterflyModuleImpl
public interface ButterflyModuleThis is the interface that defines what Butterfly modules behave and what functionality is made available to them.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddExtendedBy(ButterflyModule extender)voiddestroy()StringgetContextPath(javax.servlet.http.HttpServletRequest request, boolean absolute)Map<String,ButterflyModule>getDependencies()ButterflyModulegetExtendedModule()PrintWritergetFilteringWriter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean absolute)Set<String>getImplementations()ButterflyModulegetModule(String name)ButterflyMountergetMounter()MountPointgetMountPoint()StringgetName()FilegetPath()org.apache.commons.collections.ExtendedPropertiesgetProperties()StringgetRelativePath(javax.servlet.http.HttpServletRequest request)URLgetResource(String name)Set<ButterflyScriptableObject>getScriptables()javax.servlet.ServletConfiggetServletConfig()javax.servlet.ServletContextgetServletContext()StringgetString(javax.servlet.http.HttpServletRequest request)org.apache.velocity.app.VelocityEnginegetTemplateEngine()FilegetTemporaryDir()voidinit(javax.servlet.ServletConfig config)voidinitScope(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable scope)List<ButterflyModuleImpl.Level>makePath(String path, Map<String,String> descs)booleanprocess(String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)booleanredirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String location)booleansendBinary(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String file, String mimeType)booleansendBinary(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String mimeType)booleansendError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int code, String str)booleansendString(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String str, String encoding, String mimeType)booleansendText(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String file, String encoding, String mimeType, boolean absolute)booleansendText(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String encoding, String mimeType, boolean absolute)booleansendTextFromTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.velocity.VelocityContext velocity, String template, String encoding, String mimeType, boolean absolute)booleansendWrappedText(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String encoding, String mimeType, String prologue, String epilogue, boolean absolute)voidsetClassLoader(ClassLoader classLoader)voidsetDependency(String name, ButterflyModule module)voidsetExtended(ButterflyModule extended)voidsetImplementation(String id)voidsetModules(Map<String,ButterflyModule> map)voidsetMounter(ButterflyMounter mounter)voidsetMountPoint(MountPoint mountPoint)voidsetName(String name)voidsetPath(File path)voidsetProperties(org.apache.commons.collections.ExtendedProperties properties)voidsetScript(URL location, org.mozilla.javascript.Script script)voidsetScriptable(ButterflyScriptableObject scriptable)voidsetTemplateEngine(org.apache.velocity.app.VelocityEngine velocity)voidsetTimer(Timer timer)
-
-
-
Method Detail
-
initScope
void initScope(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable scope)
-
setClassLoader
void setClassLoader(ClassLoader classLoader)
-
setMounter
void setMounter(ButterflyMounter mounter)
-
setName
void setName(String name)
-
setPath
void setPath(File path)
-
setMountPoint
void setMountPoint(MountPoint mountPoint)
-
setExtended
void setExtended(ButterflyModule extended)
-
addExtendedBy
void addExtendedBy(ButterflyModule extender)
-
setImplementation
void setImplementation(String id)
-
setDependency
void setDependency(String name, ButterflyModule module)
-
setModules
void setModules(Map<String,ButterflyModule> map)
-
setScript
void setScript(URL location, org.mozilla.javascript.Script script)
-
setScriptable
void setScriptable(ButterflyScriptableObject scriptable)
-
setTemplateEngine
void setTemplateEngine(org.apache.velocity.app.VelocityEngine velocity)
-
setProperties
void setProperties(org.apache.commons.collections.ExtendedProperties properties)
-
setTimer
void setTimer(Timer timer)
-
getServletConfig
javax.servlet.ServletConfig getServletConfig()
-
getServletContext
javax.servlet.ServletContext getServletContext()
-
getName
String getName()
-
getProperties
org.apache.commons.collections.ExtendedProperties getProperties()
-
getPath
File getPath()
-
getMountPoint
MountPoint getMountPoint()
-
getMounter
ButterflyMounter getMounter()
-
getTemporaryDir
File getTemporaryDir()
-
getModule
ButterflyModule getModule(String name)
-
getExtendedModule
ButterflyModule getExtendedModule()
-
getDependencies
Map<String,ButterflyModule> getDependencies()
-
getScriptables
Set<ButterflyScriptableObject> getScriptables()
-
getTemplateEngine
org.apache.velocity.app.VelocityEngine getTemplateEngine()
-
getRelativePath
String getRelativePath(javax.servlet.http.HttpServletRequest request)
-
getFilteringWriter
PrintWriter getFilteringWriter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean absolute) throws IOException
- Throws:
IOException
-
getString
String getString(javax.servlet.http.HttpServletRequest request) throws Exception
- Throws:
Exception
-
getContextPath
String getContextPath(javax.servlet.http.HttpServletRequest request, boolean absolute)
-
process
boolean process(String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
redirect
boolean redirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String location) throws Exception- Throws:
Exception
-
sendBinary
boolean sendBinary(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String file, String mimeType) throws Exception- Throws:
Exception
-
sendBinary
boolean sendBinary(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String mimeType) throws Exception- Throws:
Exception
-
sendText
boolean sendText(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String file, String encoding, String mimeType, boolean absolute) throws Exception- Throws:
Exception
-
sendText
boolean sendText(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String encoding, String mimeType, boolean absolute) throws Exception- Throws:
Exception
-
sendWrappedText
boolean sendWrappedText(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String encoding, String mimeType, String prologue, String epilogue, boolean absolute) throws Exception- Throws:
Exception
-
sendTextFromTemplate
boolean sendTextFromTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.velocity.VelocityContext velocity, String template, String encoding, String mimeType, boolean absolute) throws Exception- Throws:
Exception
-
sendString
boolean sendString(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String str, String encoding, String mimeType) throws Exception- Throws:
Exception
-
sendError
boolean sendError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int code, String str) throws Exception- Throws:
Exception
-
-