Class Capability

This class represents the base for all capabilities. A capability can be associated to a knowledge base and initialized via the method initCapability(). A capability can be finalized and de-associated from a knowledge base via the method finiCapability().

A capability has certain properties, some do exist already when the capability has not yet been associated and some are specific to the association of the capability to a knowledge base. The properties can be retrieved via the method getProperty().

Capabilities govern resources. To access a resource inside a capability the method prepareStream() has to be used. Further the method getDescriptionProperties() allows retrieving the description properties of this capability. The method might return different properties for different locales.


import java.util.Locale;
import java.util.Properties;

public class Capability extends AbstractDecoder {
public static final String PROP_NEEDS_ACT = "needs_act";
public static final String PROP_ACT_STATUS = "act_status";
public static final String PROP_EXPIRATION_DATE = "expiration_date";
public static final String PROP_BUNDLE_DIR = "bundle_dir";
public static final String PROP_IMAGE_ICON = "image_icon";
public static final String PROP_BIG_IMAGE_ICON = "big_image_icon";
public static final String PROP_SYS_NOTRACE = "sys_notrace";
public static final String PROP_LANGUAGE_CODE = "language_code";
public static final String PROP_INSTALL_CODE = "install_code";
public static final String PROP_LICENSE_CODE = "license_code";

public void initCapability(Interpreter inter)
throws InterpreterMessage, InterpreterException;
public void initCapability(Interpreter inter, boolean prompt)
throws InterpreterMessage, InterpreterException;
public void finiCapability(Knowledgebase know)
throws InterpreterMessage;

public static String[] getProperties();
public Object getProperty(String prop, Lobby lobby);

public InputStream prepareStream(InputStream in, Interpreter inter)
throws InterpreterMessage, IOException;
public Properties getDescriptionProperties(Locale locale);