Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javazoom.download.util
Class Repository

    java.lang.Object
      javazoom.download.util.Repository

public class Repository
extends java.lang.Object

This class manage a repository of Config instances identified by id. Config instances are sorted by id (alpha sorting).

Since:
  1.3

Method Summary
`void` | `add(Config config)` Add a new config.
`Config` | `get(java.lang.String id)` Return a Config instance given an id.
`java.util.Map` | `getAll()` Return all Config from the repository such as "id1", Config1, ...
`java.util.Properties` | `getDefaultMimes()` Return default mimes types loaded from javazoom/download/resource/
`java.lang.String` | `getFirstId()` Return first Config id.
`static Repository` | `getInstance()` Return instance of Repository (singleton).
`java.util.Properties` | `getMimes(java.lang.String filename)` Load mimes types from an XML file.
`java.lang.String` | `getXmlConf()` Return path to xml files of Download4J.
`void` | `remove(java.lang.String id)` Remove a Config from the repository (given an id).
`void` | `setXmlConf(java.lang.String s)` Set path to xml files of Download4J.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static Repository getInstance()

  Return instance of Repository (singleton).

  Returns:

### setXmlConf

    public void setXmlConf(java.lang.String s)

  Set path to xml files of Download4J.

  Parameters:
    `s` -

### getXmlConf

    public java.lang.String getXmlConf()

  Return path to xml files of Download4J.

  Returns:

### add

    public void add(Config config)

  Add a new config. If the config was already added then new config replace old one.

  Parameters:
    `config` -

### get

    public Config get(java.lang.String id)

  Return a Config instance given an id.

  Parameters:
    `id` -
  Returns:

### remove

    public void remove(java.lang.String id)

  Remove a Config from the repository (given an id).

  Parameters:
    `id` -

### getAll

    public java.util.Map getAll()

  Return all Config from the repository such as "id1", Config1, ...

  Returns:

### getFirstId

    public java.lang.String getFirstId()

  Return first Config id.

  Returns:

### getDefaultMimes

    public java.util.Properties getDefaultMimes()

  Return default mimes types loaded from javazoom/download/resource/

  Returns:

### getMimes

    public java.util.Properties getMimes(java.lang.String filename)

  Load mimes types from an XML file.

  Parameters:
    `filename` -
  Returns:

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD