T
- the return typeX
- the type of the Argumentpublic abstract class OutputExtensionArgument<T,X> extends AddOnModule implements OutputExtensionModel<T,X>
Constructor and Description |
---|
OutputExtensionArgument(Context context,
String id,
String pluginId)
creates a new outputExtension with a new id
|
OutputExtensionArgument(String id,
Context context)
creates a new outputExtension with a new id
|
Modifier and Type | Method and Description |
---|---|
void |
addResourceIdToWishList(String id)
adds id of resource to the wish list
|
boolean |
canRun(EventModel event)
Checks if the outputExtension can execute with the current event
|
abstract T |
generate(EventModel event,
X x)
generates the data for the given Event
|
com.google.common.reflect.TypeToken<X> |
getArgumentType()
returns the Type of the Argument or null if none
|
String |
getPluginId()
gets the id of the output-plugin the outputExtension belongs to
|
List<String> |
getResourceIdWishList()
returns its resourceIdWishList
|
com.google.common.reflect.TypeToken<T> |
getReturnType()
returns the ReturnType of the generic
|
void |
removeResourceIdFromWishList(String id)
removes resourceId from the resourceIdWishList
|
void |
setPluginId(String pluginId)
sets the ID of the OutputPlugin the OutputExtension belongs to
|
getContext, getID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getID, isOwner
debug, debug, error, error, fatal, fatal, warn, warn
exceptionThrown
public OutputExtensionArgument(Context context, String id, String pluginId)
context
- the context of the addonid
- the id to be set to the id of outputExtensionpluginId
- the id of the plugin to associate topublic OutputExtensionArgument(String id, Context context)
id
- the id to be set to the id of outputExtensioncontext
- the context of the addonpublic List<String> getResourceIdWishList()
public void addResourceIdToWishList(String id)
id
- the id of the resource to be added to the wish listpublic void removeResourceIdFromWishList(String id)
id
- the id of the resource to be removedpublic String getPluginId()
getPluginId
in interface OutputExtensionModel<T,X>
public void setPluginId(String pluginId)
pluginId
- the ID of the Pluginpublic com.google.common.reflect.TypeToken<T> getReturnType()
getReturnType
in interface OutputExtensionModel<T,X>
public com.google.common.reflect.TypeToken<X> getArgumentType()
getArgumentType
in interface OutputExtensionModel<T,X>
public boolean canRun(EventModel event)
canRun
in interface OutputExtensionModel<T,X>
event
- the event to check againstpublic abstract T generate(EventModel event, X x)
generate
in interface OutputExtensionModel<T,X>
event
- the event to generate forx
- the optional argumentCopyright © 2016. All rights reserved.