|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.stanwood.media.Controller
public class Controller
The controller is used to control access to the stores and and sources. This is a singleton class, and just first be setup using the @see initWithDefaults() or @see initFromConfigFile() methods. From then on, getInstance() can be called to a access the methods used to control stores and sources.
Constructor Summary | |
---|---|
Controller(ConfigReader config)
The constructor |
Method Summary | |
---|---|
ExtensionInfo<? extends IAction> |
getActionInfo(java.lang.String id)
Used to get information about a action |
java.util.List<ExtensionInfo<? extends IAction>> |
getAvalibaleActions()
Used to get a list of possible actions that can be used with a media directory. |
java.util.List<ExtensionInfo<? extends ISource>> |
getAvalibaleSources()
Used to get a list of possible sources that can be used with a media directory. |
java.util.List<ExtensionInfo<? extends IStore>> |
getAvalibaleStores()
Used to get a list of possible stores that can be used with a media directory. |
java.io.File |
getConfigDir()
Get the location of the media directory |
ExtensionInfo<? extends ISource> |
getDefaultSource(Mode mode)
Used to get the default source information |
java.util.Collection<java.io.File> |
getMediaDirectories()
Used to get a list of media directory locations |
java.util.List<MediaDirectory> |
getMediaDirectories(Mode type)
Used to get a list of media directories of a given type |
MediaDirectory |
getMediaDirectory(java.io.File mediaDir)
Used to convert a media directory location into the media directory object |
IMediaFileInfo |
getMediaFileInformation(java.io.File file)
Used to get information on a media file |
java.io.File |
getNativeFolder()
Used to find the native folder. |
SeenDatabase |
getSeenDB()
Used to get the seen media file database |
ExtensionInfo<? extends ISource> |
getSourceInfo(java.lang.String id)
Used to get information about a source |
ExtensionInfo<? extends IStore> |
getStoreInfo(java.lang.String id)
Used to get information about a store |
java.util.Collection<WatchDirConfig> |
getWatchDirectories()
Used to get a list of watch directory information |
XBMCAddonManager |
getXBMCAddonManager()
Used to get the addon manager |
void |
init(boolean testMode)
Used to setup the controller ready for use |
boolean |
isTestRun()
Used to find out if test mode is been used. |
void |
registerExtension(ExtensionInfo<?> info)
Used to register a extension. |
static void |
setXBMCAddonManager(XBMCAddonManager xbmcAddonManager)
Used to set the addon manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Controller(ConfigReader config)
config
- The parsed configurationMethod Detail |
---|
public void init(boolean testMode) throws ConfigException
testMode
- If true then test mode is active and no changes are to be written to disk
ConfigException
- Thrown if their is a problem reading the configurationpublic void registerExtension(ExtensionInfo<?> info)
info
- The extension informationpublic static void setXBMCAddonManager(XBMCAddonManager xbmcAddonManager)
xbmcAddonManager
- The addon managerpublic XBMCAddonManager getXBMCAddonManager()
public MediaDirectory getMediaDirectory(java.io.File mediaDir) throws ConfigException
mediaDir
- The location of a media directory
ConfigException
- Thrown if their is a problem reading the configurationpublic java.util.Collection<java.io.File> getMediaDirectories()
public java.util.Collection<WatchDirConfig> getWatchDirectories()
public ExtensionInfo<? extends ISource> getSourceInfo(java.lang.String id)
id
- The source id
public java.util.List<ExtensionInfo<? extends ISource>> getAvalibaleSources()
public java.util.List<ExtensionInfo<? extends IStore>> getAvalibaleStores()
public java.util.List<ExtensionInfo<? extends IAction>> getAvalibaleActions()
public ExtensionInfo<? extends IStore> getStoreInfo(java.lang.String id)
id
- The store id
public ExtensionInfo<? extends IAction> getActionInfo(java.lang.String id)
id
- The action id
public boolean isTestRun()
public java.io.File getNativeFolder()
public java.io.File getConfigDir() throws ConfigException
ConfigException
- Thrown if their is a problempublic ExtensionInfo<? extends ISource> getDefaultSource(Mode mode) throws ConfigException
mode
- The mode to look for the source in
ConfigException
- Thrown if unable to find a default sourcepublic java.util.List<MediaDirectory> getMediaDirectories(Mode type) throws ConfigException
type
- The type
ConfigException
- Thrown if their is a problem reading the configpublic IMediaFileInfo getMediaFileInformation(java.io.File file) throws StanwoodException
file
- The media file
IVideoFileInfo
.
StanwoodException
- Thrown if their are any problemspublic SeenDatabase getSeenDB() throws ConfigException
ConfigException
- Thrown if thier is a problem reading the database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |