|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.stanwood.media.xml.XMLParser
org.stanwood.media.source.xbmc.XBMCAddon
public class XBMCAddon
This class is used to manage XBMC addon's
Field Summary |
---|
Fields inherited from class org.stanwood.media.xml.XMLParser |
---|
DTD_WEB_LOCATION, SCHEMA_WEB_LOCATION |
Constructor Summary | |
---|---|
XBMCAddon(XBMCAddonManager addonMgr,
java.io.File addonDir,
java.util.Locale locale)
Used to create a instance of the addon class |
Method Summary | |
---|---|
boolean |
checkCondition(java.lang.String expression)
Used to evaluate a expression making use of the addon settings. |
java.lang.String |
executeFunction(java.lang.String functionName,
java.util.Map<java.lang.Integer,java.lang.String> params)
Used to execute a scraper function |
java.lang.String |
getDescription()
Used to get the description of the addon |
java.io.File |
getFile(java.lang.String path)
Used to get a reference to one of the addons files |
java.lang.String |
getId()
Used to get the id of the addon |
java.lang.String |
getInfoSetting(java.lang.String key)
Used to get the value of a info setting |
XBMCAddonManager |
getManager()
Used to get the addon manager |
java.lang.String |
getName()
Used to get the name of the addon |
java.lang.String |
getProviderName()
Used to get the provider name of the addon |
java.util.List<XBMCAddon> |
getRquiredAddons()
Used to get a list of required addons by this addon |
XBMCScraper |
getScraper(Mode mode)
Used to get the scraper class that will read data using the XBMC XML scraper files |
Value |
getSetting(java.lang.String id)
Used to get the value of a addon setting |
java.util.Map<java.lang.String,Value> |
getSettings()
Used to get the addon settings |
java.lang.String |
getSummary()
Used to get the summary of the addon |
Version |
getVersion()
Used to get the version of the addon |
boolean |
hasScrapers()
Used to find out if the extension has scrappers |
void |
setSetting(java.lang.String key,
java.lang.String expression)
Used to assign a value to a variable which are used as settings. |
boolean |
supportsMode(Mode mode)
Used o find out if the scraper supports a given mode |
java.lang.String |
toString()
|
Methods inherited from class org.stanwood.media.xml.XMLParser |
---|
createDocBuilder, createFactory, deleteNode, domToStr, encodeAttributeValue, firstChild, getAttribute, getElement, getFirstChildElement, getFloatFromXML, getIntegerFromXML, getLastChildElement, getLongFromXML, getSchema, getStringFromXML, getStringFromXMLOrNull, getURLFromXML, getURLFromXMLOrNull, hasNode, parse, parse, parse, quoteXPathQuery, selectChildNodes, selectNodeList, selectSingleNode, strToDom, strToDom, strToDom, writeXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XBMCAddon(XBMCAddonManager addonMgr, java.io.File addonDir, java.util.Locale locale) throws XBMCException
addonMgr
- The XBMC addon manageraddonDir
- The directory contain the XBMC addonslocale
- The locale to use with the scrapers
XBMCException
- Thrown if anable to parse the settingsMethod Detail |
---|
public Value getSetting(java.lang.String id) throws XBMCException
id
- The id of the addon setting
XBMCException
- Thrown if their is a problem getting the settingpublic java.util.Map<java.lang.String,Value> getSettings()
public java.lang.String getId() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.util.List<XBMCAddon> getRquiredAddons() throws XBMCException
XBMCException
- Thrown if their is a problempublic Version getVersion() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getProviderName() throws XBMCException
XBMCException
- Thrown if their are any problemspublic boolean supportsMode(Mode mode) throws XBMCException
mode
- The mode to check
XBMCException
- Thrown if their is any problems while checkingpublic XBMCScraper getScraper(Mode mode) throws XBMCException
mode
- The mode that the scraper is been used for
XBMCException
- Thrown if their are any problemspublic java.lang.String getSummary() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getDescription() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getName() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getInfoSetting(java.lang.String key) throws XBMCException
key
- The info setting name
XBMCException
- Thrown if not able to find the settingpublic java.io.File getFile(java.lang.String path)
path
- The Path relative to the addon directory
public java.lang.String executeFunction(java.lang.String functionName, java.util.Map<java.lang.Integer,java.lang.String> params) throws XBMCException
functionName
- The function nameparams
- The parameters given to the function
XBMCException
- Thrown if their are any problemspublic XBMCAddonManager getManager()
public boolean hasScrapers() throws XBMCException
XBMCException
- Thrown if their are any problemspublic boolean checkCondition(java.lang.String expression) throws XBMCException
expression
- The expression
XBMCException
- Thrown if their are any problemspublic void setSetting(java.lang.String key, java.lang.String expression) throws XBMCException
key
- The name of the settingexpression
- The expression to evaluate and store in the setting
XBMCException
- Thrown if their are any problems.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |