com.zion.jbuddy.bots
Class BotTarget

java.lang.Object
  extended by com.zion.jbuddy.bots.BotTarget
All Implemented Interfaces:
BotCall
Direct Known Subclasses:
BotMenu

public class BotTarget
extends Object
implements BotCall

A group of calls executed by the engine in response to an event.

Targets can be triggered directly by commands from users. They can be called from event handlers or other targets. They can also be organized using menus.

See Also:
BotEventHandler, BotMenu

Constructor Summary
BotTarget()
          Creates a target.
 
Method Summary
 Object clone()
          Returns an exact copy of this target.
 BotCallSet getCalls()
          Returns the calls executed by this target.
 String getCommand()
          Returns the command used to trigger this target.
 BotFilterSet getFilters()
          Returns this target's filters.
 String getID()
          Returns this target's identifier.
 BotRouteSet getRoutes()
          Returns this target's routes.
 RichContent getTitle()
          Returns this target's title.
 boolean isDefault()
          Returns true if this is a default target.
 void setCommand(String command)
          Sets the command used to trigger this target.
 void setDefault(boolean isDefault)
          Sets whether this is a default target.
 void setID(String id)
          Sets this target's identifier, which can be used by other targets to reference this target (with the ref attribute).
 void setTitle(RichContent title)
          Sets this target's title.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BotTarget

public BotTarget()
Creates a target.

Method Detail

getTitle

public RichContent getTitle()
Returns this target's title.


setTitle

public void setTitle(RichContent title)
Sets this target's title. This describes this target within menus.


getCommand

public String getCommand()
Returns the command used to trigger this target.


setCommand

public void setCommand(String command)
Sets the command used to trigger this target.

A target's calls are executed when a user types its command.


isDefault

public boolean isDefault()
Returns true if this is a default target.


setDefault

public void setDefault(boolean isDefault)
Sets whether this is a default target.

If a user command doesn't match any existing targets, and there is a default target specified, the default target is triggered.


getID

public String getID()
Returns this target's identifier.


setID

public void setID(String id)
Sets this target's identifier, which can be used by other targets to reference this target (with the ref attribute).


getCalls

public BotCallSet getCalls()
Returns the calls executed by this target.


getFilters

public BotFilterSet getFilters()
Returns this target's filters.

If the filters do not allow a certain message or event, this target will not be triggered, nor will it show up inside any menus.


getRoutes

public BotRouteSet getRoutes()
Returns this target's routes.

This target's calls are processed for each specified route.


clone

public Object clone()
Returns an exact copy of this target.

Overrides:
clone in class Object


JBuddy is a trademark of Zion Software, LLC in the US and other countries.
Copyright 2000-2008 Zion Software, LLC All Rights Reserved.